One INI
The core implementation of an AST based, idiomatic INI parser which aims to provide an easy to implement and consistent INI-standard.
This reference implementation is provided as Rust-library and WASM-package.
The work on this project started with the search for an universal parser for the EditorConfig INI file format specification.
WASM
To use from Web Assembly, compile with:
wasm-pack build --release --target nodejs
and run the (limited) WASM tests with:
wasm-pack test --node
You can call the generated JS wrapper with either:
import { parse_to_json } from './pkg/one_ini.js'
const results = parse_to_json(`
root = true
[*]
# always use unix line endings
end_of_line = lf
`)
or:
import { parse_to_uint32array, TokenTypes } from './pkg/editorconfig_ini.js'
const buf = Buffer.from(`
root = true
[*]
# always use unix line endings
end_of_line = lf
`, 'utf8')
const ary = parse_to_uint32array(buf)