Package Exports
- assert-kindof
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (assert-kindof) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Checks the type of a value and throws if not okey. More clear and simple syntax and consistent error messages.
is-kindof
returnstrue
orfalse
assert-kindof
returnstrue
or throwsTypeError
Install
npm i --save assert-kindof
npm test
Usage
For more use-cases see the tests
notice: that tunnckoCore/is-kindof
is exposed as is.kindof
var is = require('assert-kindof');
is.object('foo'); //=> throw TypeError
is.a.object('foo'); //=> throw TypeError
is.an.object('foo'); //=> throw TypeError
is.not.a.object({a: 'b'}); //=> throw TypeError
is.not.an.object({a: 'b'}); //=> throw TypeError
is.a.not.object({a: 'b'}); //=> throw TypeError
is.an.not.object({a: 'b'}); //=> throw TypeError
is.kindof.object('foo'); //=> false
is.kindof.array('foo'); //=> false
is.kindof.null(null); //=> true
is.kindof.symbol('foo'); //=> false
is.kindof.symbol(Symbol('foo')); //=> true
API / CLI
Author
Charlike Mike Reagent
License 
Copyright (c) 2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Proudly generated by docks(1), March 29, 2015