mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Sync with Underscore.
Former-commit-id: 2e3aacd53fef6d22d830dbc2d6c220808aea8739
This commit is contained in:
2
build.js
2
build.js
@@ -31,7 +31,6 @@
|
|||||||
'head': 'first',
|
'head': 'first',
|
||||||
'include': 'contains',
|
'include': 'contains',
|
||||||
'inject': 'reduce',
|
'inject': 'reduce',
|
||||||
'intersect': 'intersection',
|
|
||||||
'methods': 'functions',
|
'methods': 'functions',
|
||||||
'select': 'filter',
|
'select': 'filter',
|
||||||
'tail': 'rest',
|
'tail': 'rest',
|
||||||
@@ -48,7 +47,6 @@
|
|||||||
'first': ['head', 'take'],
|
'first': ['head', 'take'],
|
||||||
'forEach': ['each'],
|
'forEach': ['each'],
|
||||||
'functions': ['methods'],
|
'functions': ['methods'],
|
||||||
'intersection': ['intersect'],
|
|
||||||
'map': ['collect'],
|
'map': ['collect'],
|
||||||
'reduce': ['foldl', 'inject'],
|
'reduce': ['foldl', 'inject'],
|
||||||
'reduceRight': ['foldr'],
|
'reduceRight': ['foldr'],
|
||||||
|
|||||||
@@ -110,7 +110,6 @@
|
|||||||
'initial',
|
'initial',
|
||||||
'inject',
|
'inject',
|
||||||
'interpolate',
|
'interpolate',
|
||||||
'intersect',
|
|
||||||
'intersection',
|
'intersection',
|
||||||
'invoke',
|
'invoke',
|
||||||
'isArguments',
|
'isArguments',
|
||||||
|
|||||||
@@ -1154,7 +1154,6 @@
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @alias intersect
|
|
||||||
* @category Arrays
|
* @category Arrays
|
||||||
* @param {Array} [array1, array2, ...] Arrays to process.
|
* @param {Array} [array1, array2, ...] Arrays to process.
|
||||||
* @returns {Array} Returns a new array of unique values, in order, that are
|
* @returns {Array} Returns a new array of unique values, in order, that are
|
||||||
@@ -1555,9 +1554,6 @@
|
|||||||
result = [],
|
result = [],
|
||||||
seen = [];
|
seen = [];
|
||||||
|
|
||||||
if (length < 3) {
|
|
||||||
isSorted = true;
|
|
||||||
}
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
computed = callback ? callback(array[index]) : array[index];
|
computed = callback ? callback(array[index]) : array[index];
|
||||||
if (isSorted
|
if (isSorted
|
||||||
@@ -1719,6 +1715,7 @@
|
|||||||
|
|
||||||
function bound() {
|
function bound() {
|
||||||
var args = arguments,
|
var args = arguments,
|
||||||
|
isInstance = this instanceof bound,
|
||||||
thisBinding = thisArg;
|
thisBinding = thisArg;
|
||||||
|
|
||||||
if (!isFunc) {
|
if (!isFunc) {
|
||||||
@@ -1731,8 +1728,6 @@
|
|||||||
}
|
}
|
||||||
args = partialArgs;
|
args = partialArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isInstance = this instanceof bound;
|
|
||||||
if (isInstance) {
|
if (isInstance) {
|
||||||
// get `func` instance if `bound` is invoked in a `new` expression
|
// get `func` instance if `bound` is invoked in a `new` expression
|
||||||
noop.prototype = func.prototype;
|
noop.prototype = func.prototype;
|
||||||
@@ -3223,7 +3218,6 @@
|
|||||||
lodash.head = first;
|
lodash.head = first;
|
||||||
lodash.include = contains;
|
lodash.include = contains;
|
||||||
lodash.inject = reduce;
|
lodash.inject = reduce;
|
||||||
lodash.intersect = intersection;
|
|
||||||
lodash.methods = functions;
|
lodash.methods = functions;
|
||||||
lodash.select = filter;
|
lodash.select = filter;
|
||||||
lodash.tail = rest;
|
lodash.tail = rest;
|
||||||
|
|||||||
Reference in New Issue
Block a user