MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / computeHash

Function computeHash

packages/vite/hmr/server/websocket.ts:2252–2258  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

2250 return id;
2251 }
2252 function computeHash(content: string): string {
2253 let h = 0;
2254 for (let i = 0; i < content.length; i++) {
2255 h = (h * 31 + content.charCodeAt(i)) | 0;
2256 }
2257 return ('00000000' + (h >>> 0).toString(16)).slice(-8);
2258 }
2259 function fullGraphPayload() {
2260 return {
2261 type: 'ns:hmr-full-graph',

Callers 1

upsertGraphModuleFunction · 0.85

Calls 2

sliceMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected