function isEmptyObject(a) {
    for (let b in a) return !1;
    return !0;
};

function isNumber(n) {
    return n != null && n !== '' && !isNaN(n);
}

function isString(s) {
    return typeof (s) == 'string';
}

function isArray(a) {
    return Array.isArray(a);
}

function isTrue(any) {
    return !/^(false|0|null|undefined|none|\s{0})$/i.test(any);
}

export { isEmptyObject, isNumber, isString, isArray, isTrue }

  

posted on 2021-07-12 15:43  逻辑短路  阅读(48)  评论(0编辑  收藏  举报