{"id":20442548,"url":"https://github.com/bifravst/from-env","last_synced_at":"2025-07-25T23:08:37.463Z","repository":{"id":37397527,"uuid":"452674722","full_name":"bifravst/from-env","owner":"bifravst","description":"Helper function which ensures that required environment variables are set.","archived":false,"fork":false,"pushed_at":"2025-07-19T10:44:36.000Z","size":2480,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"saga","last_synced_at":"2025-07-19T11:27:26.292Z","etag":null,"topics":["iot","nrf-asset-tracker"],"latest_commit_sha":null,"homepage":"https://github.com/bifravst/from-env#readme","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bifravst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-27T12:30:46.000Z","updated_at":"2025-07-19T10:44:39.000Z","dependencies_parsed_at":"2023-02-16T17:40:24.835Z","dependency_job_id":"910ee42e-4606-42ca-9abb-1db74b7e35f0","html_url":"https://github.com/bifravst/from-env","commit_stats":{"total_commits":253,"total_committers":4,"mean_commits":63.25,"dds":0.3438735177865613,"last_synced_commit":"fdb9060ab34d54f86b62ba2c256d6de6705e1365"},"previous_names":["bifravst/from-env"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/bifravst/from-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bifravst%2Ffrom-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bifravst%2Ffrom-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bifravst%2Ffrom-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bifravst%2Ffrom-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bifravst","download_url":"https://codeload.github.com/bifravst/from-env/tar.gz/refs/heads/saga","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bifravst%2Ffrom-env/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265947384,"owners_count":23853370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","nrf-asset-tracker"],"created_at":"2024-11-15T09:41:28.768Z","updated_at":"2025-07-25T23:08:37.409Z","avatar_url":"https://github.com/bifravst.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fromEnv [![npm version](https://img.shields.io/npm/v/@bifravst/from-env.svg)](https://www.npmjs.com/package/@bifravst/from-env)\n\n[![GitHub Actions](https://github.com/bifravst/from-env/workflows/Test%20and%20Release/badge.svg)](https://github.com/bifravst/from-env/actions)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)\n[![@commitlint/config-conventional](https://img.shields.io/badge/%40commitlint-config--conventional-brightgreen)](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/)\n[![ESLint: TypeScript](https://img.shields.io/badge/ESLint-TypeScript-blue.svg)](https://github.com/typescript-eslint/typescript-eslint)\n\nHelper function which ensures that required environment variables are set.\n\n## Example\n\n```typescript\nimport { fromEnv } from \"@bifravst/from-env\";\n\nconst { env } = fromEnv({\n  env: \"MY_ENV\",\n})(process.env);\n```\n\nThis will throw an exception if `MY_ENV` is not set on `process.env`. Otherwise,\n`env` will not contain the value of `process.env.MY_ENV`.\n\n## Installation\n\n    npm i --save-dev --save-exact @bifravst/from-env\n\n## Usage\n\nSee [`fromEnv.spec.ts`](./src/fromEnv.spec.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbifravst%2Ffrom-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbifravst%2Ffrom-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbifravst%2Ffrom-env/lists"}