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

ezzy-environment

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ezzy-environment - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

9

index.js
const Environment = require('./src/Environment');
const logger = require('ezzy-logger').logger;
const {logger} = require('ezzy-logger');
/** @type {Environment} */
const environment = new Environment();
const environment = Environment.inst;
logger.info({title: 'Environment', message: environment});
module.exports = environment;
logger.info({title: 'Environment', message: environment});
{
"name": "ezzy-environment",
"description": "A lightweight tool to provide common environment settings",
"version": "0.1.11",
"version": "0.1.12",
"author": {

@@ -6,0 +6,0 @@ "name": "Moises Romero",

@@ -10,5 +10,12 @@ let pkg;

const deepmerge = require('deepmerge');
let inst;
/**
* Environment
*/
class Environment {
/**
* Constructor.
*/
constructor() {

@@ -21,2 +28,3 @@

// Look for a variable in our arguments
let env = argument(['ENVIRONMENT', 'NODE_ENV'], 'production');

@@ -86,2 +94,13 @@

/**
* Default instance of the environment.
* @returns {Environment}
*/
static get inst() {
if (!inst) {
inst = new Environment();
}
return inst;
}
/**
* Sets an environment property.

@@ -91,3 +110,3 @@ * @param {string} key The key to set.

*/
set (key, value) {
set(key, value) {
this[key] = value;

@@ -102,3 +121,3 @@ }

*/
get (key, defaultValue) {
get(key, defaultValue) {
return this[key] || defaultValue;

@@ -105,0 +124,0 @@ }

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