A smarter type checker for Javascript. Smart types simplifies the tedious task of checking types in javascript.
smartTypes = require('smart-types');
smartTypes.isString('foo');
// => true
smartTypes.isNumber(10);
// => true
smartTypes.isNumber(NaN);
// => false
smartTypes.getType([]);
// => array
smartTypes.isOfType(new Error(), 'error');
// => true
This package is designed to simplify [[Class]] type checking in javascript.
$ npm install -S start-types
API reference can be found at https://github.com/jdpipkin/smart-types/blob/master/output.md
npm test
Contributions are always welcome. Please make sure your code follows the existing project style and there are no linting errors. Please test and document your changes before making your pull request.
If you don't feel like going through the hassel feel free to create an issue and I'll do my best to solve your problems.
MIT