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

Function getTimestamp

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

Source from the content-addressed store, hash-verified

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);
24const getClose = (p: OHLCDataPoint): number => (isTupleDataPoint(p) ? p[2] : p.close);
25

Callers 5

computeCategoryStepFunction · 0.70
lowerBoundByTimestampFunction · 0.70
findCandlestickFunction · 0.70

Calls 1

isTupleDataPointFunction · 0.70

Tested by

no test coverage detected