UNPKG

414 BJavaScriptView Raw
1function _iterableToArrayLimitLoose(arr, i) {
2 if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
3 return;
4 }
5
6 var _arr = [];
7
8 for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
9 _arr.push(_step.value);
10
11 if (i && _arr.length === i) break;
12 }
13
14 return _arr;
15}
16
17module.exports = _iterableToArrayLimitLoose;
\No newline at end of file