Commit fbc74bfe authored by flothoni's avatar flothoni Committed by Mikaël Salson
Browse files

tools.js; add a function to clean an array of duplicates

Link to #4541
parent cf73be3d
......@@ -791,3 +791,13 @@ function getProxy() {
});
throw "No proxy";
}
/**
* @return an array without duplication
*/
function removeDuplicate(array) {
clean_array = array.filter(function(item, pos) {
return array.indexOf(item) == pos;
})
return clean_array
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment