maybeArrayLike.js 403 B

123456789
  1. var arrayLikeToArray = require("./arrayLikeToArray.js");
  2. function _maybeArrayLike(next, arr, i) {
  3. if (arr && !Array.isArray(arr) && typeof arr.length === "number") {
  4. var len = arr.length;
  5. return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);
  6. }
  7. return next(arr, i);
  8. }
  9. module.exports = _maybeArrayLike, module.exports.__esModule = true, module.exports["default"] = module.exports;