{"library":"hcl2-json-parser","type":"library","category":null,"description":"This library provides a JavaScript parser for HCL (HashiCorp Configuration Language) version 2 syntax. It is currently at version 1.0.1 and appears to be actively maintained, being an updated fork of an unmaintained predecessor (`hcl2-parser`). Its key differentiator is robust support for HCL v2, which many other JavaScript parsers lack. It achieves this by wrapping the Go-based `tmccombs/hcl2json` library, transpiling the Go code to JavaScript using GopherJS. Unlike its unmaintained predecessor, this version correctly returns parsing errors to the user by rejecting a Promise, making it more reliable for production use cases like parsing Terraform configurations.","language":"javascript","status":"active","version":"1.0.1","tags":["javascript","terraform","hcl","json","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install hcl2-json-parser","imports":["import { parseToString } from 'hcl2-json-parser'","import { parseToObject } from 'hcl2-json-parser'","const hcl = require('hcl2-json-parser')"]},{"cmd":"yarn add hcl2-json-parser","imports":[]},{"cmd":"pnpm add hcl2-json-parser","imports":[]}],"homepage":null,"github":"https://github.com/tyleraldrich/hcl2-parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/hcl2-json-parser","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/hcl2-json-parser/compatibility"}}