max-component

1.0.0 • Public • Published

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

/max-component/

    Package Sidebar

    Install

    npm i max-component

    Weekly Downloads

    277

    Version

    1.0.0

    License

    none

    Last publish

    Collaborators

    • tjholowaychuk