Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-hcl-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-hcl-parser

Fully working version of HCL <> JSON parser for Javascript.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

js-hcl-parser

Overview

This package is used to generate Javascript parser for HCL (HashiCorp Configuration Language) from official repository https://github.com/hashicorp/hcl

Installing

$ npm install js-hcl-parser

Usage

See complete example under examples

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))

Building

$ go get -u github.com/hashicorp/hcl
$ go get -u github.com/gopherjs/gopherjs
$ gopherjs build . -o dist/hcl.js -m

Testing

$ go test ./test
$ npm test

Contributing

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

License

js-hcl-parser is released under the MIT license.

Keywords

FAQs

Package last updated on 31 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc