Files
xen-orchestra/@xen-orchestra/backups-cli/_asyncMap.js
2019-12-09 16:36:19 +01:00

8 lines
190 B
JavaScript

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