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

Function indentAll

packages/extension/utils/string.ts:71–76  ·  view source on GitHub ↗
(str: string, indent: string, skipFirst = false)

Source from the content-addressed store, hash-verified

69}
70
71export function indentAll(str: string, indent: string, skipFirst = false) {
72 return str
73 .split('\n')
74 .map((line, index) => (skipFirst && index === 0 ? '' : indent) + line)
75 .join('\n')
76}

Callers 2

stringifyBaseComponentFunction · 0.90
string.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected