@hsui/sdk
Version:
Hundsun frontend framework JSSDK
20 lines (19 loc) • 554 B
JavaScript
import _typeof from "@babel/runtime/helpers/esm/typeof";
export function isUndefined(value) {
return value === undefined;
}
export function isObject(value) {
var type = _typeof(value);
return value != null && (type == 'object' || type == 'function');
}
/**
* Redux isPlainObject
*/
export function isPlainObject(obj) {
if (_typeof(obj) !== 'object' || obj === null) return false;
var proto = obj;
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto);
}
return Object.getPrototypeOf(obj) === proto;
}