hcl.js
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

hcl.js

Utilities to work with HCL files in JavaScript

const { hcl2json, treeSitterHcl } = require('hcl.js');
// https://github.com/tmccombs/hcl2json
hcl2json('a = 1').then(console.log); // { a: 1 }
// https://github.com/tree-sitter-grammars/tree-sitter-hcl
treeSitterHcl().then((parser) => {
  const tree = parser.parse('a = 1');
  console.log(tree.rootNode.toString());
});

Readme

Keywords

none

Package Sidebar

Install

npm i hcl.js

Weekly Downloads

10

Version

2.0.0

License

MIT

Unpacked Size

7.42 MB

Total Files

5

Last publish

Collaborators

  • sepehr-laal