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

Function wordAt

packages/service-worker/cli/sha1.ts:143–155  ·  view source on GitHub ↗
(str: string | Uint8Array, index: number, endian: Endian)

Source from the content-addressed store, hash-verified

141}
142
143function wordAt(str: string | Uint8Array, index: number, endian: Endian): number {
144 let word = 0;
145 if (endian === Endian.Big) {
146 for (let i = 0; i < 4; i++) {
147 word += byteAt(str, index + i) << (24 - 8 * i);
148 }
149 } else {
150 for (let i = 0; i < 4; i++) {
151 word += byteAt(str, index + i) << (8 * i);
152 }
153 }
154 return word;
155}
156
157function words32ToByteString(words32: number[]): string {
158 return words32.reduce((str, word) => str + word32ToByteString(word), '');

Callers 2

stringToWords32Function · 0.70
arrayBufferToWords32Function · 0.70

Calls 1

byteAtFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…