obj-is

0.1.0 • Public • Published

obj-is

NPM version Build status Test coverage Dependency Status License Downloads

is-function's creator

Install

$ npm install --save obj-is

Usage

var is = require('obj-is');
 
// Person Constructor
function Person(name) {
  this.name = name;
}
 
// Create `isPerson` function
var isPerson = is(Person);
isPerson(new Person('foo')); // → true
isPerson({});                // → false
 
// if second argument set to true
// it's test with instanceof operator
var isObject = is(Object, true);
isObject(new Person('bar')); // → true

Table of contents:

License

MIT © Ariel Mashraki

Readme

Keywords

Package Sidebar

Install

npm i obj-is

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • a8m