aleclarson / isType

Returns true if a value matches the given type

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

isType v1.0.2 stable

Returns true if the value's type is the given type.

Also compatible with any Validator.

isType = require "isType"

isType 0, Number                # => true

isType [], Array                # => true

isType null, Null               # => true

isType true, [ Boolean, Void ]  # => true

About

Returns true if a value matches the given type

License:MIT License


Languages

Language:JavaScript 100.0%