isObjectLike.js 688 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isObjectLike;
  6. 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); }
  7. /**
  8. * Return true if `value` is object-like. A value is object-like if it's not
  9. * `null` and has a `typeof` result of "object".
  10. */
  11. function isObjectLike(value) {
  12. return _typeof(value) == 'object' && value !== null;
  13. }