1.1.1 • Published 7 years ago

typis v1.1.1

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

Installation

Node.js

npm install typis --save

Example

const type = require('typis');

console.log(type.get([])); //=> Array;
console.log(type.get(123)); //=> Number;
console.log(type.get(true)); //=> Boolean;

console.log(type.is(123, 'boolean')); //=> false;

// Throw an error
type.throw(123, 'boolean'); //=> error;
type.throw(123, 'boolean', 'your custom message error'); //=> error;

API

See full documentation

Changelog

You can view the changelog here

License

typis is open-sourced software licensed under the MIT license

Author

Fabio Ricali