Skip to content

MoltData Transformation Stack

High-performance data transformation for JSON, YAML, TOML, INI, CSV, XML, MessagePack, and TOON

Molt

Why Choose Molt? โ€‹

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.

๐Ÿ† Performance Leaders โ€‹

  • molt-yaml: Dominates YAML parsing (2-415x faster)
  • molt-toml: Clear TOML performance winner (2-9x faster)
  • molt-json: Best-in-class JSON serialization (1.7-2.3x faster)
  • molt-ini: Fast INI configuration (2-3x faster)
  • molt-csv: Highly competitive CSV parsing (top-tier performance)
  • molt-xml: Matches fastest parsers with unique dirty XML support
  • molt-msgpack: Competitive binary format (20-50% smaller than JSON)
  • molt-toon: LLM-optimized format (30-60% token savings)

๐Ÿš€ Get Started in Seconds โ€‹

Install individual packages for only what you need:

bash
# 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/molt

๐Ÿ’ช Production Ready โ€‹

  • 120+ comprehensive test cases per package
  • Type-safe TypeScript APIs with strict mode
  • Streaming support for large files
  • Schema validation (Zod, JSON Schema)
  • Battle-tested by real-world applications

Quick Examples โ€‹

JSON with Type Preservation โ€‹

typescript
import { 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  // true

YAML Ultra-Fast โ€‹

typescript
import { parse, stringify } from '@sylphx/molt-yaml'

const config = parse(`
  database:
    host: localhost
    port: 5432
    credentials:
      username: admin
      password: secret
`)

console.log(stringify(config))

TOML Configuration โ€‹

typescript
import { parse } from '@sylphx/molt-toml'

const toml = parse(`
[package]
name = "my-app"
version = "1.0.0"

[dependencies]
react = "^18.0.0"
`)

CSV Data Processing โ€‹

typescript
import { parse, stringify } from '@sylphx/molt-csv'

const records = parse(`
name,age,city
Alice,30,New York
Bob,25,San Francisco
`)

stringify(records)

INI Configuration โ€‹

typescript
import { molt } from '@sylphx/molt-ini'

const config = molt(`
[database]
host = localhost
port = 5432

[server]
timeout = 30
`)

console.log(config.database.port) // 5432

MessagePack Binary โ€‹

typescript
import { 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)

TOON for LLMs โ€‹

typescript
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

All Packages โ€‹

PackagePurposePerformanceKey Features
@sylphx/molt-jsonJSON with types1.7-2.5x fasterType preservation, dirty JSON support
@sylphx/molt-yamlYAML parsing2-415x fasterFull YAML 1.2, anchors, multi-doc
@sylphx/molt-tomlTOML config2-9x fasterNested tables, arrays, type-safe
@sylphx/molt-iniINI config2-3x fasterGit/PHP/Windows INI compatible
@sylphx/molt-csvCSV dataTop-tierType detection, WASM acceleration
@sylphx/molt-xmlXML parsingMatches fastestDirty XML cleaning, namespace support
@sylphx/molt-msgpackBinary formatCompetitive20-50% smaller, full type support
@sylphx/molt-toonLLM-optimized30-60% tokensTable format, minimal quoting

Documentation โ€‹

Contributing โ€‹

We welcome contributions! Check out our Contributing Guide for details on how to help.

License โ€‹

MIT ยฉ Sylphx


Built with โค๏ธ for performance

Released under the MIT License.