Constructor
# new StringMapper(optionsopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object
|
<optional> |
options to initialize this string mapper |
Methods
# map(string) → {string|IString|undefined}
Map a string using the mapping defined in the constructor. This method iterates through all characters in the string and maps them one-by-one. If a particular character has a mapping, the mapping result will be added to the output. If there is no mapping, but there is a mapFunction defined, the mapFunction results will be added to the result. Otherwise, the original character from the input string will be added to the result.
Parameters:
Name | Type | Description |
---|---|---|
string |
string
|
IString
|
undefined
|