MCPcopy Create free account
hub / github.com/subquery/subql / toString

Function toString

packages/cli/src/utils/jsonToTable.ts:12–20  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

10 const keys = Array.from(new Set(input.flatMap((item) => Object.keys(item))));
11
12 const toString = (value: any): string => {
13 if (value instanceof Date) {
14 return value.toLocaleString();
15 }
16 if (typeof value === 'object') {
17 return JSON.stringify(value);
18 }
19 return String(value);
20 };
21
22 if (keys.length === 0) {
23 return '';

Callers 1

jsonToTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected