maybeArrayLike.js 381 B

12345678910
  1. import _Array$isArray from "@babel/runtime-corejs3/core-js/array/is-array";
  2. import arrayLikeToArray from "./arrayLikeToArray.js";
  3. export default function _maybeArrayLike(next, arr, i) {
  4. if (arr && !_Array$isArray(arr) && typeof arr.length === "number") {
  5. var len = arr.length;
  6. return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);
  7. }
  8. return next(arr, i);
  9. }