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

Function parseComments

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

Source from the content-addressed store, hash-verified

99 if (!Array.isArray(value)) return undefined;
100 const first = value.find((v) => typeof v === 'string');
101 return typeof first === 'string' ? first : undefined;
102}
103
104function parseFormulaLines(value: unknown): string[] | undefined {
105 if (!Array.isArray(value)) return undefined;
106 const lines = value.filter((v): v is string => typeof v === 'string');
107 return lines.length > 0 ? lines : undefined;
108}
109
110function parseComments(value: unknown): string[] | undefined {
111 if (typeof value === 'string') return [value];

Callers 1

parseOEISResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected