1.0.0 • Published 6 years ago

min-max-key v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Min-Max

This package adds functions min and max, which get the minimum and maximum values of an array using a key function (identity by default).

min([2, 3, 4, 5]); //2

max([2, 3, 4, 5]); //5

min([[2, 3], [4, 2]], e => e[1]); //[4, 2]

max([[4, 6], [5, 2]], e => e[0]); //[5, 2]