MCPcopy Create free account
hub / github.com/CashScript/cashscript / canInline

Function canInline

packages/utils/src/artifact.ts:157–162  ·  view source on GitHub ↗
(container: any)

Source from the content-addressed store, hash-verified

155
156// A container can be inlined when none of its values are themselves a non-empty object or array
157function canInline(container: any): boolean {
158 const values = Array.isArray(container) ? container : Object.values(container);
159 return values.every((value) => (
160 value === undefined || value === null || typeof value !== 'object' || Object.keys(value).length === 0
161 ));
162}

Callers 2

formatArrayFunction · 0.85
formatObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected