You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isFunction = isFunction;
exports.noop = noop;
exports.isPlainObject = isPlainObject;
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
// cheap lodash replacements
function isFunction(input) {
return typeof input === 'function';
}
function noop() {// noop
}
function isObjectLike(input) {
return _typeof(input) === 'object' && input !== null;
}
function isPlainObject(input) {
if (!isObjectLike(input)) {
return false;
}
if (Object.getPrototypeOf(input) === null) {
return true;
}
var proto = input;
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto);
}
return Object.getPrototypeOf(input) === proto;
}