(str: string | Uint8Array, index: number)
| 133 | } |
| 134 | |
| 135 | function byteAt(str: string | Uint8Array, index: number): number { |
| 136 | if (typeof str === 'string') { |
| 137 | return index >= str.length ? 0 : str.charCodeAt(index) & 0xff; |
| 138 | } else { |
| 139 | return index >= str.byteLength ? 0 : str[index] & 0xff; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | function wordAt(str: string | Uint8Array, index: number, endian: Endian): number { |
| 144 | let word = 0; |
no outgoing calls
no test coverage detected
searching dependent graphs…