New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@brocan/env

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brocan/env - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

package.json
{
"name": "@brocan/env",
"version": "1.0.0",
"version": "1.1.0",
"description": "A simple wrapper around node-config which provides a way to ensure the presence of required properties.",
"main": "src/index.js",
"repository": {
"url": "https://github.com/battila7/brocan",
"url": "https://github.com/battila7/brocan/tree/master/env",
"type": "git"

@@ -9,0 +9,0 @@ },

@@ -22,3 +22,3 @@ const config = require('config');

get(property) {
return this.deps.config.get(property);
return this.hasEnv(property) ? this.getEnv(property) : this.deps.config.get(property);
},

@@ -32,3 +32,9 @@ getOrDefault(property, value) {

has(property) {
return this.deps.config.has(property);
return this.hasEnv(property) || this.deps.config.has(property);
},
hasEnv(property) {
return Object.prototype.hasOwnProperty.call(process.env, property);
},
getEnv(property) {
return process.env[property];
}

@@ -39,6 +45,2 @@ };

config.ensure = function ensure(properties) {
};
module.exports = env;
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