MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / flatternObject

Function flatternObject

web/pgadmin/static/js/SchemaView/common.js:115–124  ·  view source on GitHub ↗
(obj, base=[])

Source from the content-addressed store, hash-verified

113}
114
115export const flatternObject = (obj, base=[]) => Object.keys(obj).sort((a, b)=>a.localeCompare(b)).reduce(
116 (r, k) => {
117 r = r.concat(k);
118 const value = obj[k];
119 if (_.isFunction(value)) return r;
120 if (_.isArray(value)) return r.concat(...value);
121 if (_.isPlainObject(value)) return flatternObject(value, r);
122 return r.concat(value);
123 }, base
124);

Callers 1

CellFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected