smart-types
v0.1.0
Published
A smarter way to check Javascript types.
Downloads
2
Readme
smart-types
A smarter type checker for Javascript. Smart types simplifies the tedious task of checking types in javascript.
Usage
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
Motivation
This package is designed to simplify [[Class]] type checking in javascript.
Installation
$ npm install -S start-types
API Reference
API reference can be found at https://github.com/jdpipkin/smart-types/blob/master/output.md
Tests
npm test
Contributors
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.
License
MIT