Skip to content

Commit

Permalink
2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
suguru03 committed Oct 8, 2017
1 parent f883f37 commit a43c89d
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 180 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "neo-async",
"main": "lib/async.js",
"version": "2.4.0",
"version": "2.5.0",
"homepage": "https://github.com/suguru03/neo-async",
"authors": [
"Suguru Motegi"
Expand Down
48 changes: 28 additions & 20 deletions dist/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -1964,11 +1964,11 @@
var dir = createLogger('dir');

/**
* @version 2.4.0
* @version 2.5.0
* @namespace async
*/
var index = {
VERSION: '2.4.0',
VERSION: '2.5.0',

// Collections
each: each,
Expand Down Expand Up @@ -7719,11 +7719,17 @@
}

DLL.prototype._removeLink = function(node) {
this.head = node.next;
if (node.next) {
node.next.prev = node.prev;
var prev = node.prev;
var next = node.next;
if (prev) {
prev.next = next;
} else {
this.tail = node.prev;
this.head = next;
}
if (next) {
next.prev = prev;
} else {
this.tail = prev;
}
node.prev = null;
node.next = null;
Expand Down Expand Up @@ -7783,15 +7789,14 @@
}
return tasks;
};

DLL.prototype.remove = function(testFn) {
var curr = this.head;
while(!!curr) {
var next = curr.next;
if (testFn(curr)) {
this._removeLink(curr);
}
curr = next;

DLL.prototype.remove = function(test) {
var node = this.head;
while(node) {
if (test(node)) {
this._removeLink(node);
}
node = node.next;
}
return this;
};
Expand Down Expand Up @@ -7825,7 +7830,7 @@
push: push,
kill: kill,
unshift: unshift,
remove: remove,
remove: remove,
process: isQueue ? runQueue : runCargo,
length: getLength,
running: running,
Expand Down Expand Up @@ -8001,10 +8006,13 @@
var count = q.concurrency < q._tasks.length ? q.concurrency : q._tasks.length;
timesSync(count, _resume);
}

function remove(testFn) {
q._tasks.remove(testFn);
}

/**
* @param {Function} test
*/
function remove(test) {
q._tasks.remove(test);
}
}

/**
Expand Down
Loading

0 comments on commit a43c89d

Please sign in to comment.