@easy-koa/shared
Version:
13 lines • 887 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUndefined = function (obj) { return typeof obj === 'undefined'; };
exports.isFunction = function (fn) { return typeof fn === 'function'; };
exports.isObject = function (fn) { return typeof fn === 'object'; };
exports.isString = function (fn) { return typeof fn === 'string'; };
exports.isConstructor = function (fn) { return fn === 'constructor'; };
exports.validatePath = function (path) { return (path.charAt(0) !== '/') ? '/' + path : path; };
exports.isNil = function (obj) { return exports.isUndefined(obj) || obj === null; };
exports.isEmpty = function (array) { return !(array && array.length > 0); };
exports.isNumber = function (n) { return typeof n === 'number'; };
exports.isEmptyObject = function (object) { return Object.keys(object).length === 0; };
//# sourceMappingURL=validate.js.map