typeof

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

3 个版本
安装
npm install typeof
yarn add typeof
pnpm add typeof
bun add typeof
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"
版本列表
1.0.0 2013-11-21
0.9.1 2013-04-10
0.9.0 2012-10-30