Function: generateSnippetHash()
function generateSnippetHash(
file,
line,
options): Promise<SnippetHashResult>;
Defined in: packages/uimatch-selector-anchors/src/hashing/snippet-hash.ts:160
Generate a hash of code snippet surrounding a target location
This is used to detect if code has moved (line number changed but content is same)
Parameters
file
string
Relative or absolute path to source file
line
number
Target line number (1-indexed)
options
SnippetHashOptions = {}
Configuration options
Returns
Promise<SnippetHashResult>
Snippet hash result
Throws
Error if file doesn't exist or line number is invalid