mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 00:03:28 +02:00
Fix all lib/ files with ESLint rules with 0 errors.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user