Loading...
Loading...
Object and class design patterns following Clean Code JavaScript.
npx skill4agent add damianwrooby/javascript-clean-code-skills clean-codejs-objects// ❌ Bad
user.name = 'John';
// ✅ Good
user.rename('John');// ❌ Bad
user.age++;
// ✅ Good
const updatedUser = user.withAge(user.age + 1);// ❌ Bad
class User {
calculateTax() {}
}
// ✅ Good
class TaxCalculator {
calculate(user) {}
}