unsupportedIterableToArray.js 497 B

123456789
  1. import arrayLikeToArray from "./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. export { _unsupportedIterableToArray as default };