max-component
Max value utility
Last updated 14 years ago by tjholowaychuk .
Original npm · Tarball · package.json
$ npm install max-component 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (14 years ago)

2 Versions

  • 1.0.0                                ...           14 years ago
  • 0.0.1                                ...           14 years ago
Maintainers (1)
Downloads
Total 8
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 2
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE