1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var is_array_like_1 = require("./is-array-like");
|
4 | var map = function (arr, func) {
|
5 | if (!is_array_like_1.default(arr)) {
|
6 | // @ts-ignore
|
7 | return arr;
|
8 | }
|
9 | var result = [];
|
10 | for (var index = 0; index < arr.length; index++) {
|
11 | var value = arr[index];
|
12 | result.push(func(value, index));
|
13 | }
|
14 | return result;
|
15 | };
|
16 | exports.default = map;
|
17 | //# sourceMappingURL=map.js.map |
\ | No newline at end of file |