Skip to content

Commit

Permalink
feat: add intAsString on zod
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Feb 14, 2024
1 parent 5d0f321 commit 80f9cd1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/utils/zod.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export { z } from 'zod'
import { z as zod } from 'zod'

export const z = {
...zod,
intAsString: () => zod.string().transform(val => parseInt(val, 10))
}

0 comments on commit 80f9cd1

Please sign in to comment.