Fully working version of HCL <> JSON parser for Javascript.
npm install js-hcl-parserThis package is used to generate Javascript parser for HCL (HashiCorp Configuration Language) from official repository https://github.com/hashicorp/hcl
``sh`
$ npm install js-hcl-parser
See complete example under examples
`js
var HCL = require("js-hcl-parser")
const hclInput =
scale {
from = 72
to = 24
}
const jsonInput =
{
"scale": {
"from": 72,
"to": 72
}
}
console.log(HCL.parse(hclInput))
console.log(HCL.stringify(jsonInput))
`
`sh`
$ go get -u github.com/hashicorp/hcl
$ go get -u github.com/gopherjs/gopherjs
$ gopherjs build . -o dist/hcl.js -m
`sh`
$ go test ./test
`js``
$ npm test
I :heart: Open source!
Follow github guides for forking a project
Follow github guides for contributing open source
Squash pull request into a single commit
js-hcl-parser is released under the MIT license.