proposal-array-unique icon indicating copy to clipboard operation
proposal-array-unique copied to clipboard

ECMAScript proposal for Deduplicating method of Array

Results 13 proposal-array-unique issues
Sort by recently updated
recently updated
newest added

I like the name `unique`, but another option to keep in mind is `distinct`. Pros: I can't think of anything now. Cons: Longer to write. Synonyms of "distinct" are less...

In examples in the README and the polyfill, in case, if it's used with a callback, a callback takes only one argument - a value. Maybe makes sense to make...

maybe we should start to write spec text cc @TechQuery

```js // How should be handled keys on `null` / `undefined`? [{ a: 1 }, null, { a: null }].uniqueBy('a'); // => ??? [{}, undefined].uniqueBy('a'); // => ??? // How...

Should the unique operation keep the first value with a given surrogate key or the last, and at what index? Is there reason to make it author-configurable? ```js const data...

question

This is more an FYI than a specific feature request. For ideal performance, implementations should consider the following: - Using a specialized append-only set rather than the built-in ES one,...

enhancement

It's common to have multiple keys for unique, so let's also support Array for the param: ```js let attrUpdates = [ {node: nodeA, attr: 'x', value: 1}, {node: nodeA, attr:...

enhancement

Question about : > While `Array.prototype.unique()` invoked with: > > 1. no parameter, it'll work as `[...new Set(array)]`; > > 2. one **index-key** parameter (`Number`, `String` or `Symbol`), it'll get...

question

This proposal is basically taking one of the convenience methods from popular JS helper libraries like Underscore.js and Lodash and putting it into 262. Why `uniqueBy`? Why not `zip`, `chunk`,...

question