# @one-ini/wasm

> Parse EditorConfig-INI file contents into AST

Latest version **0.2.1** (published 2026-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @one-ini/wasm
pnpm add @one-ini/wasm
yarn add @one-ini/wasm
bun add @one-ini/wasm
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; has provenance.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2026-02-23 |
| First published | 2022-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 100.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2 |
| Maintainers | florianb, hildjj |
| Keywords | editorconfig, ini, parser, ast |

## Links

- npm: https://www.npmjs.com/package/@one-ini/wasm
- Repository: https://github.com/one-ini/core
- Homepage: https://github.com/one-ini/core#readme
- Issues: https://github.com/one-ini/core/issues
- npm.io page: https://npm.io/package/@one-ini/wasm

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2026-02-23
- 0.2.0 — 2025-02-06
- 0.1.3 — 2025-02-05
- 0.1.2 — 2024-11-08
- 0.1.1 — 2022-10-25
- 0.1.0 — 2022-10-06

## README

# 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.

<!-- markdownlint-disable -->

[![GitHub Actions](https://github.com/jedmao/editorconfig-ini/workflows/Rust/badge.svg?event=push)](https://github.com/jedmao/editorconfig-ini/actions)

<!-- markdownlint-restore -->

<!-- markdownlint-disable commands-show-output -->

The work on this project started with the search for an universal parser for the [EditorConfig INI file format specification](https://spec.editorconfig.org/#file-format).

## WASM

To use from [Web Assembly](https://webassembly.org/), compile with:

```sh
wasm-pack build --release --target nodejs
```

and run the (limited) WASM tests with:

```sh
wasm-pack test --node
```

You can call the generated JS wrapper with either:

```js
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
`)

// {
//   "version": "0.1.0",
//   "body": [
//     { "type": "Pair", "key": "root", "value": "true" },
//     {
//       "type": "Section",
//       "name": "*",
//       "body": [
//         { "type": "Comment", "indicator": "#", "value": "always use unix line endings" },
//         { "type": "Pair", "key": "end_of_line", "value": "lf" }
//       ]
//     }
//   ]
// }
```

or:

```js
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)

// Array with token type, start byte offset, end byte offset for each token
// Uint32Array(21) [
//   TokenTypes.Key, 1, 5,
//   TokenTypes.Value, 8, 12,
//   TokenTypes.Section, 15, 16,
//   TokenTypes.CommentIndicator, 18, 19,
//   TokenTypes.CommentValue, 20, 48,
//   TokenTypes.Key, 49, 60,
//   TokenTypes.Value, 63, 65
// ]
```

---
_Source: https://npm.io/package/@one-ini/wasm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
