typeof

Node module. typeOf('a string') == 'string', typeOf([]) == 'array', etc.. Also supports named functions detections aka javascript classes

  • typeof

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
typeof
1001.0.011 years ago12 years agoMinified + gzip package size for typeof in KB

Readme

typeof
small node.js module that extends functionality of native typeof inspired by Batman.js typeOf util

Usage:

$ npm install typeof

var typeOf = require('typeof');

console.log(typeOf("a string"));
console.log(typeOf([1, 2, 3, "array"]));
console.log(typeOf(null));

"string"
"array"
"null"