diff options
Diffstat (limited to 'library/moment/src/lib/utils/map.js')
-rw-r--r-- | library/moment/src/lib/utils/map.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/moment/src/lib/utils/map.js b/library/moment/src/lib/utils/map.js new file mode 100644 index 000000000..1cbc5639f --- /dev/null +++ b/library/moment/src/lib/utils/map.js @@ -0,0 +1,7 @@ +export default function map(arr, fn) { + var res = [], i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + return res; +} |