Alberto Pepe added file js/util.js  over 6 years ago

Commit id: 327bde1c18fa65aa57bbd652f79fa65c69651b0f

deletions | additions      

         

// Return a unique version of an array  Array.prototype.unique = function(){  var u = {}, a = [];  for(var i = 0, l = this.length; i < l; ++i){  if(u.hasOwnProperty(this[i])) {  continue;  }  a.push(this[i]);  u[this[i]] = 1;  }  return a;  }