izzy

A micro library for naive type checking


Keywords
is, type, typeof, type check, string, number, defined, array, object, boolean, primitive
License
MIT
Install
bower install izzy

Documentation

izzy

A robust micro library for type checking. Defers to constructs' internal [[Class]] property rather than duck typing for excellent type detection and to avoid triggering false positives.

Build Status browser support

usage

izzy.string ('foo') // true
izzy.string (new String('foo')) // true

izzy ('string', 'foo') // true
izzy ('string', 42) // false

supported checks

array, boolean, undefined, element, function, nan, null, number, object, string

size

Raw 1.49 kb
Uglified 843 b
Uglified + gzipped 361 b

environment support

Any browser (as window.izzy if you're not using a module loader), AMD, CommonJS, NodeJS

building it yourself

npm install
grunt