fn-type

1.3.0 • Public • Published

fn-type

Last version Build Status Dependency status Dev Dependencies Status NPM Status Donate

Get the type of something. Seriously.

Install

npm install fn-type --save

If you want to use in the browser (powered by Browserify):

bower install fn-type --save

and later link in your HTML:

<script src="bower_components/fn-type/dist/fn-type.js"></script>

Usage

var typeOf = require('fn-type');
 
console.log(typeOf({})) // => 'object'
console.log(typeOf([])) // => 'array'
 
console.log(typeOf.types)
// => [
//  'arguments',
//  'array',
//  'arraybuffer',
//  'boolean',
//  'date',
//  'error',
//  'float32array',
//  'float64array',
//  'function',
//  'generatorfunction',
//  'int16array',
//  'int32array',
//  'int8array',
//  'map',
//  'number',
//  'object',
//  'regexp',
//  'set',
//  'string',
//  'symbol',
//  'uint16array',
//  'uint32array',
//  'uint8array',
//  'uint8clampedarray',
//  'weakmap',
//  'weakset'
// ];
 

License

MIT © Kiko Beats

Package Sidebar

Install

npm i fn-type

Weekly Downloads

0

Version

1.3.0

License

MIT

Last publish

Collaborators

  • kikobeats