Performance
415x faster YAML, 9x faster TOML, 2.5x faster JSON. Built for speed with Rust + WASM acceleration.
High-performance data transformation for JSON, YAML, TOML, INI, CSV, XML, MessagePack, and TOON
Molt is a comprehensive data transformation stack built for performance-critical applications. Each package is optimized for real-world use cases with battle-tested algorithms and zero compromise on reliability.
Install individual packages for only what you need:
# JSON transformation
npm install @sylphx/molt-json
# YAML processing
npm install @sylphx/molt-yaml
# TOML configuration
npm install @sylphx/molt-toml
# INI configuration
npm install @sylphx/molt-ini
# CSV data handling
npm install @sylphx/molt-csv
# XML parsing
npm install @sylphx/molt-xml
# MessagePack binary format
npm install @sylphx/molt-msgpack
# TOON (LLM-optimized)
npm install @sylphx/molt-toon
# Or install all formats
npm install @sylphx/moltimport { molt } from '@sylphx/molt-json'
const data = molt(`{
user: 'alice',
joined: new Date(),
settings: new Map([['theme', 'dark']])
}`)
// Types are preserved!
data.joined instanceof Date // trueimport { parse, stringify } from '@sylphx/molt-yaml'
const config = parse(`
database:
host: localhost
port: 5432
credentials:
username: admin
password: secret
`)
console.log(stringify(config))import { parse } from '@sylphx/molt-toml'
const toml = parse(`
[package]
name = "my-app"
version = "1.0.0"
[dependencies]
react = "^18.0.0"
`)import { parse, stringify } from '@sylphx/molt-csv'
const records = parse(`
name,age,city
Alice,30,New York
Bob,25,San Francisco
`)
stringify(records)import { molt } from '@sylphx/molt-ini'
const config = molt(`
[database]
host = localhost
port = 5432
[server]
timeout = 30
`)
console.log(config.database.port) // 5432import { encode, decode } from '@sylphx/molt-msgpack'
const data = { user: 'alice', score: 9999 }
// Encode to binary (20-50% smaller than JSON)
const binary = encode(data)
// Decode back to JavaScript
const restored = decode(binary)import { stringify } from '@sylphx/molt-toon'
const data = {
users: [
{ id: 1, name: 'Alice', role: 'admin' },
{ id: 2, name: 'Bob', role: 'user' }
]
}
// 30-60% fewer tokens!
console.log(stringify(data))
// Output:
// users:
// id | name | role
// 1 | Alice | admin
// 2 | Bob | user| Package | Purpose | Performance | Key Features |
|---|---|---|---|
| @sylphx/molt-json | JSON with types | 1.7-2.5x faster | Type preservation, dirty JSON support |
| @sylphx/molt-yaml | YAML parsing | 2-415x faster | Full YAML 1.2, anchors, multi-doc |
| @sylphx/molt-toml | TOML config | 2-9x faster | Nested tables, arrays, type-safe |
| @sylphx/molt-ini | INI config | 2-3x faster | Git/PHP/Windows INI compatible |
| @sylphx/molt-csv | CSV data | Top-tier | Type detection, WASM acceleration |
| @sylphx/molt-xml | XML parsing | Matches fastest | Dirty XML cleaning, namespace support |
| @sylphx/molt-msgpack | Binary format | Competitive | 20-50% smaller, full type support |
| @sylphx/molt-toon | LLM-optimized | 30-60% tokens | Table format, minimal quoting |
We welcome contributions! Check out our Contributing Guide for details on how to help.
MIT ยฉ Sylphx
Built with โค๏ธ for performance