lazy-js-utils
Version:
A collection of lazy-loaded JavaScript utilities for efficient development
62 lines (57 loc) • 976 B
JavaScript
//#region src/is/isArray.ts
/**
* 判断是否是数组
*/
const isArray = Array.isArray;
//#endregion
//#region src/is/isStr.ts
/**
* 判断是否是字符串类型
*/
function isStr(o) {
return typeof o === "string";
}
//#endregion
//#region src/is/isNull.ts
/**
* 判断是否是null
*/
function isNull(o) {
return o === null;
}
//#endregion
//#region src/is/isBool.ts
/**
* 判断是否是boolean类型
* @param value
* @returns
*/
function isBool(value) {
return typeof value === "boolean";
}
//#endregion
Object.defineProperty(exports, 'isArray', {
enumerable: true,
get: function () {
return isArray;
}
});
Object.defineProperty(exports, 'isBool', {
enumerable: true,
get: function () {
return isBool;
}
});
Object.defineProperty(exports, 'isNull', {
enumerable: true,
get: function () {
return isNull;
}
});
Object.defineProperty(exports, 'isStr', {
enumerable: true,
get: function () {
return isStr;
}
});
;