aboutsummaryrefslogtreecommitdiffstats
path: root/library/moment/src/lib/utils/map.js
blob: 1cbc5639f0afe042f7d49370464a6154d1200306 (plain) (blame)
1
2
3
4
5
6
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;
}