unsupportedIterableToArray.js 834 B

123456789101112131415161718192021
  1. var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js/instance/slice");
  2. var _Array$from = require("@babel/runtime-corejs3/core-js/array/from");
  3. var arrayLikeToArray = require("./arrayLikeToArray.js");
  4. function _unsupportedIterableToArray(o, minLen) {
  5. var _context;
  6. if (!o) return;
  7. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  8. var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 8, -1);
  9. if (n === "Object" && o.constructor) n = o.constructor.name;
  10. if (n === "Map" || n === "Set") return _Array$from(o);
  11. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  12. }
  13. module.exports = _unsupportedIterableToArray;
  14. module.exports["default"] = module.exports, module.exports.__esModule = true;