Unwind
The unwind module copies deep objects to the first level.
What it does
If the original object is:
"first": "second": "third" : "data"
Unwind will return an object like:
"first": "second": "third" : "data" "second": "third" : "data" "third" : "data"
Why flatten it this way and not move everything to the first level?
Smalley.
We found use cases in which we wanted to preserve each attribute with its associated value, but needed each subsequent value to be accessible on the first level. In particular this improves validation checking withExamples
npm install -g unwind npm install --save unwind var unwind = yourObj = "first": "second": "data" unwind;
outputs
$meanMachine> first: second: data second: data