Skip to content

Instantly share code, notes, and snippets.

@guillaumepiot
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaumepiot/13eb5cf8e778628b9993 to your computer and use it in GitHub Desktop.
Save guillaumepiot/13eb5cf8e778628b9993 to your computer and use it in GitHub Desktop.
COFFEESCRIPT - Uniquify Array
usernames = ['@guillaumepiot','@lemans','@guillaumepiot']
isUnique = (value, index, array)->
array.indexOf(value) == index
console.log usernames.filter(isUnique)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment