A pure JavaScript HCL parser implementation
npm install hcl-parser-js!NPM Version
!NPM License
!GitHub Actions Workflow Status
A pure JavaScript HCL parser implementation that does not depends on transpiled go code.
It aiming to "parse" HCL code, not "evaluate" it which means that any function call or expressions are not evaluated.
``ts
import { parse } from "hcl-parser-js";
const hcl =
attr = "value";
const ast = parse(hcl);
`
`ts
import { parse } from "hcl-parser-js";
import { schema } from "hcl-parser-js/schema";
const hcl =
attr = "value";
const ast = parse(hcl);
const parsed = schema.parse(ast);
``