MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getVariance

Function getVariance

valdi/vscode_debugger/src/common/sourceUtils.ts:302–309  ·  view source on GitHub ↗
(position: sourceMap.NullablePosition)

Source from the content-addressed store, hash-verified

300 });
301
302 const getVariance = (position: sourceMap.NullablePosition) => {
303 if (position.line === null || position.column === null) {
304 return 10e10;
305 }
306
307 const original = map.originalPositionFor(position as sourceMap.Position);
308 return original.line !== null ? Math.abs(uiLocation.lineNumber - original.line) : 10e10;
309 };
310
311 const prevVariance = getVariance(prevLocation);
312 if (prevVariance === 0) {

Callers 1

Calls 1

originalPositionForMethod · 0.80

Tested by

no test coverage detected