@prisma-fmt/fmt
v1.1.2
Published
[![License][license_badge]][license] [![Actions][actions_badge]][actions] [![NPM][npm_badge]][npm] ![semantic-release][semantic_release_badge]
Readme
@prisma-fmt/fmt
Library that can be used to customized how to format the prisma schema files.
Getting Started
npm i @prisma-fmt/fmtimport { 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.
