min value in array -- min(users, 'age')
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

min

Min value utility

Installation

$ component install component/min

API

min(array)

Return the min value in array:

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

min(array, fn)

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

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

min(array, string)

Min value in array with the given property string:

var age = min(users, 'age')

License

MIT