Skip to content

Commit 80f9cd1

Browse files
committed
feat: add intAsString on zod
1 parent 5d0f321 commit 80f9cd1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/utils/zod.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
export { z } from 'zod'
1+
import { z as zod } from 'zod'
2+
3+
export const z = {
4+
...zod,
5+
intAsString: () => zod.string().transform(val => parseInt(val, 10))
6+
}

0 commit comments

Comments
 (0)