use-form
Version:
24 lines (23 loc) • 608 B
JavaScript
;
exports.__esModule = true;
var typeOf = function (operand) { return ({
is: function () {
var types = [];
for (var _i = 0; _i < arguments.length; _i++) {
types[_i] = arguments[_i];
}
return types.includes(Object.prototype.toString
.call(operand)
.slice(8, -1)
.toLowerCase());
}
}); };
function isArray(array) {
return typeOf(array).is('array');
}
exports.isArray = isArray;
function isObject(object) {
return typeOf(object).is('object');
}
exports.isObject = isObject;
exports["default"] = typeOf;