Skip to content

Instantly share code, notes, and snippets.

@NewDark90
NewDark90 / .js
Created December 1, 2019 20:22
Boundless color name sorting
let groupBy = (array, key) => {
return array.reduce(
(r, v, _, __, k = v[key]) => ((r[k] || (r[k] = [])).push(v), r),
{}
);
};
let colorNames = [
"Black " ,
"Night Azure " ,