MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / prune

Function prune

packages/extension/utils/object.ts:43–45  ·  view source on GitHub ↗
(obj: T)

Source from the content-addressed store, hash-verified

41}
42
43export function prune<T extends object>(obj: T): Prune<T> extends never ? undefined : Prune<T> {
44 return pruneValue(obj, false) as Prune<T> extends never ? undefined : Prune<T>
45}
46
47function pruneValue(value: unknown, insideArray: boolean): unknown {
48 if (!isPlainObject(value) && !Array.isArray(value)) {

Callers 3

stringifyVueComponentFunction · 0.90
stringifyJSXComponentFunction · 0.90
object.test.tsFile · 0.90

Calls 1

pruneValueFunction · 0.85

Tested by

no test coverage detected