Skip to content

Instantly share code, notes, and snippets.

@JimOfLeisure
Created May 4, 2022 22:39
Show Gist options
  • Save JimOfLeisure/6f84929c1b2940e3b881a8640dcf5b13 to your computer and use it in GitHub Desktop.
Save JimOfLeisure/6f84929c1b2940e3b881a8640dcf5b13 to your computer and use it in GitHub Desktop.
Idea swiped from someone wanting to avoid using Set for getting unique values
Array.prototype.unique = function () { return this.filter((e, i, a) => i === a.indexOf(e)) };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment