Download EPUB

(Medium) Refactoring

Gist 1 min read Original article

This article is too short to generate a summary.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

function validateAustralianAddress(input) {
- if (isEmpty(input)) {
+ if (isEmpty({ value: input })) {
return false;
}
- if (!hasSuburb(input)) {
+ if (!hasSuburb({ value: input })) {
return false;
}
// ... and other validations
return true;
}

Keep this one

14 days free, no card. Then $60 a year ($5 a month, billed yearly) or $10 a month.

Your saves stay readable and exportable, even if you stop paying.