blob: d2cea046785e9d3977a1c6265fdc7c4edcba01c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
'use strict'
_ = require 'lodash'
module.exports =
mapPromises: (promises) ->
_.reduce promises, ((seq, v, k) ->
seq.then (acc) ->
v.then (r) ->
acc[k] = r
acc
), Promise.resolve {}
|