UNPKG
aijinkela-wechaty
Version:
latest (1.20.2)
next (1.20.2)
1.20.2
Wechaty is a RPA SDK for Chatbot Makers.
github.com/wechaty/
wechaty/wechaty
aijinkela-wechaty
/
bin
/
clean-json.js
16 lines
(11 loc)
•
254 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env node
import
fs
from
'fs'
import
JSON
5
from
'json5'
const
file = process.
argv
[
2
]
// console.error('Converting file: ', file)
const
json =
JSON
5.
parse
( fs.
readFileSync
(file,
'utf8'
) )
console
.
info
(
JSON
.
stringify
(json,
null
,
' '
) )