UNPKG
@kibibit/nconf-jsonc
Version:
latest (1.0.0)
1.0.0
Add support for json with comments files in nconf
github.com/Kibibit/nconf-jsonc
Kibibit/nconf-jsonc
@kibibit/nconf-jsonc
/
src
/
index.ts
12 lines
(9 loc)
•
247 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import
{ parse
as
jsoncParse, stringify
as
jsoncStrigify }
from
'comment-json'
;
export
function
stringify
(
obj
:
Record
<
string
,
any
>
) {
return
jsoncStrigify
(obj,
null
,
2
); }
export
function
parse
(
text
:
string
) {
return
jsoncParse
(text); }