1.1.2 • Published 3 years ago
@prisma-fmt/fmt v1.1.2
@prisma-fmt/fmt
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.