0.1.1 • Published 10 years ago

type.is v0.1.1

Weekly downloads
12
License
MIT
Repository
-
Last release
10 years ago

Detect the type of a variable.

Install

npm install type.is --save

Usage

var type = require('type.is')

var fn = function() {};
if (type(fn).is.func) {
    fn.call(this);
}

Available detections

TypeDetector
Numbertype(v).is.number
Stringtype(v).is.string
Booleantype(v).is.bool
Functiontype(v).is.func
Arraytype(v).is.array
Datetype(v).is.date
RegExptype(v).is.re
Objecttype(v).is.object

License

MIT