maybeArrayLike.js 487 B

123456789101112131415
  1. var _Array$isArray = require("@babel/runtime-corejs3/core-js/array/is-array");
  2. var arrayLikeToArray = require("./arrayLikeToArray.js");
  3. 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. }
  10. module.exports = _maybeArrayLike;
  11. module.exports["default"] = module.exports, module.exports.__esModule = true;