Skip to content

Commit

Permalink
Drop support for Node.js below 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Oct 14, 2017
1 parent 0c68537 commit aa3a670
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2.x
===

* Drop support for Node.js below 0.10

1.3.2 / 2017-09-24
==================

Expand Down
9 changes: 2 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ var setPrototypeOf = require('setprototypeof')

var slice = Array.prototype.slice

/* istanbul ignore next */
var defer = typeof setImmediate === 'function'
? setImmediate
: function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }

/**
* Expose `Router`.
*/
Expand Down Expand Up @@ -208,13 +203,13 @@ Router.prototype.handle = function handle(req, res, callback) {

// signal to exit router
if (layerError === 'router') {
defer(done, null)
setImmediate(done, null)
return
}

// no more matching layers
if (idx >= stack.length) {
defer(done, layerError)
setImmediate(done, layerError)
return
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"index.js"
],
"engines": {
"node": ">= 0.8"
"node": ">= 0.10"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
Expand Down

0 comments on commit aa3a670

Please sign in to comment.