0.0.6 • Published 11 months ago

env-typesafe v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

env-typesafe

Watch the video on imgur

Type safe package for managing environment variables.

Instalation

npm install env-typesafe

Usage

import {loadEnv} from "env-typesafe";

import {CustomEnv} from "./env.ts"

const env: CustomEnv = loadEnv(merge)

console.log(env.SECRET_KEY)
  • merge - if true, it will merge process.env with .env file

Important

  • To see actual types, you will need run your code once. After that your types will be generated. You can use it in your code. Even without generating types, this package will work.
  • File will be generated in the root folder as the env.ts

Authors

🔗 Links

portfolio

Badges

Add badges from somewhere like: shields.io

MIT License

GitHub Sponsors

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago

0.0.0

11 months ago