max-component
Max value utility
Last updated 12 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 (12 years ago)

2 Versions

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

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