MCPcopy Create free account
hub / github.com/zxlie/FeHelper / toCellValue

Function toCellValue

apps/json-format/table-utils.js:5–16  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

3}
4
5function toCellValue(value) {
6 if (value === null || value === undefined) return '';
7 if (typeof value === 'string') return value;
8 if (typeof value === 'number' || typeof value === 'boolean' || typeof value === 'bigint') {
9 return String(value);
10 }
11 try {
12 return JSON.stringify(value);
13 } catch (_) {
14 return String(value);
15 }
16}
17
18function getArrayObjectCandidates(input) {
19 const candidates = [];

Callers 2

buildRowsFromObjectsFunction · 0.85
buildKeyValueRowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected