$ npm install max-component
Max value utility
$ component install component/max
Return the max value in array
:
max([1,5,6,1,2,0])
Max value in array
with callback fn(val, i)
:
var age = max(users, function(u){ return u.age })
Max value in array
with the given property string
:
var age = max(users, 'age')
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE