Skip to content

Instantly share code, notes, and snippets.

View masonlouchart's full-sized avatar
🗺️
Working from Earth

Mason masonlouchart

🗺️
Working from Earth
View GitHub Profile
@masonlouchart
masonlouchart / utils.ts
Last active May 27, 2021 11:41
TypeScript groupBy
/**
* StackOverflow Question = https://stackoverflow.com/questions/14446511
* Based on StackOverflow Anser = https://stackoverflow.com/a/66987261/1832572
*/
/**
* Groups items on given criteria. The criteria can be a property or a function
* which is applied on each item.
*
* @param list The elements to be grouped ona criteria

Keybase proof

I hereby claim:

  • I am masonlouchart on github.
  • I am masonlouchart (https://keybase.io/masonlouchart) on keybase.
  • I have a public key ASC6zLNnhfGPH9GiqmuXS-_ADqrWqOwlRYrI21t2tFMCEQo

To claim this, I am signing this object: