0.1.0 • Published 8 years ago

smart-types v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Build Status Coverage Status

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