MCPcopy Index your code
hub / github.com/nodejs/node / fold

Function fold

lib/internal/main/print_help.js:92–98  ·  view source on GitHub ↗
(text, width)

Source from the content-addressed store, hash-verified

90}
91
92function fold(text, width) {
93 return RegExpPrototypeSymbolReplace(
94 new RegExp(`([^\n]{0,${width}})( |$)`, 'g'),
95 text,
96 (_, newLine, end) => newLine + (end === ' ' ? '\n' : ''),
97 );
98}
99
100function getArgDescription(type) {
101 switch (typeLookup[type]) {

Callers 1

formatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…