demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/maxBy.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/maxBy.js
Status
scanned
Type
file
Name
maxBy.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
991 (991 bytes)
MD5
72b8113001053da88168cfc8086e212f
SHA1
85f841238f0c60a3496eecb25a3bf7aec5fc36fc
SHA256
83013470e39f512f7c510078bf572aa621ce07eb8fee584bc10618002089b7a2
SHA512

      
    
SHA1_git
2eba9c06ff34103a5dde960e340e682a633c0799
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
maxBy.js | 991 bytes |

var baseExtremum = require('./_baseExtremum'), baseGt = require('./_baseGt'), baseIteratee = require('./_baseIteratee'); /** * This method is like `_.max` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * the value is ranked. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * * var objects = [{ 'n': 1 }, { 'n': 2 }]; * * _.maxBy(objects, function(o) { return o.n; }); * // => { 'n': 2 } * * // The `_.property` iteratee shorthand. * _.maxBy(objects, 'n'); * // => { 'n': 2 } */ function maxBy(array, iteratee) { return (array && array.length) ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt) : undefined; } module.exports = maxBy;
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/lodash@4.17.20 mit JavaScript