UNPKG

@n3okill/utils

Version:
18 lines 542 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.kindOf = kindOf; const isNull_1 = require("./isNull"); const isUndefined_1 = require("./isUndefined"); /** * Return a string with the type of the object * @param arg * @returns {string} */ function kindOf(arg) { return (0, isNull_1.isNull)(arg) ? "null" : (0, isUndefined_1.isUndefined)(arg) ? "undefined" : /^\[object (.*)]$/.exec(Object.prototype.toString.call(arg))[1]; } //# sourceMappingURL=kindOf.js.map