Skip to content

Instantly share code, notes, and snippets.

// Unique with use object
function uniqueObject(array) {
var hash = Object.create(null);
var result = [];
var value;
for (var i = 0; i < array.length; i++) {
value = array[i];
if (!hash[value]) {
hash[value] = true;