add book.js

This commit is contained in:
nick
2018-03-03 12:11:07 +08:00
parent 51d82157f0
commit a22a8a1bd3
435 changed files with 27430 additions and 0 deletions

30
node_modules/lodash/internal/arrayExtremum.js generated vendored Normal file
View File

@ -0,0 +1,30 @@
/**
* A specialized version of `baseExtremum` for arrays which invokes `iteratee`
* with one argument: (value).
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} comparator The function used to compare values.
* @param {*} exValue The initial extremum value.
* @returns {*} Returns the extremum value.
*/
function arrayExtremum(array, iteratee, comparator, exValue) {
var index = -1,
length = array.length,
computed = exValue,
result = computed;
while (++index < length) {
var value = array[index],
current = +iteratee(value);
if (comparator(current, computed)) {
computed = current;
result = value;
}
}
return result;
}
module.exports = arrayExtremum;