JSPM

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

Wasm buffer for dprint-plugin-mago.

Package Exports

  • @dprint/mago
  • @dprint/mago/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/mago) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@dprint/mago

npm distribution of dprint-plugin-mago which is an adapter plugin for Mago.

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

Example

import { createFromBuffer } from "@dprint/formatter";
import { getBuffer } from "@dprint/mago";

const formatter = createFromBuffer(getBuffer());

console.log(
  formatter.formatText("test.php", "<?php\necho   '1'"),
);