-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathjson5.javascript.txt
More file actions
21 lines (16 loc) · 912 Bytes
/
json5.javascript.txt
File metadata and controls
21 lines (16 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
┏━━━━━━━━━━━┓
┃ 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