@envalid/strict
environment variables in Node/Bun/etc programs [!NOTE] envalid v9 is in beta!
Official Documentation ↗v9.0.0. Check the official docs for the latest API surface.Installation
npm install envalidpnpm add envalidyarn add envalidMethods
No methods match this filter.
Overview
environment variables in Node/Bun/etc programs [!NOTE] envalid v9 is in beta! - Type-safe: written completely in TypeScript, with great support for inference - Light: no dependencies!
API reference status
This page lists only entry points that appear verbatim in the official README examples: cleanEnv, customCleanEnv, email, json. Parameter and return types are not given by the official README, so signatures are marked unverified.
Errors
The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/af/envalid@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:24.689Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.
- By default, cleanEnv() will log an error message and exit (in Node) or throw (in browser) if any required env vars are missing or invalid. (https://cdn.jsdelivr.net/gh/af/envalid@latest/README.md)
- Error Reporting By default, if any required environment variables are missing or have invalid values, Envalid will log a message and call process.exit(1). (https://cdn.jsdelivr.net/gh/af/envalid@latest/README.md)
Security notes
Quoted verbatim from the official documentation; this is not a complete threat model. 来源:https://cdn.jsdelivr.net/gh/af/envalid@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:24.689Z.
- You can use this custom escape hatch to transform the output however you wish. (https://cdn.jsdelivr.net/gh/af/envalid@latest/README.md)
Verification notes
- Official source: https://github.com/af/envalid
- Evidence: https://cdn.jsdelivr.net/gh/af/envalid@latest/README.md
- Checked on 2026-11-04 by
scripts/phase11/build-api-profiles.mjs
FAQ
- What does envalid do?
- environment variables in Node/Bun/etc programs [!NOTE] envalid v9 is in beta!
- How do I install envalid?
- Run `npm install envalid`.
- Where can I verify the API details?
- Official repository/documentation: https://github.com/af/envalid. Checked on 2026-11-04; signatures and return values not stated in the official README are marked unverified.
Report a problem with this API docOpens a pre-filled issue on GitHub.