News for hackers. Stuff that matters.
Re:Type Checking in JavaScript by stevecooperorg on Wednesday November 06, 2013 @06:33AM (#6682147)
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.

There are no comments on this comment yet.