https://github.com/zwave-js/fmt
Dprint wrapper to programmatically format source files in memory
https://github.com/zwave-js/fmt
Last synced: 3 months ago
JSON representation
Dprint wrapper to programmatically format source files in memory
- Host: GitHub
- URL: https://github.com/zwave-js/fmt
- Owner: zwave-js
- License: mit
- Created: 2023-08-23T10:04:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-27T10:40:32.000Z (4 months ago)
- Last Synced: 2026-01-27T22:44:34.418Z (4 months ago)
- Language: TypeScript
- Size: 983 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @zwave-js/fmt
[Dprint](https://dprint.dev) wrapper to programmatically format source files in memory.
This project is meant for internal use in the `node-zwave-js` project.
## Install
```sh
yarn add --dev @dprint/formatter @dprint/json @dprint/markdown @dprint/typescript @zwave-js/fmt
```
## Usage
```ts
import { formatWithDprint } from "@zwave-js/fmt";
const formatted = formatWithDprint(
"/path/to/repo/root",
"/path/to/repo/root/path/to/file.ts",
"const foo = 1 ",
);
console.log(formatted);
// prints:
// const foo = 1;
```
## Changelog
### 1.0.6 (2026-01-27)
- Dependency updates
### 1.0.5 (2025-10-22)
- Dependency updates