MCPcopy Index your code
hub / github.com/devongovett/dprint-node

github.com/devongovett/dprint-node @v1.0.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.8 ↗ · + Follow
3 symbols 3 edges 7 files 0 documented · 0% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dprint-node

A node API for the dprint TypeScript and JavaScript code formatter. It's written in Rust for blazing fast speed.

Usage

Pass a file path and the code to format to dprint.format.

const dprint = require('dprint-node');

dprint.format(filePath, code);

You can also optionally pass some configuration options as an object to the third parameter. All of the options listed here are supported.

dprint.format(filePath, code, {
  lineWidth: 100
});

Benchmark

$ node bench.js
#1 dprint: 12,173 opts/sec, ±17% (mean: 0.082ms, stddev: 0.051ms, 50 samples)
#2 prettier: 450 opts/sec, ±53% (mean: 2.222ms, stddev: 4.229ms, 50 samples)

Extension points exported contracts — how you extend this code

Options (Interface)
(no doc)
options.d.ts

Core symbols most depended-on inside this repo

main
called by 0
build.rs
format
called by 0
src/lib.rs

Shape

Function 2
Interface 1

Languages

Rust67%
TypeScript33%

Modules by API surface

src/lib.rs1 symbols
options.d.ts1 symbols
build.rs1 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add dprint-node \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact