Skip to content
/ max Public
forked from component/max

max value in array -- max(users, 'age')

Notifications You must be signed in to change notification settings

ykankaya/max

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

max

Max value utility

Installation

$ component install component/max

API

max(array)

Return the max value in array:

max([1,5,6,1,2,0])

max(array, fn)

Max value in array with callback fn(val, i):

var age = max(users, function(u){ return u.age })

max(array, string)

Max value in array with the given property string:

var age = max(users, 'age')

License

MIT

About

max value in array -- max(users, 'age')

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 85.4%
  • Makefile 14.6%