MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / shortHash

Function shortHash

packages/vite/hmr/frameworks/vue/server/strategy.ts:32–36  ·  view source on GitHub ↗
(value: string, helpers?: FrameworkProcessFileContext['helpers'])

Source from the content-addressed store, hash-verified

30}
31
32function shortHash(value: string, helpers?: FrameworkProcessFileContext['helpers']): string {
33 const fromHelper = helpers?.createHash?.(value);
34 const base = fromHelper || createHash('md5').update(value).digest('hex');
35 return base.slice(0, 8);
36}
37
38function normalizeDep(dep: string): string {
39 return dep.replace(PAT.QUERY_PATTERN, '');

Callers 2

processVueSfcFunction · 0.85
buildAndSendRegistryFunction · 0.85

Calls 3

digestMethod · 0.45
updateMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected