Files
xen-orchestra/@xen-orchestra/backups-cli/_asyncMap.js
2020-11-24 10:51:35 +01:00

6 lines
182 B
JavaScript

const curryRight = require('lodash/curryRight')
module.exports = curryRight((iterable, fn) =>
Promise.all(Array.isArray(iterable) ? iterable.map(fn) : Array.from(iterable, fn))
)