5 ms·
Great solution -- by the end, that final 'type' object starts to look good; type.isNumber(4); // true And it'd be easy to add validation versions, too, whi
by stevecooperorg 13y ago
Great solution -- by the end, that final 'type' object starts to look good;
type.isNumber(4); // true
And it'd be easy to add validation versions, too, which might help clarify the types as one call per parameter;
type.ensureIsNumber(myParameter); // throws exception if not a number
which might help your code fail faster.