fn-type
v1.3.0
Published
Get the type of something. Seriously.
Downloads
16
Maintainers
Readme
fn-type
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