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.

30 lines
913 B

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
export function isFunction(input) {
return typeof input === 'function';
}
export function noop() {// noop
}
function isObjectLike(input) {
return _typeof(input) === 'object' && input !== null;
}
export 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;
}