1 | import isArrayLike from './is-array-like';
|
2 | var map = function (arr, func) {
|
3 | if (!isArrayLike(arr)) {
|
4 | // @ts-ignore
|
5 | return arr;
|
6 | }
|
7 | var result = [];
|
8 | for (var index = 0; index < arr.length; index++) {
|
9 | var value = arr[index];
|
10 | result.push(func(value, index));
|
11 | }
|
12 | return result;
|
13 | };
|
14 | export default map;
|
15 | //# sourceMappingURL=map.js.map |
\ | No newline at end of file |