UNPKG

function-tree

Version:
14 lines 765 B
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } /* If it walks like a duck and quacks like a duck... */ export function isPromise(result) { return result && (result instanceof Promise || typeof result.then === 'function' && typeof result["catch"] === 'function'); } export function isPlainValue(value) { if (value !== null && _typeof(value) === 'object' && !Array.isArray(value) && value.constructor !== Object) { return false; } return true; } //# sourceMappingURL=utils.js.map