MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / parseFormula

Function parseFormula

src/compute-engine/oeis.ts:95–99  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

93 .split(',')
94 .map((s) => Number.parseInt(s.trim(), 10))
95 .filter((n) => Number.isFinite(n));
96}
97
98function parseFormula(value: unknown): string | undefined {
99 if (!Array.isArray(value)) return undefined;
100 const first = value.find((v) => typeof v === 'string');
101 return typeof first === 'string' ? first : undefined;
102}

Callers 1

parseOEISResponseFunction · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected