You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
383 B

4 years ago
  1. export default function _iterableToArrayLimitLoose(arr, i) {
  2. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  3. return;
  4. }
  5. var _arr = [];
  6. for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
  7. _arr.push(_step.value);
  8. if (i && _arr.length === i) break;
  9. }
  10. return _arr;
  11. }