madoos-type

0.0.8 • Public • Published

madoos-type

Check the type of objects.

Build Status

Getting Started

To install:

npm i --save madoos-type

In your project:

const type = require('madoos-type')

type.is({}) // => 'Object'
type.isFunction(function(){}) // =>  true
type.isNumber('1234') // => false

Funtions

  • .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:show

Run cover test

npm run test:cover:show

Readme

Keywords

Package Sidebar

Install

npm i madoos-type

Weekly Downloads

1

Version

0.0.8

License

MIT

Last publish

Collaborators

  • madoos