UNPKG
@kibibit/nconf-hjson
Version:
beta (1.0.0-beta.1)
latest (1.0.0)
1.0.0
1.0.0-beta.1
Add support for json with comments files in nconf
github.com/Kibibit/nconf-hjson
Kibibit/nconf-hjson
@kibibit/nconf-hjson
/
src
/
index.ts
15 lines
(12 loc)
•
270 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { parse
as
hjsonParse, stringify
as
hjsonStrigify }
from
'hjson'
; export
function
stringify
(
obj: Record<
string
, any>
)
{
return
hjsonStrigify
(obj, {
quotes
:
'min'
,
space
:
2
}); } export
function
parse
(
text:
string
)
{
return
hjsonParse
(text); }