MCPcopy
hub / github.com/serverless/serverless / formatLine

Function formatLine

packages/sf-core/src/lib/runners/compose/help.js:39–43  ·  view source on GitHub ↗

* Formats a command or option line with its description. * * @param {string} commandOrOption - The command or option. * @param {string} description - The description of the command or option. * @returns {string} - The formatted line.

(commandOrOption, description)

Source from the content-addressed store, hash-verified

37 * @returns {string} - The formatted line.
38 */
39function formatLine(commandOrOption, description) {
40 const indentFillLength = 45
41 const spacing = ' '.repeat(indentFillLength - commandOrOption.length)
42 return ` ${commandOrOption}${spacing}${style.aside(description)}`
43}
44
45/**
46 * Displays the help information for the Serverless Framework Compose.

Callers 1

help.jsFile · 0.85

Calls 1

asideMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…