# maml

> MAML parser

Latest version **1.0.1** (published 2026-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install maml
pnpm add maml
yarn add maml
bun add maml
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-06-11 |
| First published | 2016-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 32.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Anton Medvedev |
| Maintainers | medv |
| Keywords | maml, parser |

## Links

- npm: https://www.npmjs.com/package/maml
- Repository: https://github.com/maml-dev/maml.js
- Homepage: https://maml.dev
- Issues: https://github.com/maml-dev/maml.js/issues
- npm.io page: https://npm.io/package/maml

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

- 1.0.1 (latest) — 2026-06-11
- 1.0.0 — 2026-03-25
- 0.8.4 — 2023-03-02
- 0.8.3 — 2023-03-02
- 0.8.2 — 2023-03-02
- 0.8.1 — 2023-03-01
- 0.8.0 — 2023-03-01
- 0.7.0 — 2023-02-28
- 0.6.0 — 2023-02-28
- 0.5.1 — 2018-01-01
- 0.5.0 — 2018-01-01
- 0.4.5 — 2018-01-01
- 0.4.4 — 2018-01-01
- 0.4.3 — 2017-12-28
- 0.4.2 — 2017-12-28
- … 8 more at https://npm.io/package/maml/versions

## README

# maml

A tiny, modern, well‑tested implementation of the [MAML](https://maml.dev) data format for JavaScript/TypeScript.

- Spec‑accurate parser and pretty serializer
- Zero dependencies, ESM first
- 100% test coverage (statements, branches, lines) verified with Vitest + v8
- Works in Node.js, Deno, Bun and browsers
- Significantly faster than YAML or TOML alternatives, [up to 64x times](./BENCHMARK.md) 
- Only 2kB gzipped

## Installation

```
npm install maml
```

Or use the prebuilt bundle [`maml.min.js`](./build/maml.min.js).

## Usage

### Node.js, Deno, Bun

```ts
import { parse, stringify } from 'maml'

const data = parse(`{
  project: "MAML"
  tags: [
    "minimal"
    "readable"
  ]

  # A simple nested object
  spec: {
    version: 1
    author: "Anton Medvedev"
  }

  notes: """
This is a raw multiline string.
Keeps formatting as‑is.
"""
}`)

console.log(data.project) // "MAML"

const text = stringify({ foo: 'bar', list: [1, 2, 3] })
/*
{
  foo: "bar"
  list: [
    1
    2
    3
  ]
}
*/
```

### Browser

```html
<script src="maml.min.js"></script>
<script>
    const obj = MAML.parse('{ answer: 42 }')
    console.log(obj.answer)

    const text = MAML.stringify({ greeting: 'hello' })
    console.log(text)
</script>
```

## License

[MIT](LICENSE)

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