MCPcopy
hub / github.com/usebruno/bruno / indentString

Function indentString

packages/bruno-lang/v2/src/utils.js:10–20  ·  view source on GitHub ↗
(str, levels = 1)

Source from the content-addressed store, hash-verified

8};
9
10const indentString = (str, levels = 1) => {
11 if (!str || !str.length) {
12 return str || '';
13 }
14
15 const indent = ' '.repeat(levels);
16 return str
17 .split(/\r\n|\r|\n/)
18 .map((line) => indent + line)
19 .join('\n');
20};
21
22const outdentString = (str, spaces = 2) => {
23 if (!str || !str.length) {

Callers 6

jsonToBruFunction · 0.70
jsonToCollectionBruFunction · 0.70
envToJsonFunction · 0.70
getValueStringFunction · 0.70
getValueUrlFunction · 0.70
serializeAnnotationsFunction · 0.70

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected