In my CouchDB reduce function I need to reduce a list of items to the unique ones.
Note: In that case it\'s ok to have a list, it will be a small number of items
Using Object.keys will give you strings if you put in integer arguments (uniq([1,2,3]) => ['1','2','3']. Here's one with Array.reduce:
function uniq(list) { return list.reduce((acc, d) => acc.includes(d) ? acc : acc.concat(d), []); }