is 0

JavaScript isser library. Node, AMD and browser support

3 years after MIT

is.js

JavaScript isser library. Node, AMD and browser support

Install:

git clone [email protected]:bjarneo/is.git
//or
npm install isdotjs

Documentation:

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

Related Repositories

when-ish-is-my-bus

when-ish-is-my-bus

Data and code for "When (ish) is My Bus? User-centered Visualizations of Uncerta ...

is-ottava-rima

is-ottava-rima

IsOttavaRima is a program that detects whether a string of text representing a p ...

crypto.is

crypto.is

The source code for the Cypherpunk home http://crypto.is ...

crypto.is

crypto.is

The code behind crypto.is ...

is-not-positive

is-not-positive

Checks if a number is not positive. The best not-positive checker out there. ...


Top Contributors

bjarneo dmamills