Methods
(static) charCodeMap(str) → {object}
Return an object mapping characters to their respective codes.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | a string of characters |
Returns:
an object with keys as single characters and values as
their character code
- Type
- object
(static) getNextNewline(pos, chunk) → {number}
Return position of next newline in a binary chunk starting from pos.
Parameters:
Name | Type | Description |
---|---|---|
pos |
number | the start position |
chunk |
object | binary object emitted from stream |
Returns:
Index of the next newline from pos.
- Type
- number