Sha256: 71b852b4b43005e105114818a488783bc9b8ba7f71bb06979ab246936d41ee4c
Contents?: true
Size: 527 Bytes
Versions: 69
Compression:
Stored size: 527 Bytes
Contents
define(['./filter'], function(filter){ /** * @return {array} Array of unique items */ function unique(arr, compare){ compare = compare || isEqual; return filter(arr, function(item, i, arr){ var n = arr.length; while (++i < n) { if ( compare(item, arr[i]) ) { return false; } } return true; }); } function isEqual(a, b){ return a === b; } return unique; });
Version data entries
69 entries across 69 versions & 2 rubygems