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

std-env

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

std-env - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

39

index.js

@@ -8,5 +8,12 @@ // Gather initial information

var platform = ''
var minimal = false
// Process dependent fields
// Boolean helper
function toBoolean(val) {
return (!val || val === 'false') ? false : true
}
// Process dependent
if (typeof process !== 'undefined') {
// Platform
if (process.platform) {

@@ -16,20 +23,22 @@ platform = String(process.platform)

// TTY
if (process.stdout) {
tty = toBoolean(process.stdout.isTTY)
}
// Is CI
isCI = Boolean(require('ci-info').isCI)
// Env dependent
if (process.env) {
// isCI
isCI = Boolean(require('ci-info').isCI)
// NODE_ENV
if (process.env.NODE_ENV) {
nodeENV = String(process.env.NODE_ENV)
nodeENV = process.env.NODE_ENV
}
// DEBUG
if (process.DEBUG) {
debug = Boolean(process.env.DEBUG)
}
debug = toBoolean(process.env.DEBUG)
// TTY
if (process.stdout) {
tty = Boolean(process.stdout.isTTY)
}
// MINIMAL
minimal = toBoolean(process.env.MINIMAL)
}

@@ -50,2 +59,3 @@ }

minimal: undefined,
minimalCLI: undefined,

@@ -58,6 +68,7 @@

// Compute minimalCLI
env.minimalCLI = env.ci || env.test || !env.tty
// Compute minimal
env.minimal = minimal || env.ci || env.test || !env.tty
emv.minimalCLI = env.minimal
// Export env
module.exports = Object.freeze(env)
{
"name": "std-env",
"version": "2.1.1",
"version": "2.2.0",
"description": "Detect running environment of the current Node.js process",
"license": "MIT",
"main": "index.js",
"repository": "blindmedia/std-env",
"repository": "jsless/std-env",
"contributes": [

@@ -9,0 +9,0 @@ "Pooya Parsa <pooya@pi0.ir>"

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