-
Notifications
You must be signed in to change notification settings - Fork 16
/
pretty-ms.node.txt
48 lines (37 loc) · 3.21 KB
/
pretty-ms.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
PRETTY-MS
ALTERNATIVES ==> # - pretty-ms (preferred):
# - parsing+serializing
# - min nanoseconds
# - featureful
# - ms:
# - parsing+serializing
# - min milliseconds
# - pretty-hrtime:
# - parsing only
# - min nanoseconds
# - only on process.hrtime()
# - pretty-time:
# - parsing only
# - min nanoseconds
# - only on process.hrtime()
VERSION ==> #9.0.0
prettyMs(NUM|BIGINT[, OPTS])->STR #'NUMy NUMd NUMh NUMm NUM.NUM2s'
#Do not show units with 0
OPTS.verbose #BOOL (def: false). E.g. 'NUM years' instead of 'NUMy'
OPTS.colonNotation #BOOL (def: false). NUM:NUM:NUM:NUM:NUM:NUM[.NUM2]
#Each field is 0-padded
#Sets OPTS.compact|formatSubMilliseconds|separateMilliseconds|verbose false
OPTS.compact #BOOL (def: false). Single NUMx
#Sets OPTS.unitCount 1 and OPTS.[milli]secondsDecimalDigits 0
OPTS.unitCount #NUM (def: all) of NUMs to show
OPTS.separateMilliseconds #BOOL (def: true if there are ms). '... NUMs NUM.NUM2ms'
OPTS.formatSubMilliseconds #BOOL (def: false). '... NUMs NUMms NUMµs NUMns'
OPTS.[milli]secondsDecimalDigits #NUM (def: 1 for s, 0 for ms) of decimals in NUM.NUM2[m]s to keep
OPTS.keepDecimalsOnWholeSeconds #BOOL (def: false). Keep decimals in NUM.NUM2s even if only 0s. For padding
pretty-ms [NUM] #Package `pretty-ms-cli`, version 2.0.0
#Def NUM: stdin
--verbose|-v #
--compact|-c #
--sec-decimal-digits|-d NUM #