1.1.2 • Published 3 years ago

@prisma-fmt/fmt v1.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

@prisma-fmt/fmt

License Actions NPM semantic-release

Library that can be used to customized how to format the prisma schema files.

Getting Started

npm i @prisma-fmt/fmt
import { formatPrisma } from "@prisma-fmt/fmt";

const model = (input) => input.toUpperCase();
const field = (input) => input.toUpperCase();
const result = formatPrisma(content, { transform: { model, field } });

Both model and field are transformation functions for model names and field names respectively. Note that you need to handle [] for array and ? for optional values.

Please refer to @prisma-fmt/cli for an example.