UNPKG
@dans98/prismabox
Version:
latest (2.3.0)
2.3.0
Typebox generator for prisma schema
github.com/m1212e/prismabox
@dans98/prismabox
/
src
/
format.ts
11 lines
(9 loc)
•
279 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
{ format
as
prettierFormat }
from
"prettier"
;
export
async
function
format
(
input: string
) {
try
{
return
await
prettierFormat
(input, {
parser
:
"typescript"
}); }
catch
(error) {
console
.
error
(
"Error formatting file"
, error);
return
input; } }