About the documentation - DarthJDG/Mangler.js GitHub Wiki
This section covers basics about the terminology used throughout this documentation and the coding style used in the examples.
Function and method syntax
When specifying function and method syntax, optional parameters are surrounded by square brackets:
Mangler.explore(iterable, callback[, state])
Variable types
The following variable types are used throughout this documentation:
Standard types
| Type | Description |
|---|---|
| Number | a positive or negative integer |
| Boolean | a boolean value, true or false |
| String | a standard JavaScript string |
| Object | a standard object literal, instance of Object |
| Array | a standard array, instance of Array |
| Array.Type | an array with items of a specific type. |
| Instance | an object instance, can be Object, Array or any object created by the new keyword |
| Function | a JavaScript function |
| RegExp | a regular expression object for matching strings |
| Any | literally anything |
Mangler.js specific
| Type | Description |
|---|---|
| Mangler | a mangler object, returned by Mangler() or its chainable methods |
| Iterable | an object instance which can be iterated using Mangler.each(), i.e. Object, Array or Mangler by default |
| Cloneable | an object instance which can be cloned using Mangler.clone(), i.e. Object, Array, Mangler or Date by default |
| Test | a test expression that can be evaluated by Mangler.test() |
Examples coding style
In many of the examples, the var keyword is omitted to shorten code and reduce clutter. You should always declare your variables properly in production code.