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

koa-compose

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-compose - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

41

index.js

@@ -1,2 +0,1 @@

/**

@@ -62,3 +61,3 @@ * Module dependencies.

var prev = next || noop();
var name = prev.name || 'noop';
var name = prev._name || prev.name || 'noop';
var curr;

@@ -69,3 +68,3 @@

prev = wrap.call(this, curr, prev, name);
name = curr.name;
name = curr._name || curr.name;
}

@@ -89,6 +88,3 @@

// downstream
console.log(' \033[1m%d | \033[0m>> \033[36m%s\033[0m', this._level, name);
console.log();
console.log(fmt(this.response, { depth: 5, colors: true }).replace(/^/gm, ' '));
console.log();
output(this, 'down', name);

@@ -101,6 +97,3 @@ // yield

// upstream
console.log(' \033[1m%d | \033[0m<< \033[36m%s\033[0m', this._level, name);
console.log();
console.log(fmt(this.response, { depth: 5, colors: true }).replace(/^/gm, ' '));
console.log();
output(this, 'up', name);
}.call(this, prev));

@@ -110,2 +103,26 @@ }

/**
* Output debugging information.
*/
function output(ctx, direction, name) {
direction = 'up' == direction ? '<<' : '>>';
console.log(' \033[1m%d \033[0m%s \033[36m%s\033[0m', ctx._level, direction, name);
console.log(' \033[90mstatus\033[0m: %s %s', ctx.status, ctx.response.statusString);
console.log(' \033[90mheader\033[0m:');
header(ctx);
console.log(' \033[90mbody\033[0m: %j', ctx.body);
console.log();
}
/**
* Output header fields.
*/
function header(ctx) {
for (var key in ctx.response.header) {
console.log(' \033[90m%s\033[0m: %s', key, ctx.response.header[key]);
}
}
/**
* Noop.

@@ -116,2 +133,2 @@ *

function *noop(){}
function *noop(){}

@@ -5,3 +5,3 @@ {

"repository": "koajs/compose",
"version": "2.1.0",
"version": "2.2.0",
"keywords": [

@@ -22,3 +22,3 @@ "koa",

"should": "~2.1.0",
"koa": "~0.1.2"
"koa": "~0.3.0"
},

@@ -25,0 +25,0 @@ "scripts": {

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