MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / isTupleDataPoint

Function isTupleDataPoint

src/interaction/findCandlestick.ts:20–20  ·  view source on GitHub ↗
(p: OHLCDataPoint)

Source from the content-addressed store, hash-verified

18};
19
20const isTupleDataPoint = (p: OHLCDataPoint): p is OHLCDataPointTuple => Array.isArray(p);
21
22const getTimestamp = (p: OHLCDataPoint): number => (isTupleDataPoint(p) ? p[0] : p.timestamp);
23const getOpen = (p: OHLCDataPoint): number => (isTupleDataPoint(p) ? p[1] : p.open);

Callers 3

getTimestampFunction · 0.70
getOpenFunction · 0.70
getCloseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected