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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.00latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.00
0.0.00

Package Sidebar

Install

npm i obj-is

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • a8m