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

Function isTupleOHLCDataPoint

examples/candlestick-streaming/main.ts:63–65  ·  view source on GitHub ↗
(
  p: OHLCDataPoint
)

Source from the content-addressed store, hash-verified

61let lastSimPerfNow = performance.now();
62
63const isTupleOHLCDataPoint = (
64 p: OHLCDataPoint
65): p is readonly [timestamp: number, open: number, close: number, low: number, high: number] => Array.isArray(p);
66
67const getTimestamp = (p: OHLCDataPoint): number => (isTupleOHLCDataPoint(p) ? p[0] : p.timestamp);
68const getClose = (p: OHLCDataPoint): number => (isTupleOHLCDataPoint(p) ? p[2] : p.close);

Callers 2

getTimestampFunction · 0.70
getCloseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected