MCPcopy Index your code
hub / github.com/angular/angular / byteAt

Function byteAt

packages/service-worker/worker/src/sha1.ts:135–141  ·  view source on GitHub ↗
(str: string | Uint8Array, index: number)

Source from the content-addressed store, hash-verified

133}
134
135function 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
143function wordAt(str: string | Uint8Array, index: number, endian: Endian): number {
144 let word = 0;

Callers 3

wordAtFunction · 0.70
byteStringToHexStringFunction · 0.70
byteStringToDecStringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…