JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 71746
  • Score
    100M100P100Q166012F
  • License MIT

Wasm module for dprint-plugin-toml.

Package Exports

  • @dprint/toml
  • @dprint/toml/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dprint/toml) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@dprint/toml

npm distribution of dprint-plugin-toml.

Use this with @dprint/formatter or just use @dprint/formatter and download the dprint-plugin-toml Wasm file.

Example

import { createFromBuffer } from "@dprint/formatter";
import { getPath } from "@dprint/toml";
import * as fs from "fs";

const buffer = fs.readFileSync(getPath());
const formatter = createFromBuffer(buffer);

console.log(formatter.formatText("test.toml", "key   =   5"));