You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.
We could do with a generic pluck util in @timberio/tools which lets us request a 'path' of deeply nested object keys, and returns just those keys in a new object - which we can then attach along with the request.
A common requirement for building logging plugins is pulling context from the environment, for attaching along with the log.
An example is a Koa request, a sample of which could look like this...
We could do with a generic
pluck
util in@timberio/tools
which lets us request a 'path' of deeply nested object keys, and returns just those keys in a new object - which we can then attach along with the request.For example, given the `ctx above...
... we'd get back this:
There are utils that already get close to this - object-path, Rambd's path, etc - but all the tools I've seen return only single values.
Instead, we want the full, original object path, returned as a new object.
It'd also be nice to avoid using a large library like lodash / Ram(b)da, and have our own minimal function.
@aks- -- this is a good one for you.
The text was updated successfully, but these errors were encountered: