MCPcopy Index your code
hub / github.com/microsoft/SandDance / detectSequentialColumn

Function detectSequentialColumn

packages/sanddance-specs/src/inference.ts:138–145  ·  view source on GitHub ↗
(column: Column, data: object[])

Source from the content-addressed store, hash-verified

136}
137
138function detectSequentialColumn(column: Column, data: object[]): boolean {
139 if (data.length < 2) return false;
140 const colname = column.name;
141 for (let i = 1; i < data.length; i++) {
142 if (data[i][colname] !== data[i - 1][colname] + 1) return false;
143 }
144 return true;
145}

Callers 1

getStatsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected