Skip to content

Instantly share code, notes, and snippets.

@FlorianWendelborn
Created March 14, 2018 16:02
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 FlorianWendelborn/40095f3123ad52cda08634463d7543d2 to your computer and use it in GitHub Desktop.
Save FlorianWendelborn/40095f3123ad52cda08634463d7543d2 to your computer and use it in GitHub Desktop.
someArray.sort(({ [key]: a }, { [key]: b }) => ((ascending ? a < b : a > b) ? 1 : -1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment