isObjectLike.mjs 590 B

123456789
  1. 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); }
  2. /**
  3. * Return true if `value` is object-like. A value is object-like if it's not
  4. * `null` and has a `typeof` result of "object".
  5. */
  6. export default function isObjectLike(value) {
  7. return _typeof(value) == 'object' && value !== null;
  8. }