hcl-parser-js
v0.0.4
Published
A pure JavaScript HCL parser implementation
Downloads
307
Readme
hcl-js-parser
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.
Usage
import { parse } from "hcl-parser-js";
const hcl = `
attr = "value"
`;
const ast = parse(hcl);Zod Schema
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);