Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
comment for env toggles
Browse files Browse the repository at this point in the history
  • Loading branch information
syhner committed Oct 2, 2023
1 parent 7cb947c commit b3314e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
import { createEnv } from '@t3-oss/env-nextjs';
import { z } from 'zod';

/**
* Toggle environment variables
* 'true' or '1' will evaluate to true
* 'false' or '0' will evaluate to false
*/
const toggle = z
.enum(['true', 'false', '0', '1'])
.transform((v) => v === 'true' || v === '1');
Expand Down

0 comments on commit b3314e2

Please sign in to comment.