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 |
---|---|---|---|
str Type: string Obligatory: yes | |||
str | string | yes | The input string we are operating on |
ranges Type: 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 |
cb Type: Something falsy or a function Obligatory: yes | |||
cb | Something falsy or a function | yes | Callback function to be able to consume the indexes and character values |
offset Type: 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
: