Fix all lib/ files with ESLint rules with 0 errors.

This commit is contained in:
Gunther Brunner
2016-01-19 20:52:38 +09:00
parent 994977ea94
commit 434f63b3a9
69 changed files with 793 additions and 764 deletions

View File

@@ -31,11 +31,7 @@ module.exports.limit = function(limit, handler) {
var queue = []
var running = 0
function done() {
running -= 1
maybeNext()
}
/* eslint no-use-before-define: 0 */
function maybeNext() {
while (running < limit && queue.length) {
running += 1
@@ -43,6 +39,11 @@ module.exports.limit = function(limit, handler) {
}
}
function done() {
running -= 1
maybeNext()
}
return function() {
queue.push(arguments)
maybeNext()