Expose the sort/unique code from Sizzle as Sizzle.uniqueSort().
This commit is contained in:
parent
85e0945718
commit
1c5db3baba
|
@ -124,7 +124,13 @@ var Sizzle = function(selector, context, results, seed) {
|
||||||
|
|
||||||
if ( extra ) {
|
if ( extra ) {
|
||||||
Sizzle( extra, origContext, results, seed );
|
Sizzle( extra, origContext, results, seed );
|
||||||
|
Sizzle.uniqueSort( results );
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
Sizzle.uniqueSort = function(results){
|
||||||
if ( sortOrder ) {
|
if ( sortOrder ) {
|
||||||
hasDuplicate = false;
|
hasDuplicate = false;
|
||||||
results.sort(sortOrder);
|
results.sort(sortOrder);
|
||||||
|
@ -137,9 +143,6 @@ var Sizzle = function(selector, context, results, seed) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return results;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Sizzle.matches = function(expr, set){
|
Sizzle.matches = function(expr, set){
|
||||||
|
|
Loading…
Reference in a new issue