-
Notifications
You must be signed in to change notification settings - Fork 16
/
json5.javascript.txt
23 lines (16 loc) · 1.75 KB
/
json5.javascript.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
JSON5
VERSION ==> #2.2.3
#For Node.js, browser, CLI
JSON5.parse(...) #Like JSON.parse|stringify(...) but for JSON5
JSON5.stringify(...) #Can use both toJSON() and toJSON5()
JSON5.stringify(VAL, OPTS) #Same but using OPTS.replacer|space and also OPTS:
# - quote STR (def: ' preferred unless value contains ')
json5 [FILE...] #Does JSON.stringify(JSON5.parse(FILE)) conversion of FILE (def: stdin) (JSON5) to stdout (JSON)
-o FILE2
--out-file FILE2 #
-s NUM|t
--space NUM|t #OPTS.space
-v
--validate #Dry-run