function getUserInfo(cb) {
Promise.all([
api.getUser(),
api.getFriends(),
api.getPhoto(),
]).then(
([user, friends, photo]) =>
cb(null, {user, friends, photo}),
cb,
);
} function getUserInfo(cb) {
Promise.all([
api.getUser(),
api.getFriends(),
api.getPhoto(),
]).then(
([user, friends, photo]) =>
cb(null, {user, friends, photo}),
cb,
);
}I just prefer node style callbacks, so I wrap libraries with promise based APIs with callback based wrappers.
hopefully i'm not the only one.