.inflate() - DarthJDG/Mangler.js GitHub Wiki

Turns flat objects into nested objects and arrays.

.inflate([options])
Parameter Type Default Description
options Object An object containing optional method modifiers.

Returns

Returns the mangler object itself for chaining.

Options

Property Type Default Description
limit Number 0 Limits the depth of processing. Defaults to 0 to completely inflate the objects.
transform String '_' Any transformation supported by the to option of Mangler.transform() to change the case of the inflated property names to. Defaults to snake_case.
from String '_' Any transformation supported by Mangler.tokenize() to split the property names into tokens. Defaults to snake_case.

The .inflate() method inflates all objects in the .items[ ] array by calling Mangler.inflate() on each of them. Unless the mangler object is cloned, it will change the original data.

For more details, see the Mangler.inflate() utility function.

⚠️ **GitHub.com Fallback** ⚠️