fn-typeof
v1.1.0
Published
Get the type of something. Seriously.
Downloads
41
Maintainers
Readme
fn-typeof
Get the type of something. Seriously.
Install
npm install fn-typeof --save
If you want to use in the browser (powered by Browserify):
bower install fn-typeof --save
and later link in your HTML:
<script src="bower_components/fn-typeof/dist/fn-typeof.js"></script>
Usage
var typeOf = require('fn-typeof');
console.log(typeOf({})) // => 'object'
console.log(typeOf([])) // => 'array'
console.log(typeOf.types)
// => [
// 'array',
// 'boolean',
// 'date',
// 'function',
// 'number',
// 'object',
// 'regexp',
// 'string'
// ];
License
MIT © Kiko Beats