2018-12-07 16:13:02 +08:00

14 lines
282 B
JavaScript

function isDef(value) {
return value !== undefined && value !== null;
}
function isObj(x) {
var type = typeof x;
return x !== null && (type === 'object' || type === 'function');
}
function isNumber(value) {
return /^\d+$/.test(value);
}
export { isObj, isDef, isNumber };