{"_id":"@chabdulwahab/env-ok","_rev":"3-2e0e4e50a41f4d2c303d8f1e58bd7a32","name":"@chabdulwahab/env-ok","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.2":{"name":"@chabdulwahab/env-ok","version":"1.0.2","keywords":["env","environment","validation","guard","dotenv","zero-dependency","typescript"],"author":{"name":"Antigravity"},"license":"MIT","_id":"@chabdulwahab/env-ok@1.0.2","maintainers":[{"name":"chabdulwahab","email":"ch.abdul.wahhab@proton.me"}],"dist":{"shasum":"0ec09d73aec9adb4f688aee5be47b5244c8d6f3d","tarball":"https://registry.npmjs.org/@chabdulwahab/env-ok/-/env-ok-1.0.2.tgz","fileCount":7,"integrity":"sha512-qHaoOR9d9f0MMQGfdR56GZrOpLn5LAWGcvx4qIkqkXXO+LAC0K8tHfxprceFatOqeiajHgN2FQZTJin7+19jWw==","signatures":[{"sig":"MEQCIG3G37Lfzn7SJkNnoEAF0w232I5k5BzmwT+MU6Id+Yl8AiAOulnaFGinV66Ro93rbaDz5uf5pYlUaiaRSBn/xdCmGA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6550},"main":"./dist/cjs/index.js","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/cjs/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"b60e130ee3b5766f2709822f8cad8b2b538af808","scripts":{"build":"node build.js"},"_npmUser":{"name":"chabdulwahab","email":"ch.abdul.wahhab@proton.me"},"_npmVersion":"11.6.2","description":"Zero-dependency, high-performance environment variable guard.","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/env-ok_1.0.2_1779199775466_0.5017000172672983","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@chabdulwahab/env-ok","version":"1.0.3","keywords":["env","environment","validation","guard","dotenv","zero-dependency","typescript"],"author":{"name":"Antigravity"},"license":"MIT","_id":"@chabdulwahab/env-ok@1.0.3","maintainers":[{"name":"chabdulwahab","email":"ch.abdul.wahhab@proton.me"}],"dist":{"shasum":"b06d45590d0af2db37837fae4aece94ff7b2c6a8","tarball":"https://registry.npmjs.org/@chabdulwahab/env-ok/-/env-ok-1.0.3.tgz","fileCount":7,"integrity":"sha512-t+eerdFPe3Rl9dOH0NtahH7JX+PhXvh/FFAYJv9LlgWrm8ohAjt+IuCGBcaAnsHeskivl7ScKxFwQjY0lt3qyw==","signatures":[{"sig":"MEUCIQC/arftd3Bmrg4Od+ynQ6kF/xaPf+4UMfkOg85M7VTEdQIgEBOHU19AstFsh8JkDWRzeCd4vxh5+iZcFmbpuJDVjlk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6549},"main":"./dist/cjs/index.js","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/cjs/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"b60e130ee3b5766f2709822f8cad8b2b538af808","scripts":{"build":"node build.js"},"_npmUser":{"name":"chabdulwahab","email":"ch.abdul.wahhab@proton.me"},"_npmVersion":"11.6.2","description":"Zero-dependency, high-performance environment variable guard.","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/env-ok_1.0.3_1779200105987_0.5534414104459793","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@chabdulwahab/env-ok","version":"1.0.4","description":"Zero-dependency, high-performance environment variable guard.","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/cjs/index.d.ts","exports":{".":{"types":"./dist/cjs/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"build":"node build.js"},"keywords":["env","environment","validation","guard","dotenv","zero-dependency","typescript"],"author":{"name":"Antigravity"},"license":"MIT","devDependencies":{"@types/node":"^20.0.0","typescript":"^5.0.0"},"gitHead":"b60e130ee3b5766f2709822f8cad8b2b538af808","_id":"@chabdulwahab/env-ok@1.0.4","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-gQ6MlG4WC/DgWoAtJrVGH2yE6CYpK+/w4gtHY+KUC57lNiAIXRvOrPP6eu9RzGN0Sj3L8VgnL0qKJ/PAzJ831g==","shasum":"f2ed89eb129f7c01f6aa3635bf5ff879ca84695b","tarball":"https://registry.npmjs.org/@chabdulwahab/env-ok/-/env-ok-1.0.4.tgz","fileCount":7,"unpackedSize":7577,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDDRqxtFNDXytijtBC/wq8MqlP86OU0g3sMsLr/rOyrxAIgM5Q1zNtCztJ7Bj8iAhgWZxo0y1KtBWGgFbWZbrpII/I="}]},"_npmUser":{"name":"chabdulwahab","email":"ch.abdul.wahhab@proton.me"},"directories":{},"maintainers":[{"name":"chabdulwahab","email":"ch.abdul.wahhab@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/env-ok_1.0.4_1779201486196_0.5602821603088768"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-19T14:09:35.372Z","modified":"2026-05-19T14:38:06.456Z","1.0.2":"2026-05-19T14:09:35.615Z","1.0.3":"2026-05-19T14:15:06.122Z","1.0.4":"2026-05-19T14:38:06.357Z"},"author":{"name":"Antigravity"},"license":"MIT","keywords":["env","environment","validation","guard","dotenv","zero-dependency","typescript"],"description":"Zero-dependency, high-performance environment variable guard.","maintainers":[{"name":"chabdulwahab","email":"ch.abdul.wahhab@proton.me"}],"readme":"# @chabdulwahab/env-ok\n\n[![NPM Version](https://img.shields.io/npm/v/@chabdulwahab%2Fenv-ok.svg)](https://www.npmjs.com/package/@chabdulwahab/env-ok)\n[![License](https://img.shields.io/npm/l/@chabdulwahab%2Fenv-ok.svg)](https://www.npmjs.com/package/@chabdulwahab/env-ok)\n[![Downloads](https://img.shields.io/npm/dm/@chabdulwahab%2Fenv-ok.svg)](https://www.npmjs.com/package/@chabdulwahab/env-ok)\n\nA zero-dependency, ultra-lightweight environment variable validator for Node.js and TypeScript. It automatically ensures environment variables defined in `.env.example` are present in either your local `.env` file or `process.env` before your application starts.\n\n## Features\n\n- Zero third-party dependencies (uses only native Node.js APIs)\n- Under 2KB compiled production bundle\n- TypeScript support with generated declaration files out of the box\n- Works in Docker, CI, and serverless environments (reads from both physical files and process.env)\n- Clean, minimal, high-contrast console error reports on failure\n\n## Installation\n\n```bash\nnpm install @chabdulwahab/env-ok\n```\n\n## Usage\n\nImport the package at the top of your application entry point:\n\n```typescript\nimport '@chabdulwahab/env-ok';\n\n// Application code starts here\n```\n\n## Behavior\n\n1. Resolves `.env.example` in the project root. If the file is not found, the guard exits silently.\n2. Extracts required environment keys from `.env.example`.\n3. Verifies that every key is defined in either the local `.env` file or `process.env`.\n4. If keys are missing, prints a clean ASCII error block to stderr and terminates the process with code 1.\n5. If all required keys are resolved, the application proceeds with zero performance impact.\n\n## Author\n\nCreated by [Ch Abdul Wahhab](https://github.com/ChAbdulWahhab).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}