UNPKG
command-line-usage
Version:
latest (7.0.3)
7.0.3
7.0.2
7.0.1
7.0.0
7.0.0-beta.0
6.1.3
6.1.2
6.1.1
6.1.0
6.0.2
6.0.1
6.0.0
6.0.0-2
6.0.0-1
6.0.0-0
5.0.5
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0
4.1.0
4.1.0-1
4.1.0-0
4.0.2
4.0.1
4.0.0
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.0
1.0.0-2
1.0.0-1
1.0.0-0
Generates command-line usage information
github.com/75lb/command-line-usage
75lb/command-line-usage
command-line-usage
/
lib
/
chalk-format.js
13 lines
(10 loc)
•
240 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
import
chalkTemplate
from
'chalk-template'
function
chalkFormat
(
str
) {
if
(str) { str = str.
replace
(
/`/g
,
'\\`'
)
return
chalkTemplate
(
Object
.
assign
([], {
raw
: [str] })) }
else
{
return
''
} }
export
default
chalkFormat