Skip to content
/ is Public

JavaScript isser library. Node, AMD and browser support

License

Notifications You must be signed in to change notification settings

bjarneo/is

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is.js

JavaScript isser library. Node, AMD and browser support

Install:

npm i --save isdotjs

Documentation:

Imports

import is from 'isdotjs';
import is from 'isdotjs/dist/isdotjs.m'; // Module
import is from 'isdotjs/dist/isdotjs.umd'; // UMD
import is from 'isdotjs/dist/isdotjs'; // CJS

is.Array();

is.Array(['a', 'b', 'c']);
// Returns true

is.Object();

is.Object({ name: 'isJs' });
// Returns true

is.Function();

is.Function(function() {});
// Returns true

is.Undefined();

var test;
is.Undefined(test);
// Returns true

is.String();

is.String('my string');
// Returns true

is.Empty();

is.Empty({});
// Returns true

is.Empty([]);
// Returns true

is.Empty('');
// Returns true

is.Number();

is.Number(123);
// Returns true

is.Number(1.1);
// Returns true

is.Number(-123);
// Returns true

is.Number(-1.2);
// Returns true

is.Integer();

is.Integer(1);
// Returns true

is.Integer(1.0);
// Returns true

is.Float();

is.Float(1.1);
// Returns true

is.Float(-1.1);
// Returns true

is.Boolean();

is.Boolean(true);
// Returns true

is.Boolean(false);
// Returns true

is.Null();

is.Null(null);
// Returns true

is.Element();

var el = document.createElement('div');
is.Element(el);
// Returns true

is.Date();

is.Date(new Date);
// Returns true

is.RegExp();

is.RegExp(/a-z/);
// Returns true

is.Global();

is.Global(window);
// Returns true

About

JavaScript isser library. Node, AMD and browser support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published