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

@fleek-platform/env-guards

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fleek-platform/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.10.0
  • test
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-41.38%
Maintainers
0
Weekly downloads
 
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 '@fleek-platform/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 02 Nov 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