0.0.8 • Published 9 years ago
madoos-type v0.0.8
madoos-type
Check the type of objects.
Getting Started
To install:
npm i --save madoos-typeIn your project:
const type = require('madoos-type')
type.is({}) // => 'Object'
type.isFunction(function(){}) // => true
type.isNumber('1234') // => falseFuntions
.is.isArray.isObject.isDate.isRegExp.isNaN.isUndefined.isString.isNumber.isBoolean.isFunction.isArrow.isSymbol
.is
Returns a string with the object type
- 'Array'
- 'Object'
- 'Date'
- 'RegExp'
- 'NaN',
- 'undefined'
- 'string'
- 'number'
- 'boolean'
- 'function'
- 'symbol'
Run test
npm run test:unit:showRun cover test
npm run test:cover:show