Socket
Socket
Sign inDemoInstall

@01/env

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @01/env

A tiny env parser for nodejs and browser


Version published
Weekly downloads
404
increased by64.9%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

env

CircleCI Maintainability Test Coverage

Nodejs env utils

env

const nodeEnv:string = env("NODE_ENV", "development")
// process.env.NODE_ENV or "development"

envInt

const timeout:number = envInt("TIMEOUT", 5000)
// process.env.TIMEOUT as int or 5000

envFloat

const scaleFactor:number = envFloat("SCALE_FACTOR", 2.56)
// process.env.SCALE_FACTOR as float or 2.56

envBoolean

const isEnabled:boolean = envBoolean("IS_ENABLED", false)
// process.env.IS_ENABLED as boolean or false

Keywords

FAQs

Last updated on 17 Jan 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc