MCPcopy
hub / github.com/codeaashu/claude-code / hashPair

Function hashPair

src/utils/hash.ts:34–46  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

32 * ("ts","code") vs ("tsc","ode") so no separator is needed under Bun.
33 */
34export function hashPair(a: string, b: string): string {
35 if (typeof Bun !== 'undefined') {
36 return Bun.hash(b, Bun.hash(a)).toString()
37 }
38 // eslint-disable-next-line @typescript-eslint/no-require-imports
39 const crypto = require('crypto') as typeof import('crypto')
40 return crypto
41 .createHash('sha256')
42 .update(a)
43 .update('\0')
44 .update(b)
45 .digest('hex')
46}
47

Callers 1

cachedHighlightFunction · 0.85

Calls 2

toStringMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected