get-var-type

1.0.1 • Public • Published

getVarType

这是一个非常简单的获取js变量类型的库,发布该库旨在学习如何运用webpack打包基础库,并发布到npm。

安装

npm install get-var-type -d

使用

import getVarType from 'get-var-type';

getVarType

/**
 * value: 需要判断的变量类型的变量
 * return: 返回变量类型
 * 'number', 'string', 'boolean', 'object', 'array', 'symbol', 'regexp', 'date', 'function', 'null', 'undefined'等等
*/
getVarType(value)

Readme

Keywords

Package Sidebar

Install

npm i get-var-type

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

6.34 kB

Total Files

7

Last publish

Collaborators

  • izph