@tkint/hocon-parser
v0.0.0-alpha.0
Published
HOCON parser
Downloads
30
Readme
hocon-parser
Javascript library to parse HOCON (Human-Optimized Config Object Notation)
Usage
Browser
This library can be used as a ES module in compatible browsers :
<script type="module">
import { parseHocon } from 'https://unpkg.com/@tkint/hocon-parser?module';
const parsed = parseHocon('hello = "world"');
</script>
Take a look at the browser example for further details.
NPM
It can also be used in a node project :
npm install @tkint/hocon-parser
In a Node project, you can then use it as follow :
const { parseHocon } = require('@tkint/hocon-parser');
const parsed = parseHocon('hello = "world"');
Take a look at the node example for further details.
There is also a vue example with typescript support.
Features
Not everything is yet implemented, but I plan to do so. Here is the current state :
| Feature | Implemented | | ------- | ----------- | | String value | yes | | Number value | yes | | String concatenation | yes | | Boolean value | yes | | Object value | yes | | Array value | yes | | Null value | yes | | Object merge | no | | Substitution | partial | | Comments | yes |