MCPcopy Create free account
hub / github.com/apitable/apitable / handleNullArray

Function handleNullArray

packages/core/src/model/utils/index.ts:49–60  ·  view source on GitHub ↗
(cv: any | null)

Source from the content-addressed store, hash-verified

47 *
48 */
49export const handleNullArray = (cv: any | null): any | null => {
50 if (cv == null) {
51 return null;
52 }
53 if (Array.isArray(cv)) {
54 cv = cv.filter(v => v != null);
55 }
56 if (cv.length === 0) {
57 return null;
58 }
59 return cv;
60};
61
62/**
63 * Semantic null value to null

Callers 13

isEmptyOrNotMethod · 0.90
compareMethod · 0.90
isMeetFilterMethod · 0.90
cellValueToStdValueMethod · 0.90
handleLookupNullValueFunction · 0.90
PreviewFileModalFunction · 0.90
CellLookUpBaseFunction · 0.90
ExpandLookUpBaseFunction · 0.90
CellLookUpFunction · 0.90

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected