【文件属性】:
文件名称:type-check:检查给定值是否属于特定类型
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-30 00:16:14
JavaScript
正在检查
检查给定值是否属于特定类型。
关于
提供一种简单而干净的方法来检查值是否与特定类型匹配。 抽象“typeof === '...'”的用法。
安装
npm install is-check
模块使用
var check = require('is-check');
var myValue = 'something';
check.isArray(myValue);
check.isBoolean(myValue);
check.isFunction(myValue);
check.isNil(myValue);
check.isNull(myValue);
check.isNumber(myValue);
check.isObject(myValue);
check.isString(myValue);
check.isUndefined(myValue);
运行测试
从根项
【文件预览】:
type-check-master
----.gitignore(520B)
----package.json(799B)
----index.js(940B)
----README.md(21KB)
----test()
--------isString.js(3KB)
--------isFunction.js(3KB)
--------isUndefined.js(3KB)
--------isNull.js(3KB)
--------isArray.js(3KB)
--------isNil.js(3KB)
--------isBoolean.js(3KB)
--------isNumber.js(3KB)
--------isObject.js(3KB)