type-validation
Check types.
Install
- via npm
npm install alexeyraspopov/type-validation - via component
component install alexeyraspopov/type-validation - via bower
bower install type-validation
API
check(type/map, value);
Usage
var validate = require('type-validation');
validate(String, 'Ann');
validate([Number], [1, 2, 3, 4, 5]);
validate({ name: String, age: Number, friends: [String] }, ...);
License
MIT License (c) Alexey Raspopov