Skip to content

Latest commit

 

History

History
81 lines (47 loc) · 1.28 KB

withUsageExtensions.md

File metadata and controls

81 lines (47 loc) · 1.28 KB

@black-flag/extensions


@black-flag/extensions / index / withUsageExtensions

Function: withUsageExtensions()

withUsageExtensions(altDescription, __namedParameters): string

Defined in: packages/extensions/src/index.ts:1336

Generate command usage text consistently yet flexibly.

Defaults to: Usage: $000\n\n${altDescription} where altDescription is $1.

Parameters

Altdescription

string = '$1.'

__namedparameters

Appendperiod?

boolean = true

Whether a period will be appended to the resultant string or not. A period is only appended if one is not already appended.

Default

true

Includeoptions?

boolean = prependNewlines

Whether the string ' [...options]' will be appended to the first line of usage text

Default

options.prependNewlines

Prependnewlines?

boolean = true

Whether newlines will be prepended to altDescription or not.

Default

true

Trim?

boolean = true

Whether altDescription will be trim()'d or not.

Default

true

Returns

string