.transform() - DarthJDG/Mangler.js GitHub Wiki
Transforms all items' property names between snake_case, camelCase and TitleCase.
.transform([options])| Parameter | Type | Default | Description |
|---|---|---|---|
| options | Object String |
An object with optional method modifiers, or a string to pass as the to option. |
Returns the mangler object itself for chaining.
| Property | Type | Default | Description |
|---|---|---|---|
| to | String | '_' |
The type of case to convert to:
|
| from | String | 'auto' |
In addition to 'auto', it can be any of the explicit source formats supported by Mangler.tokenize(). |
| ignore | String Array.String |
[] |
A string or array of strings to ignore and leave as is. |
Transforms all items in the mangler object using Mangler.transform() passing the options directly. See Mangler.transform() for more details and examples.