diff options
Diffstat (limited to 'node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js')
| -rw-r--r-- | node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js b/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js index b7d18c6a..8fb1a71d 100644 --- a/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +++ b/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js @@ -1,10 +1,9 @@ var arrayLikeToArray = require("./arrayLikeToArray.js"); -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + 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; + } } module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
\ No newline at end of file |
