You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kegan Myers fc5ebda7e3 Merge branch 'master' of 7 years ago
.gitignore initial commit 7 years ago Update 7 years ago
index.js lodash 7 years ago
package.json bump 7 years ago


A fairly common pattern is to use _ to map an array into promises, then to call Q.all on that array. This library takes that idea a little bit further and now allows you to map an object's values through promises.


var pmo = require("promise-map-object");

var a = {
  foo: { name: "asdf", age: {$gt: 13} },
  bar: { age: {$lte: 13} }

pmo(a, function(query) {
  return db(query); //some database query promise, or similar
}).then(function(mappedA) {
  console.log(mappedA); //res.json, or doing something else with it