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

otto-config

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

otto-config - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

7

lib/index.js

@@ -19,2 +19,7 @@

// Default Config
if (!config) {
config = { logging : false };
}
// Interpret Environment

@@ -44,3 +49,3 @@ if (!environment) { environment = {}; }

if (environment.NODE_ENV === 'DEVELOPMENT') {
if (config.logging && config.logging !== false) {
if (config.logging === true) {
console.log('Starting Logger...');

@@ -47,0 +52,0 @@ // Long version of 'dev'

23

package.json
{
"name" : "otto-config",
"version" : "0.0.4",
"version" : "0.1.0",
"repository" : "https://github.com/ottojs/otto-config.git",
"main" : "./lib/index.js",
"dependencies" : {
"morgan" : "1.2.2",
"body-parser" : "1.6.4",
"method-override" : "2.1.3"
"morgan" : "1.5.0",
"body-parser" : "1.9.3",
"method-override" : "2.3.0"
},
"devDependencies" : {
"jshint" : "2.5.3",
"mocha" : "1.21.4",
"should" : "4.0.4",
"supertest" : "0.13.0",
"sinon" : "1.10.3",
"istanbul" : "0.3.0"
"jshint" : "2.5.10",
"mocha" : "2.0.1",
"should" : "4.3.0",
"istanbul" : "0.3.2"
},

@@ -23,5 +21,4 @@ "scripts" : {

"engines" : {
"node" : "0.10.x",
"npm" : "1.4.x"
"node" : "0.10.x"
}
}
}

@@ -101,3 +101,3 @@

it('should not run a logger in DEFAULT environment', function () {
it('should not run a logger at all in DEFAULT environment', function () {

@@ -118,3 +118,3 @@ var called = false;

it('should run a logger in DEVELOPMENT environment', function () {
it('should not run a logger by default in DEVELOPMENT environment', function () {

@@ -131,2 +131,18 @@ var called = false;

called.should.equal(false);
});
it('should run a logger when asked in DEVELOPMENT environment', function () {
var called = false;
config.global({
set : function () {},
use : function (middleware) {
if (function_name(middleware) === 'logger') {
called = true;
}
}
}, { NODE_ENV : 'DEVELOPMENT' }, { logging : true });
called.should.equal(true);

@@ -133,0 +149,0 @@

Sorry, the diff of this file is not supported yet

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