A TOML parser for JavaScript/TypeScript, targeting TOML 1.0.0 Spec
npm install js-toml



A TOML parser for JavaScript and TypeScript. Fully tested and 100% compatible with the TOML v1.0.0 spec.
Support Node.js, browsers and Bun⚡️!
``bash`
npm install js-toml
or with yarn
`bash`
yarn add js-toml
or with pnpm
`bash`
pnpm add js-toml
even support bun!
`bash`
bun add js-toml
`typescript
import {load} from 'js-toml';
const toml =
title = "TOML Example"
[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00 # First class dates;
const data = load(toml);
console.log(data);
``
Parses a TOML string and returns a JavaScript object.
Under development.
MIT