.removeItem() - DarthJDG/Mangler.js GitHub Wiki
Removes an item from the mangler object.
.removeItem(item)| Parameter | Type | Default | Description |
|---|---|---|---|
| item | Any | Any item in the **[[.items[ ] |
Returns a reference to the mangler object itself for chaining.
You have to pass the actual item to remove:
m = Mangler(['A', 'B', 'C']);
m.removeItem('B');
/*
m.items = ['A', 'C']
*/To remove items by their index or a test expression, see .remove().