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

ware

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

ware - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

6

component.json
{
"name": "ware",
"repo": "segmentio/ware",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",

@@ -10,3 +10,3 @@ "description": "Easily create your own middleware layer.",

"connect",
"express"
"express",
"layer",

@@ -17,2 +17,2 @@ "middleware"

"main": "lib/index.js"
}
}

@@ -0,1 +1,5 @@

0.2.1 - December 12, 2013
-------------------------
* fix skipping error handlers without error
0.2.0 - October 18, 2013

@@ -2,0 +6,0 @@ ------------------------

@@ -8,3 +8,2 @@

/**

@@ -19,3 +18,2 @@ * Initialize a new `Ware` manager.

/**

@@ -33,3 +31,2 @@ * Use a middleware `fn`.

/**

@@ -55,3 +52,5 @@ * Run through the middleware with the given `args` and optional `callback`.

if (!fn) return callback && callback.apply(null, [err].concat(args));
if (fn.length < args.length + 2 && err) return next(err);
if (fn.length == args.length + 2 && !err) return next();

@@ -58,0 +57,0 @@ var arr = [].slice.call(args);

{
"name": "ware",
"repository":"git://github.com/segmentio/ware.git",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "description": "Easily create your own middleware layer.",

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

# ware

@@ -2,0 +3,0 @@

@@ -73,3 +73,3 @@

.use(function (next) { next(new Error()); })
.use(function (next) { assert(false); next(); })
.use(function (next) { assert(false); })
.run(function (err) {

@@ -81,2 +81,12 @@ assert(err);

it('should skip error handlers on no error', function (done) {
ware()
.use(function (next) { next(); })
.use(function (err, next) { assert(false); })
.run(function (err) {
assert(!err);
done();
});
});
it('should call error middleware on error', function (done) {

@@ -83,0 +93,0 @@ var errors = 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