ez-type

1.0.0 • Public • Published

ez-type

Easily determine type.

Install

npm install ez-type

Usage

const ezType = require('ez-type')
ezType({}) //"object"
ezType([]) //"array"
ezType(null) //"null"
ezType(undefined) //"undefined"
ezType(NaN) //"NaN"
ezType(5)  //"number"
ezType("hewwo") //"string"
 
//avoid common type pitfalls
typeof [] //"object"
typeof null //"object"
typeof NaN //"number"

Package Sidebar

Install

npm i ez-type

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.98 kB

Total Files

5

Last publish

Collaborators

  • clambodile