make Ox.unique work for nodelists

This commit is contained in:
rolux 2014-08-21 15:51:30 +02:00
parent 64226b9a37
commit dd7f0571a9

View file

@ -767,6 +767,7 @@ Ox.unique <f> Removes duplicate values from an array
[]
@*/
Ox.unique = function(array) {
array = Ox.slice(array);
return Ox.filter(array, function(value, index) {
return array.indexOf(value) == index;
});