This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'); | |
_ = require('lodash'); | |
/** | |
* Map an object, or a promise of an object, with the given `mapper` function | |
* with the signature `(value, key, obj)` where `value` is an object's `key` | |
* property's value. | |
* | |
* If the `mapper` function returns promises or thenables, the returned promise | |
* will wait for all the mapped results to be resolved as well. |