Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fleekxyz/env-guards

Package Overview
Dependencies
Maintainers
9
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fleekxyz/env-guards

This package is solving not direct usage of `process.env`. Instead create in `src` of your package where you need secrets file `secrets.ts` and use it like this:

  • 1.2.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

EnvGuards

This package is solving not direct usage of process.env. Instead create in src of your package where you need secrets file secrets.ts and use it like this:

import { parseEnvs } from '@fleekxyz/env-guards';

export const envGuards = parseEnvs([
  'HERE_LIST', //
  'THE_ENV_VARIABLES',
  'YOU_WANT_TO_USE',
]);

and then everywhere in your package you can use it like this:

import { envGuards } from './envGuards';

console.log(envGuards.HERE_LIST);

Add support of new ENV name

The list of strings (name of envs) that you can pass to parseEnvs function is limited. If you want to extend it and add new env name, feel free to add it in this file: /packages/env-guards/src/lib/availableEnvKeys.ts and build the package before usage.

FAQs

Package last updated on 08 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc