unsupportedIterableToArray.js 573 B

123456789
  1. var arrayLikeToArray = require("./arrayLikeToArray.js");
  2. function _unsupportedIterableToArray(r, a) {
  3. if (r) {
  4. if ("string" == typeof r) return arrayLikeToArray(r, a);
  5. var t = {}.toString.call(r).slice(8, -1);
  6. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
  7. }
  8. }
  9. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;