Promise.all(map(API.userByName, users))
.tap(function(users) {
req.log.info({ users: users });
})
Promise.all(map(API.userByName, users))
.tap(compose( req.log.info, createMapEntry('users') ))
// no go -- [TypeError: Object.keys called on non-object]
Promise.all(map(API.userByName, users))
.tap(compose( req.log.info.bind(req.log.info), createMapEntry('users') ))
// works but imo on the same level on ugly scale as the first one
Promise.all(map(API.userByName, users))
.tap(users => req.log.info({ users }))
// probably prefer this most but requires transpiler
would this work:
?
not much of an improvement, really 😺