@aduh95/toml2json
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

toml2json

Parses TOML documents and outputs JSON.

Usage

import { toml2json } from "@aduh95/toml2json";

console.log(
  toml2json(`
[package]
name = "@aduh95/toml2json"
version = "0.1.0"

[dependencies]
serde-transcode = "1.1.0"
serde_json = "1.0.40"
toml = "0.5.3"
wasm-bindgen = "0.2"
`)
);

This outputs:

{
  "dependencies": {
    "serde-transcode": "1.1.0",
    "serde_json": "1.0.40",
    "toml": "0.5.3",
    "wasm-bindgen": "0.2"
  },
  "package": {
    "name": "@aduh95/toml2json",
    "version": "0.1.0"
  }
}

Build

You need NodeJS and wasm-pack.

$ npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i @aduh95/toml2json

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

196 kB

Total Files

6

Last publish

Collaborators

  • aduh95