Skip to content

Commit a1c7015

Browse files
committed
Add utility commands
1 parent bab0818 commit a1c7015

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

bin/cli_commands.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
"path": "@stdlib/os/configdir",
3636
"group": "system"
3737
},
38+
{
39+
"command": "convert-path",
40+
"description": "Convert between Windows and POSIX paths.",
41+
"path": "@stdlib/utils/convert-path",
42+
"group": "utilities"
43+
},
3844
{
3945
"command": "cwd",
4046
"description": "Current working directory.",
@@ -365,6 +371,18 @@
365371
"path": "@stdlib/assert/is-whitespace",
366372
"group": "assert"
367373
},
374+
{
375+
"command": "js-eval",
376+
"description": "Evaluate a JavaScript string.",
377+
"path": "@stdlib/utils/js-eval",
378+
"group": "utilities"
379+
},
380+
{
381+
"command": "library-manifest",
382+
"description": "Load a manifest for compiling source files.",
383+
"path": "@stdlib/tools/library-manifest",
384+
"group": "meta"
385+
},
368386
{
369387
"command": "lpad",
370388
"description": "Left pad a string.",
@@ -431,12 +449,24 @@
431449
"path": "@stdlib/os/num-cpus",
432450
"group": "system"
433451
},
452+
{
453+
"command": "open-url",
454+
"description": "Open a URL.",
455+
"path": "@stdlib/utils/open-url",
456+
"group": "utilities"
457+
},
434458
{
435459
"command": "padstr",
436460
"description": "Pad a string.",
437461
"path": "@stdlib/string/pad",
438462
"group": "utilities"
439463
},
464+
{
465+
"command": "parallel",
466+
"description": "Execute scripts in parallel.",
467+
"path": "@stdlib/utils/parallel",
468+
"group": "utilities"
469+
},
440470
{
441471
"command": "percent-encode",
442472
"description": "Percent-encode a UTF-16 encoded string.",
@@ -473,6 +503,18 @@
473503
"path": "@stdlib/fs/read-file-list",
474504
"group": "filesystem"
475505
},
506+
{
507+
"command": "realmax",
508+
"description": "Maximum representable finite value.",
509+
"path": "@stdlib/utils/real-max",
510+
"group": "utilities"
511+
},
512+
{
513+
"command": "realmin",
514+
"description": "Minimum representable finite value.",
515+
"path": "@stdlib/utils/real-min",
516+
"group": "utilities"
517+
},
476518
{
477519
"command": "remove-first",
478520
"description": "Remove the first character in a string.",
@@ -551,6 +593,18 @@
551593
"path": "@stdlib/string/right-trim",
552594
"group": "utilities"
553595
},
596+
{
597+
"command": "safeintmax",
598+
"description": "Maximum representable safe integer value.",
599+
"path": "@stdlib/utils/safe-int-max",
600+
"group": "utilities"
601+
},
602+
{
603+
"command": "safeintmin",
604+
"description": "Minimum representable safe integer value.",
605+
"path": "@stdlib/utils/safe-int-min",
606+
"group": "utilities"
607+
},
554608
{
555609
"command": "seconds-in-month",
556610
"description": "Calculate the number of seconds in a month.",
@@ -563,6 +617,12 @@
563617
"path": "@stdlib/time/seconds-in-year",
564618
"group": "time"
565619
},
620+
{
621+
"command": "sizeof",
622+
"description": "Size (in bytes) of a numeric data type.",
623+
"path": "@stdlib/utils/size-of",
624+
"group": "utilities"
625+
},
566626
{
567627
"command": "sparkline",
568628
"description": "Plot a sparkline.",
@@ -581,6 +641,18 @@
581641
"path": "@stdlib/string/starts-with",
582642
"group": "utilities"
583643
},
644+
{
645+
"command": "temp-http-server",
646+
"description": "Create a temporary HTTP server.",
647+
"path": "@stdlib/tools/disposable-http-server",
648+
"group": "utilities"
649+
},
650+
{
651+
"command": "timeit",
652+
"description": "Time a JavaScript snippet.",
653+
"path": "@stdlib/utils/timeit",
654+
"group": "benchmarking"
655+
},
584656
{
585657
"command": "tmpdir",
586658
"description": "Directory path for storing temporary files.",
@@ -593,6 +665,18 @@
593665
"path": "@stdlib/string/trim",
594666
"group": "utilities"
595667
},
668+
{
669+
"command": "typemax",
670+
"description": "Maximum value for a numeric data type.",
671+
"path": "@stdlib/utils/type-max",
672+
"group": "utilities"
673+
},
674+
{
675+
"command": "typemin",
676+
"description": "Minimum value for a numeric data type.",
677+
"path": "@stdlib/utils/type-min",
678+
"group": "utilities"
679+
},
596680
{
597681
"command": "umask",
598682
"description": "Process mask.",

bin/usage.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Assert:
6060
Benchmarking:
6161

6262
bench Run JavaScript benchmark files.
63+
timeit Time a JavaScript snippet.
6364

6465
Filesystem:
6566

@@ -74,6 +75,7 @@ Filesystem:
7475

7576
Meta:
7677

78+
library-manifest Load a manifest for compiling source files.
7779
ls List stdlib package names.
7880
ls-tree Show stdlib package tree.
7981
node-version Node.js version.
@@ -117,13 +119,19 @@ Tools:
117119
Utilities:
118120

119121
capitalize Capitalize the first character in a string.
122+
convert-path Convert between Windows and POSIX paths.
120123
ends-with Test if a string ends with another string.
121124
from-code-point Create a string from code points.
125+
js-eval Evaluate a JavaScript string.
122126
lowercase Lowercase a string.
123127
lpad Left pad a string.
124128
ltrim Left trim a string.
129+
open-url Open a URL.
125130
padstr Pad a string.
131+
parallel Execute scripts in parallel.
126132
percent-encode Percent-encode a UTF-16 encoded string.
133+
realmax Maximum representable finite value.
134+
realmin Minimum representable finite value.
127135
remove-first Remove the first character in a string.
128136
remove-last Remove the last character in a string.
129137
remove-punctuation Remove punctuation characters from a string.
@@ -134,9 +142,15 @@ Utilities:
134142
reverse Reverse a string.
135143
rpad Right pad a string.
136144
rtrim Right trim a string.
145+
safeintmax Maximum representable safe integer value.
146+
safeintmin Minimum representable safe integer value.
147+
sizeof Size (in bytes) of a numeric data type.
137148
startcase Capitalize each word in a string.
138149
starts-with Test if a string starts with another string.
150+
temp-http-server Create a temporary HTTP server.
139151
trim Trim a string.
152+
typemax Maximum value for a numeric data type.
153+
typemin Minimum value for a numeric data type.
140154
uncapitalize Uncapitalize a string.
141155
uppercase Uppercase a string.
142156

0 commit comments

Comments
 (0)