mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 15:38:33 +02:00
use every
instead of _.uniq
Array.every is better for check all pass
This commit is contained in:
parent
f178f6c118
commit
638a711c4d
1 changed files with 3 additions and 5 deletions
|
@ -98,11 +98,9 @@ TreeCompare.compareAllBranchesWithinTrees = function(treeA, treeB) {
|
||||||
treeB.branches
|
treeB.branches
|
||||||
);
|
);
|
||||||
|
|
||||||
var result = true;
|
return Object.keys(allBranches).every(function(branch) {
|
||||||
_.uniq(allBranches, function(info, branch) {
|
return this.compareBranchWithinTrees(treeA, treeB, branch);
|
||||||
result = result && this.compareBranchWithinTrees(treeA, treeB, branch);
|
}.bind(this));
|
||||||
}, this);
|
|
||||||
return result;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TreeCompare.compareAllTagsWithinTrees = function(treeA, treeB) {
|
TreeCompare.compareAllTagsWithinTrees = function(treeA, treeB) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue