Installation
Quick Take
API — rIterate()
The main function rIterate() is imported like this:
It’s a function which takes four input arguments:
| Input argument | Type | Obligatory | Description |
|---|---|---|---|
strType: stringObligatory: yes | |||
str | string | yes | The input string we are operating on |
rangesType: null or array of zero or more arrays (ranges)Obligatory: yes | |||
ranges | null or array of zero or more arrays (ranges) | yes | The ranges gathered so far |
cbType: Something falsy or a functionObligatory: yes | |||
cb | Something falsy or a function | yes | Callback function to be able to consume the indexes and character values |
offsetType: String index, a natural number Obligatory: no | |||
offset | String index, a natural number | no | Similar to second argument of String.prototype.indexOf(), start to process the string only after this position |
It’s a callback-based API so the function returns undefined.
API — version
You can import version: