Added the underscore node_module.
All checks were successful
Auto Maintenance Cycle / pre-commit Autoupdate (push) Successful in 39s
All checks were successful
Auto Maintenance Cycle / pre-commit Autoupdate (push) Successful in 39s
This commit is contained in:
31
node_modules/underscore/cjs/min.js
generated
vendored
Normal file
31
node_modules/underscore/cjs/min.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
var _isArrayLike = require('./_isArrayLike.js');
|
||||
var values = require('./values.js');
|
||||
var _cb = require('./_cb.js');
|
||||
var each = require('./each.js');
|
||||
|
||||
// Return the minimum element (or element-based computation).
|
||||
function min(obj, iteratee, context) {
|
||||
var result = Infinity, lastComputed = Infinity,
|
||||
value, computed;
|
||||
if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
|
||||
obj = _isArrayLike(obj) ? obj : values(obj);
|
||||
for (var i = 0, length = obj.length; i < length; i++) {
|
||||
value = obj[i];
|
||||
if (value != null && value < result) {
|
||||
result = value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
iteratee = _cb(iteratee, context);
|
||||
each(obj, function(v, index, list) {
|
||||
computed = iteratee(v, index, list);
|
||||
if (computed < lastComputed || (computed === Infinity && result === Infinity)) {
|
||||
result = v;
|
||||
lastComputed = computed;
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = min;
|
Reference in New Issue
Block a user