HCL v2 Parser for JavaScript
JSON →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.
Traffic · last 30 days ↑25% vs prev 7d
top countries 🇺🇸 United States · 🇳🇴 Norway · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France