mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Compare commits
2 Commits
4.14.2-amd
...
4.16.0-amd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b9ddff408 | ||
|
|
fff78cbd5a |
10
README.md
10
README.md
@@ -1,9 +1,9 @@
|
|||||||
# lodash-amd v4.14.2
|
# lodash-amd v4.16.0
|
||||||
|
|
||||||
The [Lodash](https://lodash.com/) library exported as [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules.
|
The [Lodash](https://lodash.com/) library exported as [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules.
|
||||||
|
|
||||||
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
||||||
```bash
|
```shell
|
||||||
$ lodash exports=amd -o ./
|
$ lodash exports=amd -o ./
|
||||||
$ lodash exports=amd -d -o ./main.js
|
$ lodash exports=amd -d -o ./main.js
|
||||||
```
|
```
|
||||||
@@ -11,8 +11,8 @@ $ lodash exports=amd -d -o ./main.js
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Using npm:
|
Using npm:
|
||||||
```bash
|
```shell
|
||||||
$ {sudo -H} npm i -g npm
|
$ npm i -g npm
|
||||||
$ npm i --save lodash-amd
|
$ npm i --save lodash-amd
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -27,4 +27,4 @@ require({
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/tree/4.14.2-amd) for more details.
|
See the [package source](https://github.com/lodash/lodash/tree/4.16.0-amd) for more details.
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ define(['./_ListCache', './_stackClear', './_stackDelete', './_stackGet', './_st
|
|||||||
* @param {Array} [entries] The key-value pairs to cache.
|
* @param {Array} [entries] The key-value pairs to cache.
|
||||||
*/
|
*/
|
||||||
function Stack(entries) {
|
function Stack(entries) {
|
||||||
this.__data__ = new ListCache(entries);
|
var data = this.__data__ = new ListCache(entries);
|
||||||
|
this.size = data.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add methods to `Stack`.
|
// Add methods to `Stack`.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ define(['./_baseIndexOf'], function(baseIndexOf) {
|
|||||||
* specifying an index to search from.
|
* specifying an index to search from.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} [array] The array to search.
|
* @param {Array} [array] The array to inspect.
|
||||||
* @param {*} target The value to search for.
|
* @param {*} target The value to search for.
|
||||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ define([], function() {
|
|||||||
* This function is like `arrayIncludes` except that it accepts a comparator.
|
* This function is like `arrayIncludes` except that it accepts a comparator.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} [array] The array to search.
|
* @param {Array} [array] The array to inspect.
|
||||||
* @param {*} target The value to search for.
|
* @param {*} target The value to search for.
|
||||||
* @param {Function} comparator The comparator invoked per element.
|
* @param {Function} comparator The comparator invoked per element.
|
||||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_baseTimes', './isArguments', './isArray', './_isIndex', './isString'], function(baseTimes, isArguments, isArray, isIndex, isString) {
|
define(['./_baseTimes', './isArguments', './isArray', './_isIndex'], function(baseTimes, isArguments, isArray, isIndex) {
|
||||||
|
|
||||||
/** Used for built-in method references. */
|
/** Used for built-in method references. */
|
||||||
var objectProto = Object.prototype;
|
var objectProto = Object.prototype;
|
||||||
@@ -15,7 +15,9 @@ define(['./_baseTimes', './isArguments', './isArray', './_isIndex', './isString'
|
|||||||
* @returns {Array} Returns the array of property names.
|
* @returns {Array} Returns the array of property names.
|
||||||
*/
|
*/
|
||||||
function arrayLikeKeys(value, inherited) {
|
function arrayLikeKeys(value, inherited) {
|
||||||
var result = (isArray(value) || isString(value) || isArguments(value))
|
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||||
|
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||||
|
var result = (isArray(value) || isArguments(value))
|
||||||
? baseTimes(value.length, String)
|
? baseTimes(value.length, String)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
|||||||
20
_arraySample.js
Normal file
20
_arraySample.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
define(['./_baseRandom'], function(baseRandom) {
|
||||||
|
|
||||||
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
|
var undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.sample` for arrays without support for iteratee
|
||||||
|
* shorthands.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to sample.
|
||||||
|
* @returns {*} Returns the random element.
|
||||||
|
*/
|
||||||
|
function arraySample(array) {
|
||||||
|
var length = array.length;
|
||||||
|
return length ? array[baseRandom(0, length - 1)] : undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return arraySample;
|
||||||
|
});
|
||||||
18
_arraySampleSize.js
Normal file
18
_arraySampleSize.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
define(['./_arrayShuffle', './_baseClamp'], function(arrayShuffle, baseClamp) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.sampleSize` for arrays.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to sample.
|
||||||
|
* @param {number} n The number of elements to sample.
|
||||||
|
* @returns {Array} Returns the random elements.
|
||||||
|
*/
|
||||||
|
function arraySampleSize(array, n) {
|
||||||
|
var result = arrayShuffle(array);
|
||||||
|
result.length = baseClamp(n, 0, result.length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return arraySampleSize;
|
||||||
|
});
|
||||||
15
_arrayShuffle.js
Normal file
15
_arrayShuffle.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
define(['./_copyArray', './_shuffleSelf'], function(copyArray, shuffleSelf) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.shuffle` for arrays.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to shuffle.
|
||||||
|
* @returns {Array} Returns the new shuffled array.
|
||||||
|
*/
|
||||||
|
function arrayShuffle(array) {
|
||||||
|
return shuffleSelf(copyArray(array));
|
||||||
|
}
|
||||||
|
|
||||||
|
return arrayShuffle;
|
||||||
|
});
|
||||||
13
_asciiSize.js
Normal file
13
_asciiSize.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
define(['./_baseProperty'], function(baseProperty) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the size of an ASCII `string`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string inspect.
|
||||||
|
* @returns {number} Returns the string size.
|
||||||
|
*/
|
||||||
|
var asciiSize = baseProperty('length');
|
||||||
|
|
||||||
|
return asciiSize;
|
||||||
|
});
|
||||||
15
_asciiToArray.js
Normal file
15
_asciiToArray.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts an ASCII `string` to an array.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to convert.
|
||||||
|
* @returns {Array} Returns the converted array.
|
||||||
|
*/
|
||||||
|
function asciiToArray(string) {
|
||||||
|
return string.split('');
|
||||||
|
}
|
||||||
|
|
||||||
|
return asciiToArray;
|
||||||
|
});
|
||||||
18
_asciiWords.js
Normal file
18
_asciiWords.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/** Used to match words composed of alphanumeric characters. */
|
||||||
|
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Splits an ASCII `string` into an array of its words.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} The string to inspect.
|
||||||
|
* @returns {Array} Returns the words of `string`.
|
||||||
|
*/
|
||||||
|
function asciiWords(string) {
|
||||||
|
return string.match(reAsciiWord) || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return asciiWords;
|
||||||
|
});
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./eq'], function(eq) {
|
define(['./_baseAssignValue', './eq'], function(baseAssignValue, eq) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -15,7 +15,7 @@ define(['./eq'], function(eq) {
|
|||||||
function assignMergeValue(object, key, value) {
|
function assignMergeValue(object, key, value) {
|
||||||
if ((value !== undefined && !eq(object[key], value)) ||
|
if ((value !== undefined && !eq(object[key], value)) ||
|
||||||
(typeof key == 'number' && value === undefined && !(key in object))) {
|
(typeof key == 'number' && value === undefined && !(key in object))) {
|
||||||
object[key] = value;
|
baseAssignValue(object, key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./eq'], function(eq) {
|
define(['./_baseAssignValue', './eq'], function(baseAssignValue, eq) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -23,7 +23,7 @@ define(['./eq'], function(eq) {
|
|||||||
var objValue = object[key];
|
var objValue = object[key];
|
||||||
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
||||||
(value === undefined && !(key in object))) {
|
(value === undefined && !(key in object))) {
|
||||||
object[key] = value;
|
baseAssignValue(object, key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ define(['./eq'], function(eq) {
|
|||||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {*} key The key to search for.
|
* @param {*} key The key to search for.
|
||||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
*/
|
*/
|
||||||
|
|||||||
29
_baseAssignValue.js
Normal file
29
_baseAssignValue.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/** Built-in value references. */
|
||||||
|
var defineProperty = Object.defineProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
||||||
|
* value checks.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to modify.
|
||||||
|
* @param {string} key The key of the property to assign.
|
||||||
|
* @param {*} value The value to assign.
|
||||||
|
*/
|
||||||
|
function baseAssignValue(object, key, value) {
|
||||||
|
if (key == '__proto__' && defineProperty) {
|
||||||
|
defineProperty(object, key, {
|
||||||
|
'configurable': true,
|
||||||
|
'enumerable': true,
|
||||||
|
'value': value,
|
||||||
|
'writable': true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
object[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return baseAssignValue;
|
||||||
|
});
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_Stack', './_arrayEach', './_assignValue', './_baseAssign', './_cloneBuffer', './_copyArray', './_copySymbols', './_getAllKeys', './_getTag', './_initCloneArray', './_initCloneByTag', './_initCloneObject', './isArray', './isBuffer', './_isHostObject', './isObject', './keys'], function(Stack, arrayEach, assignValue, baseAssign, cloneBuffer, copyArray, copySymbols, getAllKeys, getTag, initCloneArray, initCloneByTag, initCloneObject, isArray, isBuffer, isHostObject, isObject, keys) {
|
define(['./_Stack', './_arrayEach', './_assignValue', './_baseAssign', './_cloneBuffer', './_copyArray', './_copySymbols', './_getAllKeys', './_getTag', './_initCloneArray', './_initCloneByTag', './_initCloneObject', './isArray', './isBuffer', './isObject', './keys'], function(Stack, arrayEach, assignValue, baseAssign, cloneBuffer, copyArray, copySymbols, getAllKeys, getTag, initCloneArray, initCloneByTag, initCloneObject, isArray, isBuffer, isObject, keys) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -87,9 +87,6 @@ define(['./_Stack', './_arrayEach', './_assignValue', './_baseAssign', './_clone
|
|||||||
return cloneBuffer(value, isDeep);
|
return cloneBuffer(value, isDeep);
|
||||||
}
|
}
|
||||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||||
if (isHostObject(value)) {
|
|
||||||
return object ? value : {};
|
|
||||||
}
|
|
||||||
result = initCloneObject(isFunc ? {} : value);
|
result = initCloneObject(isFunc ? {} : value);
|
||||||
if (!isDeep) {
|
if (!isDeep) {
|
||||||
return copySymbols(value, baseAssign(result, value));
|
return copySymbols(value, baseAssign(result, value));
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ define([], function() {
|
|||||||
* support for iteratee shorthands.
|
* support for iteratee shorthands.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {Function} predicate The function invoked per iteration.
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
* @param {number} fromIndex The index to search from.
|
* @param {number} fromIndex The index to search from.
|
||||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ define([], function() {
|
|||||||
* using `eachFunc`.
|
* using `eachFunc`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array|Object} collection The collection to search.
|
* @param {Array|Object} collection The collection to inspect.
|
||||||
* @param {Function} predicate The function invoked per iteration.
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
* @param {Function} eachFunc The function to iterate over `collection`.
|
* @param {Function} eachFunc The function to iterate over `collection`.
|
||||||
* @returns {*} Returns the found element or its key, else `undefined`.
|
* @returns {*} Returns the found element or its key, else `undefined`.
|
||||||
|
|||||||
@@ -1,27 +1,18 @@
|
|||||||
define(['./_baseFindIndex', './_baseIsNaN'], function(baseFindIndex, baseIsNaN) {
|
define(['./_baseFindIndex', './_baseIsNaN', './_strictIndexOf'], function(baseFindIndex, baseIsNaN, strictIndexOf) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {*} value The value to search for.
|
* @param {*} value The value to search for.
|
||||||
* @param {number} fromIndex The index to search from.
|
* @param {number} fromIndex The index to search from.
|
||||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
*/
|
*/
|
||||||
function baseIndexOf(array, value, fromIndex) {
|
function baseIndexOf(array, value, fromIndex) {
|
||||||
if (value !== value) {
|
return value === value
|
||||||
return baseFindIndex(array, baseIsNaN, fromIndex);
|
? strictIndexOf(array, value, fromIndex)
|
||||||
}
|
: baseFindIndex(array, baseIsNaN, fromIndex);
|
||||||
var index = fromIndex - 1,
|
|
||||||
length = array.length;
|
|
||||||
|
|
||||||
while (++index < length) {
|
|
||||||
if (array[index] === value) {
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return baseIndexOf;
|
return baseIndexOf;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ define([], function() {
|
|||||||
* This function is like `baseIndexOf` except that it accepts a comparator.
|
* This function is like `baseIndexOf` except that it accepts a comparator.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {*} value The value to search for.
|
* @param {*} value The value to search for.
|
||||||
* @param {number} fromIndex The index to search from.
|
* @param {number} fromIndex The index to search from.
|
||||||
* @param {Function} comparator The comparator invoked per element.
|
* @param {Function} comparator The comparator invoked per element.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_Stack', './_equalArrays', './_equalByTag', './_equalObjects', './_getTag', './isArray', './_isHostObject', './isTypedArray'], function(Stack, equalArrays, equalByTag, equalObjects, getTag, isArray, isHostObject, isTypedArray) {
|
define(['./_Stack', './_equalArrays', './_equalByTag', './_equalObjects', './_getTag', './isArray', './isTypedArray'], function(Stack, equalArrays, equalByTag, equalObjects, getTag, isArray, isTypedArray) {
|
||||||
|
|
||||||
/** Used to compose bitmasks for comparison styles. */
|
/** Used to compose bitmasks for comparison styles. */
|
||||||
var PARTIAL_COMPARE_FLAG = 2;
|
var PARTIAL_COMPARE_FLAG = 2;
|
||||||
@@ -43,8 +43,8 @@ define(['./_Stack', './_equalArrays', './_equalByTag', './_equalObjects', './_ge
|
|||||||
othTag = getTag(other);
|
othTag = getTag(other);
|
||||||
othTag = othTag == argsTag ? objectTag : othTag;
|
othTag = othTag == argsTag ? objectTag : othTag;
|
||||||
}
|
}
|
||||||
var objIsObj = objTag == objectTag && !isHostObject(object),
|
var objIsObj = objTag == objectTag,
|
||||||
othIsObj = othTag == objectTag && !isHostObject(other),
|
othIsObj = othTag == objectTag,
|
||||||
isSameTag = objTag == othTag;
|
isSameTag = objTag == othTag;
|
||||||
|
|
||||||
if (isSameTag && !objIsObj) {
|
if (isSameTag && !objIsObj) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./isFunction', './_isHostObject', './_isMasked', './isObject', './_toSource'], function(isFunction, isHostObject, isMasked, isObject, toSource) {
|
define(['./isFunction', './_isMasked', './isObject', './_toSource'], function(isFunction, isMasked, isObject, toSource) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to match `RegExp`
|
* Used to match `RegExp`
|
||||||
@@ -10,10 +10,11 @@ define(['./isFunction', './_isHostObject', './_isMasked', './isObject', './_toSo
|
|||||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||||
|
|
||||||
/** Used for built-in method references. */
|
/** Used for built-in method references. */
|
||||||
var objectProto = Object.prototype;
|
var funcProto = Function.prototype,
|
||||||
|
objectProto = Object.prototype;
|
||||||
|
|
||||||
/** Used to resolve the decompiled source of functions. */
|
/** Used to resolve the decompiled source of functions. */
|
||||||
var funcToString = Function.prototype.toString;
|
var funcToString = funcProto.toString;
|
||||||
|
|
||||||
/** Used to check objects for own properties. */
|
/** Used to check objects for own properties. */
|
||||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
@@ -36,7 +37,7 @@ define(['./isFunction', './_isHostObject', './_isMasked', './isObject', './_toSo
|
|||||||
if (!isObject(value) || isMasked(value)) {
|
if (!isObject(value) || isMasked(value)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
||||||
return pattern.test(toSource(value));
|
return pattern.test(toSource(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define([], function() {
|
define(['./_baseAssignValue'], function(baseAssignValue) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
||||||
@@ -19,7 +19,7 @@ define([], function() {
|
|||||||
value = object[key];
|
value = object[key];
|
||||||
|
|
||||||
if (predicate(value, key)) {
|
if (predicate(value, key)) {
|
||||||
result[key] = value;
|
baseAssignValue(result, key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
27
_baseRest.js
27
_baseRest.js
@@ -1,10 +1,4 @@
|
|||||||
define(['./_apply'], function(apply) {
|
define(['./identity', './_overRest', './_setToString'], function(identity, overRest, setToString) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
|
||||||
var undefined;
|
|
||||||
|
|
||||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
||||||
var nativeMax = Math.max;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
||||||
@@ -15,24 +9,7 @@ define(['./_apply'], function(apply) {
|
|||||||
* @returns {Function} Returns the new function.
|
* @returns {Function} Returns the new function.
|
||||||
*/
|
*/
|
||||||
function baseRest(func, start) {
|
function baseRest(func, start) {
|
||||||
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
return setToString(overRest(func, start, identity), func + '');
|
||||||
return function() {
|
|
||||||
var args = arguments,
|
|
||||||
index = -1,
|
|
||||||
length = nativeMax(args.length - start, 0),
|
|
||||||
array = Array(length);
|
|
||||||
|
|
||||||
while (++index < length) {
|
|
||||||
array[index] = args[start + index];
|
|
||||||
}
|
|
||||||
index = -1;
|
|
||||||
var otherArgs = Array(start + 1);
|
|
||||||
while (++index < start) {
|
|
||||||
otherArgs[index] = args[index];
|
|
||||||
}
|
|
||||||
otherArgs[start] = array;
|
|
||||||
return apply(func, this, otherArgs);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return baseRest;
|
return baseRest;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ define(['./_assignValue', './_castPath', './_isIndex', './_isKey', './isObject',
|
|||||||
* The base implementation of `_.set`.
|
* The base implementation of `_.set`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The object to query.
|
* @param {Object} object The object to modify.
|
||||||
* @param {Array|string} path The path of the property to set.
|
* @param {Array|string} path The path of the property to set.
|
||||||
* @param {*} value The value to set.
|
* @param {*} value The value to set.
|
||||||
* @param {Function} [customizer] The function to customize path creation.
|
* @param {Function} [customizer] The function to customize path creation.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
define(['./identity', './_metaMap'], function(identity, metaMap) {
|
define(['./identity', './_metaMap'], function(identity, metaMap) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `setData` without support for hot loop detection.
|
* The base implementation of `setData` without support for hot loop shorting.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function} func The function to associate metadata with.
|
* @param {Function} func The function to associate metadata with.
|
||||||
|
|||||||
21
_baseSetToString.js
Normal file
21
_baseSetToString.js
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
define(['./constant', './identity', './_nativeDefineProperty'], function(constant, identity, nativeDefineProperty) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `setToString` without support for hot loop shorting.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to modify.
|
||||||
|
* @param {Function} string The `toString` result.
|
||||||
|
* @returns {Function} Returns `func`.
|
||||||
|
*/
|
||||||
|
var baseSetToString = !nativeDefineProperty ? identity : function(func, string) {
|
||||||
|
return nativeDefineProperty(func, 'toString', {
|
||||||
|
'configurable': true,
|
||||||
|
'enumerable': false,
|
||||||
|
'value': constant(string),
|
||||||
|
'writable': true
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return baseSetToString;
|
||||||
|
});
|
||||||
@@ -4,7 +4,7 @@ define(['./_baseGet', './_baseSet'], function(baseGet, baseSet) {
|
|||||||
* The base implementation of `_.update`.
|
* The base implementation of `_.update`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The object to query.
|
* @param {Object} object The object to modify.
|
||||||
* @param {Array|string} path The path of the property to update.
|
* @param {Array|string} path The path of the property to update.
|
||||||
* @param {Function} updater The function to produce the updated value.
|
* @param {Function} updater The function to produce the updated value.
|
||||||
* @param {Function} [customizer] The function to customize path creation.
|
* @param {Function} [customizer] The function to customize path creation.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
define([], function() {
|
define([], function() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a cache value for `key` exists.
|
* Checks if a `cache` value for `key` exists.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} cache The cache to query.
|
* @param {Object} cache The cache to query.
|
||||||
|
|||||||
15
_castRest.js
Normal file
15
_castRest.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
define(['./_baseRest'], function(baseRest) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A `baseRest` alias which can be replaced with `identity` by module
|
||||||
|
* replacement plugins.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @type {Function}
|
||||||
|
* @param {Function} func The function to apply a rest parameter to.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
var castRest = baseRest;
|
||||||
|
|
||||||
|
return castRest;
|
||||||
|
});
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_assignValue'], function(assignValue) {
|
define(['./_assignValue', './_baseAssignValue'], function(assignValue, baseAssignValue) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -14,6 +14,7 @@ define(['./_assignValue'], function(assignValue) {
|
|||||||
* @returns {Object} Returns `object`.
|
* @returns {Object} Returns `object`.
|
||||||
*/
|
*/
|
||||||
function copyObject(source, props, object, customizer) {
|
function copyObject(source, props, object, customizer) {
|
||||||
|
var isNew = !object;
|
||||||
object || (object = {});
|
object || (object = {});
|
||||||
|
|
||||||
var index = -1,
|
var index = -1,
|
||||||
@@ -26,7 +27,14 @@ define(['./_assignValue'], function(assignValue) {
|
|||||||
? customizer(object[key], source[key], key, object, source)
|
? customizer(object[key], source[key], key, object, source)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
assignValue(object, key, newValue === undefined ? source[key] : newValue);
|
if (newValue === undefined) {
|
||||||
|
newValue = source[key];
|
||||||
|
}
|
||||||
|
if (isNew) {
|
||||||
|
baseAssignValue(object, key, newValue);
|
||||||
|
} else {
|
||||||
|
assignValue(object, key, newValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ define([], function() {
|
|||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
if (array[length] === placeholder) {
|
if (array[length] === placeholder) {
|
||||||
result++;
|
++result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_castSlice', './_reHasComplexSymbol', './_stringToArray', './toString'], function(castSlice, reHasComplexSymbol, stringToArray, toString) {
|
define(['./_castSlice', './_hasUnicode', './_stringToArray', './toString'], function(castSlice, hasUnicode, stringToArray, toString) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -14,7 +14,7 @@ define(['./_castSlice', './_reHasComplexSymbol', './_stringToArray', './toString
|
|||||||
return function(string) {
|
return function(string) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
|
|
||||||
var strSymbols = reHasComplexSymbol.test(string)
|
var strSymbols = hasUnicode(string)
|
||||||
? stringToArray(string)
|
? stringToArray(string)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_LodashWrapper', './_baseFlatten', './_baseRest', './_getData', './_getFuncName', './isArray', './_isLaziable'], function(LodashWrapper, baseFlatten, baseRest, getData, getFuncName, isArray, isLaziable) {
|
define(['./_LodashWrapper', './_flatRest', './_getData', './_getFuncName', './isArray', './_isLaziable'], function(LodashWrapper, flatRest, getData, getFuncName, isArray, isLaziable) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -23,9 +23,7 @@ define(['./_LodashWrapper', './_baseFlatten', './_baseRest', './_getData', './_g
|
|||||||
* @returns {Function} Returns the new flow function.
|
* @returns {Function} Returns the new flow function.
|
||||||
*/
|
*/
|
||||||
function createFlow(fromRight) {
|
function createFlow(fromRight) {
|
||||||
return baseRest(function(funcs) {
|
return flatRest(function(funcs) {
|
||||||
funcs = baseFlatten(funcs, 1);
|
|
||||||
|
|
||||||
var length = funcs.length,
|
var length = funcs.length,
|
||||||
index = length,
|
index = length,
|
||||||
prereq = LodashWrapper.prototype.thru;
|
prereq = LodashWrapper.prototype.thru;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_apply', './_arrayMap', './_baseFlatten', './_baseIteratee', './_baseRest', './_baseUnary', './isArray'], function(apply, arrayMap, baseFlatten, baseIteratee, baseRest, baseUnary, isArray) {
|
define(['./_apply', './_arrayMap', './_baseIteratee', './_baseRest', './_baseUnary', './_flatRest'], function(apply, arrayMap, baseIteratee, baseRest, baseUnary, flatRest) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function like `_.over`.
|
* Creates a function like `_.over`.
|
||||||
@@ -8,11 +8,8 @@ define(['./_apply', './_arrayMap', './_baseFlatten', './_baseIteratee', './_base
|
|||||||
* @returns {Function} Returns the new over function.
|
* @returns {Function} Returns the new over function.
|
||||||
*/
|
*/
|
||||||
function createOver(arrayFunc) {
|
function createOver(arrayFunc) {
|
||||||
return baseRest(function(iteratees) {
|
return flatRest(function(iteratees) {
|
||||||
iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
|
iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
|
||||||
? arrayMap(iteratees[0], baseUnary(baseIteratee))
|
|
||||||
: arrayMap(baseFlatten(iteratees, 1), baseUnary(baseIteratee));
|
|
||||||
|
|
||||||
return baseRest(function(args) {
|
return baseRest(function(args) {
|
||||||
var thisArg = this;
|
var thisArg = this;
|
||||||
return arrayFunc(iteratees, function(iteratee) {
|
return arrayFunc(iteratees, function(iteratee) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_baseRepeat', './_baseToString', './_castSlice', './_reHasComplexSymbol', './_stringSize', './_stringToArray'], function(baseRepeat, baseToString, castSlice, reHasComplexSymbol, stringSize, stringToArray) {
|
define(['./_baseRepeat', './_baseToString', './_castSlice', './_hasUnicode', './_stringSize', './_stringToArray'], function(baseRepeat, baseToString, castSlice, hasUnicode, stringSize, stringToArray) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -23,7 +23,7 @@ define(['./_baseRepeat', './_baseToString', './_castSlice', './_reHasComplexSymb
|
|||||||
return charsLength ? baseRepeat(chars, length) : chars;
|
return charsLength ? baseRepeat(chars, length) : chars;
|
||||||
}
|
}
|
||||||
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
||||||
return reHasComplexSymbol.test(chars)
|
return hasUnicode(chars)
|
||||||
? castSlice(stringToArray(result), 0, length).join('')
|
? castSlice(stringToArray(result), 0, length).join('')
|
||||||
: result.slice(0, length);
|
: result.slice(0, length);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
define(['./_basePropertyOf'], function(basePropertyOf) {
|
define(['./_basePropertyOf'], function(basePropertyOf) {
|
||||||
|
|
||||||
/** Used to map latin-1 supplementary letters to basic latin letters. */
|
/** Used to map Latin Unicode letters to basic Latin letters. */
|
||||||
var deburredLetters = {
|
var deburredLetters = {
|
||||||
|
// Latin-1 Supplement block.
|
||||||
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
||||||
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
||||||
'\xc7': 'C', '\xe7': 'c',
|
'\xc7': 'C', '\xe7': 'c',
|
||||||
'\xd0': 'D', '\xf0': 'd',
|
'\xd0': 'D', '\xf0': 'd',
|
||||||
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
||||||
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
||||||
'\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
||||||
'\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
||||||
'\xd1': 'N', '\xf1': 'n',
|
'\xd1': 'N', '\xf1': 'n',
|
||||||
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
||||||
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
||||||
@@ -18,11 +19,48 @@ define(['./_basePropertyOf'], function(basePropertyOf) {
|
|||||||
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
||||||
'\xc6': 'Ae', '\xe6': 'ae',
|
'\xc6': 'Ae', '\xe6': 'ae',
|
||||||
'\xde': 'Th', '\xfe': 'th',
|
'\xde': 'Th', '\xfe': 'th',
|
||||||
'\xdf': 'ss'
|
'\xdf': 'ss',
|
||||||
|
// Latin Extended-A block.
|
||||||
|
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
||||||
|
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
||||||
|
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
||||||
|
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
||||||
|
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
||||||
|
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
||||||
|
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
||||||
|
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
||||||
|
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
||||||
|
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
||||||
|
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
||||||
|
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
||||||
|
'\u0134': 'J', '\u0135': 'j',
|
||||||
|
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
||||||
|
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
||||||
|
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
||||||
|
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
||||||
|
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
||||||
|
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
||||||
|
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
||||||
|
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
||||||
|
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
||||||
|
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
||||||
|
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
||||||
|
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
||||||
|
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
||||||
|
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
||||||
|
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
||||||
|
'\u0174': 'W', '\u0175': 'w',
|
||||||
|
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
||||||
|
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
||||||
|
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
||||||
|
'\u0132': 'IJ', '\u0133': 'ij',
|
||||||
|
'\u0152': 'Oe', '\u0153': 'oe',
|
||||||
|
'\u0149': "'n", '\u017f': 's'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
|
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
||||||
|
* letters to basic Latin letters.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {string} letter The matched letter to deburr.
|
* @param {string} letter The matched letter to deburr.
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
define(['./_getNative'], function(getNative) {
|
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
|
||||||
var undefined;
|
|
||||||
|
|
||||||
/* Used to set `toString` methods. */
|
|
||||||
var defineProperty = (function() {
|
|
||||||
var func = getNative(Object, 'defineProperty'),
|
|
||||||
name = getNative.name;
|
|
||||||
|
|
||||||
return (name && name.length > 2) ? func : undefined;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return defineProperty;
|
|
||||||
});
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_SetCache', './_arraySome'], function(SetCache, arraySome) {
|
define(['./_SetCache', './_arraySome', './_cacheHas'], function(SetCache, arraySome, cacheHas) {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
@@ -61,9 +61,9 @@ define(['./_SetCache', './_arraySome'], function(SetCache, arraySome) {
|
|||||||
// Recursively compare arrays (susceptible to call stack limits).
|
// Recursively compare arrays (susceptible to call stack limits).
|
||||||
if (seen) {
|
if (seen) {
|
||||||
if (!arraySome(other, function(othValue, othIndex) {
|
if (!arraySome(other, function(othValue, othIndex) {
|
||||||
if (!seen.has(othIndex) &&
|
if (!cacheHas(seen, othIndex) &&
|
||||||
(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
|
(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
|
||||||
return seen.add(othIndex);
|
return seen.push(othIndex);
|
||||||
}
|
}
|
||||||
})) {
|
})) {
|
||||||
result = false;
|
result = false;
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ define(['./_basePropertyOf'], function(basePropertyOf) {
|
|||||||
'<': '<',
|
'<': '<',
|
||||||
'>': '>',
|
'>': '>',
|
||||||
'"': '"',
|
'"': '"',
|
||||||
"'": ''',
|
"'": '''
|
||||||
'`': '`'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
18
_flatRest.js
Normal file
18
_flatRest.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
define(['./flatten', './_overRest', './_setToString'], function(flatten, overRest, setToString) {
|
||||||
|
|
||||||
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
|
var undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `baseRest` which flattens the rest array.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to apply a rest parameter to.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function flatRest(func) {
|
||||||
|
return setToString(overRest(func, undefined, flatten), func + '');
|
||||||
|
}
|
||||||
|
|
||||||
|
return flatRest;
|
||||||
|
});
|
||||||
@@ -38,8 +38,7 @@ define(['./_DataView', './_Map', './_Promise', './_Set', './_WeakMap', './_baseG
|
|||||||
*/
|
*/
|
||||||
var getTag = baseGetTag;
|
var getTag = baseGetTag;
|
||||||
|
|
||||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
||||||
// for data views in Edge, and promises in Node.js.
|
|
||||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||||
(Map && getTag(new Map) != mapTag) ||
|
(Map && getTag(new Map) != mapTag) ||
|
||||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||||
|
|||||||
14
_hasPath.js
14
_hasPath.js
@@ -1,4 +1,4 @@
|
|||||||
define(['./_castPath', './isArguments', './isArray', './_isIndex', './_isKey', './isLength', './isString', './_toKey'], function(castPath, isArguments, isArray, isIndex, isKey, isLength, isString, toKey) {
|
define(['./_castPath', './isArguments', './isArray', './_isIndex', './_isKey', './isLength', './_toKey'], function(castPath, isArguments, isArray, isIndex, isKey, isLength, toKey) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `path` exists on `object`.
|
* Checks if `path` exists on `object`.
|
||||||
@@ -12,9 +12,9 @@ define(['./_castPath', './isArguments', './isArray', './_isIndex', './_isKey', '
|
|||||||
function hasPath(object, path, hasFunc) {
|
function hasPath(object, path, hasFunc) {
|
||||||
path = isKey(path, object) ? [path] : castPath(path);
|
path = isKey(path, object) ? [path] : castPath(path);
|
||||||
|
|
||||||
var result,
|
var index = -1,
|
||||||
index = -1,
|
length = path.length,
|
||||||
length = path.length;
|
result = false;
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
var key = toKey(path[index]);
|
var key = toKey(path[index]);
|
||||||
@@ -23,12 +23,12 @@ define(['./_castPath', './isArguments', './isArray', './_isIndex', './_isKey', '
|
|||||||
}
|
}
|
||||||
object = object[key];
|
object = object[key];
|
||||||
}
|
}
|
||||||
if (result) {
|
if (result || ++index != length) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
var length = object ? object.length : 0;
|
length = object ? object.length : 0;
|
||||||
return !!length && isLength(length) && isIndex(key, length) &&
|
return !!length && isLength(length) && isIndex(key, length) &&
|
||||||
(isArray(object) || isString(object) || isArguments(object));
|
(isArray(object) || isArguments(object));
|
||||||
}
|
}
|
||||||
|
|
||||||
return hasPath;
|
return hasPath;
|
||||||
|
|||||||
@@ -10,7 +10,18 @@ define([], function() {
|
|||||||
var rsZWJ = '\\u200d';
|
var rsZWJ = '\\u200d';
|
||||||
|
|
||||||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
||||||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
||||||
|
|
||||||
return reHasComplexSymbol;
|
/**
|
||||||
|
* Checks if `string` contains Unicode symbols.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to inspect.
|
||||||
|
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
||||||
|
*/
|
||||||
|
function hasUnicode(string) {
|
||||||
|
return reHasUnicode.test(string);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hasUnicode;
|
||||||
});
|
});
|
||||||
18
_hasUnicodeWord.js
Normal file
18
_hasUnicodeWord.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/** Used to detect strings that need a more robust regexp to match words. */
|
||||||
|
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `string` contains a word composed of Unicode symbols.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to inspect.
|
||||||
|
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
||||||
|
*/
|
||||||
|
function hasUnicodeWord(string) {
|
||||||
|
return reHasUnicodeWord.test(string);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hasUnicodeWord;
|
||||||
|
});
|
||||||
@@ -9,6 +9,7 @@ define(['./_nativeCreate'], function(nativeCreate) {
|
|||||||
*/
|
*/
|
||||||
function hashClear() {
|
function hashClear() {
|
||||||
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
||||||
|
this.size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return hashClear;
|
return hashClear;
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ define([], function() {
|
|||||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||||
*/
|
*/
|
||||||
function hashDelete(key) {
|
function hashDelete(key) {
|
||||||
return this.has(key) && delete this.__data__[key];
|
var result = this.has(key) && delete this.__data__[key];
|
||||||
|
this.size -= result ? 1 : 0;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
return hashDelete;
|
return hashDelete;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ define(['./_nativeCreate'], function(nativeCreate) {
|
|||||||
*/
|
*/
|
||||||
function hashSet(key, value) {
|
function hashSet(key, value) {
|
||||||
var data = this.__data__;
|
var data = this.__data__;
|
||||||
|
this.size += this.has(key) ? 0 : 1;
|
||||||
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,11 @@ define([], function() {
|
|||||||
* @returns {string} Returns the modified source.
|
* @returns {string} Returns the modified source.
|
||||||
*/
|
*/
|
||||||
function insertWrapDetails(source, details) {
|
function insertWrapDetails(source, details) {
|
||||||
var length = details.length,
|
var length = details.length;
|
||||||
lastIndex = length - 1;
|
if (!length) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
var lastIndex = length - 1;
|
||||||
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
|
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
|
||||||
details = details.join(length > 2 ? ', ' : ' ');
|
details = details.join(length > 2 ? ', ' : ' ');
|
||||||
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
|
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
define([], function() {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is a host object in IE < 9.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
||||||
*/
|
|
||||||
function isHostObject(value) {
|
|
||||||
// Many host objects are `Object` objects that can coerce to strings
|
|
||||||
// despite having improperly defined `toString` methods.
|
|
||||||
var result = false;
|
|
||||||
if (value != null && typeof value.toString != 'function') {
|
|
||||||
try {
|
|
||||||
result = !!(value + '');
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return isHostObject;
|
|
||||||
});
|
|
||||||
@@ -9,6 +9,7 @@ define([], function() {
|
|||||||
*/
|
*/
|
||||||
function listCacheClear() {
|
function listCacheClear() {
|
||||||
this.__data__ = [];
|
this.__data__ = [];
|
||||||
|
this.size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return listCacheClear;
|
return listCacheClear;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ define(['./_assocIndexOf'], function(assocIndexOf) {
|
|||||||
} else {
|
} else {
|
||||||
splice.call(data, index, 1);
|
splice.call(data, index, 1);
|
||||||
}
|
}
|
||||||
|
--this.size;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ define(['./_assocIndexOf'], function(assocIndexOf) {
|
|||||||
index = assocIndexOf(data, key);
|
index = assocIndexOf(data, key);
|
||||||
|
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
|
++this.size;
|
||||||
data.push([key, value]);
|
data.push([key, value]);
|
||||||
} else {
|
} else {
|
||||||
data[index][1] = value;
|
data[index][1] = value;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ define(['./_Hash', './_ListCache', './_Map'], function(Hash, ListCache, Map) {
|
|||||||
* @memberOf MapCache
|
* @memberOf MapCache
|
||||||
*/
|
*/
|
||||||
function mapCacheClear() {
|
function mapCacheClear() {
|
||||||
|
this.size = 0;
|
||||||
this.__data__ = {
|
this.__data__ = {
|
||||||
'hash': new Hash,
|
'hash': new Hash,
|
||||||
'map': new (Map || ListCache),
|
'map': new (Map || ListCache),
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ define(['./_getMapData'], function(getMapData) {
|
|||||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||||
*/
|
*/
|
||||||
function mapCacheDelete(key) {
|
function mapCacheDelete(key) {
|
||||||
return getMapData(this, key)['delete'](key);
|
var result = getMapData(this, key)['delete'](key);
|
||||||
|
this.size -= result ? 1 : 0;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mapCacheDelete;
|
return mapCacheDelete;
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ define(['./_getMapData'], function(getMapData) {
|
|||||||
* @returns {Object} Returns the map cache instance.
|
* @returns {Object} Returns the map cache instance.
|
||||||
*/
|
*/
|
||||||
function mapCacheSet(key, value) {
|
function mapCacheSet(key, value) {
|
||||||
getMapData(this, key).set(key, value);
|
var data = getMapData(this, key),
|
||||||
|
size = data.size;
|
||||||
|
|
||||||
|
data.set(key, value);
|
||||||
|
this.size += data.size == size ? 0 : 1;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
27
_memoizeCapped.js
Normal file
27
_memoizeCapped.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
define(['./memoize'], function(memoize) {
|
||||||
|
|
||||||
|
/** Used as the maximum memoize cache size. */
|
||||||
|
var MAX_MEMOIZE_SIZE = 500;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.memoize` which clears the memoized function's
|
||||||
|
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to have its output memoized.
|
||||||
|
* @returns {Function} Returns the new memoized function.
|
||||||
|
*/
|
||||||
|
function memoizeCapped(func) {
|
||||||
|
var result = memoize(func, function(key) {
|
||||||
|
if (cache.size === MAX_MEMOIZE_SIZE) {
|
||||||
|
cache.clear();
|
||||||
|
}
|
||||||
|
return key;
|
||||||
|
});
|
||||||
|
|
||||||
|
var cache = result.cache;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return memoizeCapped;
|
||||||
|
});
|
||||||
7
_nativeDefineProperty.js
Normal file
7
_nativeDefineProperty.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
define(['./_getNative'], function(getNative) {
|
||||||
|
|
||||||
|
/* Built-in method references that are verified to be native. */
|
||||||
|
var nativeDefineProperty = getNative(Object, 'defineProperty');
|
||||||
|
|
||||||
|
return nativeDefineProperty;
|
||||||
|
});
|
||||||
40
_overRest.js
Normal file
40
_overRest.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
define(['./_apply'], function(apply) {
|
||||||
|
|
||||||
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
|
var undefined;
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeMax = Math.max;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `baseRest` which transforms the rest array.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to apply a rest parameter to.
|
||||||
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
||||||
|
* @param {Function} transform The rest array transform.
|
||||||
|
* @returns {Function} Returns the new function.
|
||||||
|
*/
|
||||||
|
function overRest(func, start, transform) {
|
||||||
|
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
||||||
|
return function() {
|
||||||
|
var args = arguments,
|
||||||
|
index = -1,
|
||||||
|
length = nativeMax(args.length - start, 0),
|
||||||
|
array = Array(length);
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
array[index] = args[start + index];
|
||||||
|
}
|
||||||
|
index = -1;
|
||||||
|
var otherArgs = Array(start + 1);
|
||||||
|
while (++index < start) {
|
||||||
|
otherArgs[index] = args[index];
|
||||||
|
}
|
||||||
|
otherArgs[start] = transform(array);
|
||||||
|
return apply(func, this, otherArgs);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return overRest;
|
||||||
|
});
|
||||||
26
_setData.js
26
_setData.js
@@ -1,8 +1,4 @@
|
|||||||
define(['./_baseSetData', './now'], function(baseSetData, now) {
|
define(['./_baseSetData', './_shortOut'], function(baseSetData, shortOut) {
|
||||||
|
|
||||||
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
||||||
var HOT_COUNT = 150,
|
|
||||||
HOT_SPAN = 16;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets metadata for `func`.
|
* Sets metadata for `func`.
|
||||||
@@ -18,25 +14,7 @@ define(['./_baseSetData', './now'], function(baseSetData, now) {
|
|||||||
* @param {*} data The metadata.
|
* @param {*} data The metadata.
|
||||||
* @returns {Function} Returns `func`.
|
* @returns {Function} Returns `func`.
|
||||||
*/
|
*/
|
||||||
var setData = (function() {
|
var setData = shortOut(baseSetData);
|
||||||
var count = 0,
|
|
||||||
lastCalled = 0;
|
|
||||||
|
|
||||||
return function(key, value) {
|
|
||||||
var stamp = now(),
|
|
||||||
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
||||||
|
|
||||||
lastCalled = stamp;
|
|
||||||
if (remaining > 0) {
|
|
||||||
if (++count >= HOT_COUNT) {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
count = 0;
|
|
||||||
}
|
|
||||||
return baseSetData(key, value);
|
|
||||||
};
|
|
||||||
}());
|
|
||||||
|
|
||||||
return setData;
|
return setData;
|
||||||
});
|
});
|
||||||
|
|||||||
14
_setToString.js
Normal file
14
_setToString.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
define(['./_baseSetToString', './_shortOut'], function(baseSetToString, shortOut) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the `toString` method of `func` to return `string`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to modify.
|
||||||
|
* @param {Function} string The `toString` result.
|
||||||
|
* @returns {Function} Returns `func`.
|
||||||
|
*/
|
||||||
|
var setToString = shortOut(baseSetToString);
|
||||||
|
|
||||||
|
return setToString;
|
||||||
|
});
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./constant', './_defineProperty', './_getWrapDetails', './identity', './_insertWrapDetails', './_updateWrapDetails'], function(constant, defineProperty, getWrapDetails, identity, insertWrapDetails, updateWrapDetails) {
|
define(['./_getWrapDetails', './_insertWrapDetails', './_setToString', './_updateWrapDetails'], function(getWrapDetails, insertWrapDetails, setToString, updateWrapDetails) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
|
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
|
||||||
@@ -10,14 +10,10 @@ define(['./constant', './_defineProperty', './_getWrapDetails', './identity', '.
|
|||||||
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
||||||
* @returns {Function} Returns `wrapper`.
|
* @returns {Function} Returns `wrapper`.
|
||||||
*/
|
*/
|
||||||
var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) {
|
function setWrapToString(wrapper, reference, bitmask) {
|
||||||
var source = (reference + '');
|
var source = (reference + '');
|
||||||
return defineProperty(wrapper, 'toString', {
|
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
||||||
'configurable': true,
|
}
|
||||||
'enumerable': false,
|
|
||||||
'value': constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)))
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return setWrapToString;
|
return setWrapToString;
|
||||||
});
|
});
|
||||||
|
|||||||
43
_shortOut.js
Normal file
43
_shortOut.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
|
var undefined;
|
||||||
|
|
||||||
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
||||||
|
var HOT_COUNT = 500,
|
||||||
|
HOT_SPAN = 16;
|
||||||
|
|
||||||
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||||
|
var nativeNow = Date.now;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a function that'll short out and invoke `identity` instead
|
||||||
|
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
||||||
|
* milliseconds.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Function} func The function to restrict.
|
||||||
|
* @returns {Function} Returns the new shortable function.
|
||||||
|
*/
|
||||||
|
function shortOut(func) {
|
||||||
|
var count = 0,
|
||||||
|
lastCalled = 0;
|
||||||
|
|
||||||
|
return function() {
|
||||||
|
var stamp = nativeNow(),
|
||||||
|
remaining = HOT_SPAN - (stamp - lastCalled);
|
||||||
|
|
||||||
|
lastCalled = stamp;
|
||||||
|
if (remaining > 0) {
|
||||||
|
if (++count >= HOT_COUNT) {
|
||||||
|
return arguments[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
count = 0;
|
||||||
|
}
|
||||||
|
return func.apply(undefined, arguments);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return shortOut;
|
||||||
|
});
|
||||||
26
_shuffleSelf.js
Normal file
26
_shuffleSelf.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
define(['./_baseRandom'], function(baseRandom) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `arrayShuffle` which mutates `array`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to shuffle.
|
||||||
|
* @returns {Array} Returns `array`.
|
||||||
|
*/
|
||||||
|
function shuffleSelf(array) {
|
||||||
|
var index = -1,
|
||||||
|
length = array.length,
|
||||||
|
lastIndex = length - 1;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var rand = baseRandom(index, lastIndex),
|
||||||
|
value = array[rand];
|
||||||
|
|
||||||
|
array[rand] = array[index];
|
||||||
|
array[index] = value;
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
return shuffleSelf;
|
||||||
|
});
|
||||||
@@ -9,6 +9,7 @@ define(['./_ListCache'], function(ListCache) {
|
|||||||
*/
|
*/
|
||||||
function stackClear() {
|
function stackClear() {
|
||||||
this.__data__ = new ListCache;
|
this.__data__ = new ListCache;
|
||||||
|
this.size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return stackClear;
|
return stackClear;
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ define([], function() {
|
|||||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||||
*/
|
*/
|
||||||
function stackDelete(key) {
|
function stackDelete(key) {
|
||||||
return this.__data__['delete'](key);
|
var data = this.__data__,
|
||||||
|
result = data['delete'](key);
|
||||||
|
|
||||||
|
this.size = data.size;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
return stackDelete;
|
return stackDelete;
|
||||||
|
|||||||
12
_stackSet.js
12
_stackSet.js
@@ -14,16 +14,18 @@ define(['./_ListCache', './_Map', './_MapCache'], function(ListCache, Map, MapCa
|
|||||||
* @returns {Object} Returns the stack cache instance.
|
* @returns {Object} Returns the stack cache instance.
|
||||||
*/
|
*/
|
||||||
function stackSet(key, value) {
|
function stackSet(key, value) {
|
||||||
var cache = this.__data__;
|
var data = this.__data__;
|
||||||
if (cache instanceof ListCache) {
|
if (data instanceof ListCache) {
|
||||||
var pairs = cache.__data__;
|
var pairs = data.__data__;
|
||||||
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
||||||
pairs.push([key, value]);
|
pairs.push([key, value]);
|
||||||
|
this.size = ++data.size;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
cache = this.__data__ = new MapCache(pairs);
|
data = this.__data__ = new MapCache(pairs);
|
||||||
}
|
}
|
||||||
cache.set(key, value);
|
data.set(key, value);
|
||||||
|
this.size = data.size;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
26
_strictIndexOf.js
Normal file
26
_strictIndexOf.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.indexOf` which performs strict equality
|
||||||
|
* comparisons of values, i.e. `===`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to inspect.
|
||||||
|
* @param {*} value The value to search for.
|
||||||
|
* @param {number} fromIndex The index to search from.
|
||||||
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
|
*/
|
||||||
|
function strictIndexOf(array, value, fromIndex) {
|
||||||
|
var index = fromIndex - 1,
|
||||||
|
length = array.length;
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
if (array[index] === value) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return strictIndexOf;
|
||||||
|
});
|
||||||
24
_strictLastIndexOf.js
Normal file
24
_strictLastIndexOf.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized version of `_.lastIndexOf` which performs strict equality
|
||||||
|
* comparisons of values, i.e. `===`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Array} array The array to inspect.
|
||||||
|
* @param {*} value The value to search for.
|
||||||
|
* @param {number} fromIndex The index to search from.
|
||||||
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
|
*/
|
||||||
|
function strictLastIndexOf(array, value, fromIndex) {
|
||||||
|
var index = fromIndex + 1;
|
||||||
|
while (index--) {
|
||||||
|
if (array[index] === value) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
return strictLastIndexOf;
|
||||||
|
});
|
||||||
@@ -1,30 +1,4 @@
|
|||||||
define(['./_reHasComplexSymbol'], function(reHasComplexSymbol) {
|
define(['./_asciiSize', './_hasUnicode', './_unicodeSize'], function(asciiSize, hasUnicode, unicodeSize) {
|
||||||
|
|
||||||
/** Used to compose unicode character classes. */
|
|
||||||
var rsAstralRange = '\\ud800-\\udfff',
|
|
||||||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
|
||||||
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
|
||||||
rsVarRange = '\\ufe0e\\ufe0f';
|
|
||||||
|
|
||||||
/** Used to compose unicode capture groups. */
|
|
||||||
var rsAstral = '[' + rsAstralRange + ']',
|
|
||||||
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
|
||||||
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
||||||
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
||||||
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
||||||
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
||||||
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
||||||
rsZWJ = '\\u200d';
|
|
||||||
|
|
||||||
/** Used to compose unicode regexes. */
|
|
||||||
var reOptMod = rsModifier + '?',
|
|
||||||
rsOptVar = '[' + rsVarRange + ']?',
|
|
||||||
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
||||||
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
||||||
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
||||||
|
|
||||||
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
||||||
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of symbols in `string`.
|
* Gets the number of symbols in `string`.
|
||||||
@@ -34,14 +8,9 @@ define(['./_reHasComplexSymbol'], function(reHasComplexSymbol) {
|
|||||||
* @returns {number} Returns the string size.
|
* @returns {number} Returns the string size.
|
||||||
*/
|
*/
|
||||||
function stringSize(string) {
|
function stringSize(string) {
|
||||||
if (!(string && reHasComplexSymbol.test(string))) {
|
return hasUnicode(string)
|
||||||
return string.length;
|
? unicodeSize(string)
|
||||||
}
|
: asciiSize(string);
|
||||||
var result = reComplexSymbol.lastIndex = 0;
|
|
||||||
while (reComplexSymbol.test(string)) {
|
|
||||||
result++;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return stringSize;
|
return stringSize;
|
||||||
|
|||||||
@@ -1,30 +1,4 @@
|
|||||||
define([], function() {
|
define(['./_asciiToArray', './_hasUnicode', './_unicodeToArray'], function(asciiToArray, hasUnicode, unicodeToArray) {
|
||||||
|
|
||||||
/** Used to compose unicode character classes. */
|
|
||||||
var rsAstralRange = '\\ud800-\\udfff',
|
|
||||||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
|
||||||
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
|
||||||
rsVarRange = '\\ufe0e\\ufe0f';
|
|
||||||
|
|
||||||
/** Used to compose unicode capture groups. */
|
|
||||||
var rsAstral = '[' + rsAstralRange + ']',
|
|
||||||
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
|
||||||
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
||||||
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
||||||
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
||||||
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
||||||
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
||||||
rsZWJ = '\\u200d';
|
|
||||||
|
|
||||||
/** Used to compose unicode regexes. */
|
|
||||||
var reOptMod = rsModifier + '?',
|
|
||||||
rsOptVar = '[' + rsVarRange + ']?',
|
|
||||||
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
||||||
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
||||||
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
||||||
|
|
||||||
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
||||||
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `string` to an array.
|
* Converts `string` to an array.
|
||||||
@@ -34,7 +8,9 @@ define([], function() {
|
|||||||
* @returns {Array} Returns the converted array.
|
* @returns {Array} Returns the converted array.
|
||||||
*/
|
*/
|
||||||
function stringToArray(string) {
|
function stringToArray(string) {
|
||||||
return string.match(reComplexSymbol);
|
return hasUnicode(string)
|
||||||
|
? unicodeToArray(string)
|
||||||
|
: asciiToArray(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
return stringToArray;
|
return stringToArray;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./memoize', './toString'], function(memoize, toString) {
|
define(['./_memoizeCapped', './toString'], function(memoizeCapped, toString) {
|
||||||
|
|
||||||
/** Used to match property names within property paths. */
|
/** Used to match property names within property paths. */
|
||||||
var reLeadingDot = /^\./,
|
var reLeadingDot = /^\./,
|
||||||
@@ -14,7 +14,7 @@ define(['./memoize', './toString'], function(memoize, toString) {
|
|||||||
* @param {string} string The string to convert.
|
* @param {string} string The string to convert.
|
||||||
* @returns {Array} Returns the property path array.
|
* @returns {Array} Returns the property path array.
|
||||||
*/
|
*/
|
||||||
var stringToPath = memoize(function(string) {
|
var stringToPath = memoizeCapped(function(string) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
|
|
||||||
var result = [];
|
var result = [];
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
define([], function() {
|
define([], function() {
|
||||||
|
|
||||||
|
/** Used for built-in method references. */
|
||||||
|
var funcProto = Function.prototype;
|
||||||
|
|
||||||
/** Used to resolve the decompiled source of functions. */
|
/** Used to resolve the decompiled source of functions. */
|
||||||
var funcToString = Function.prototype.toString;
|
var funcToString = funcProto.toString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `func` to its source code.
|
* Converts `func` to its source code.
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ define(['./_basePropertyOf'], function(basePropertyOf) {
|
|||||||
'<': '<',
|
'<': '<',
|
||||||
'>': '>',
|
'>': '>',
|
||||||
'"': '"',
|
'"': '"',
|
||||||
''': "'",
|
''': "'"
|
||||||
'`': '`'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
45
_unicodeSize.js
Normal file
45
_unicodeSize.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/** Used to compose unicode character classes. */
|
||||||
|
var rsAstralRange = '\\ud800-\\udfff',
|
||||||
|
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
||||||
|
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
||||||
|
rsVarRange = '\\ufe0e\\ufe0f';
|
||||||
|
|
||||||
|
/** Used to compose unicode capture groups. */
|
||||||
|
var rsAstral = '[' + rsAstralRange + ']',
|
||||||
|
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
||||||
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
||||||
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
||||||
|
rsNonAstral = '[^' + rsAstralRange + ']',
|
||||||
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
||||||
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
||||||
|
rsZWJ = '\\u200d';
|
||||||
|
|
||||||
|
/** Used to compose unicode regexes. */
|
||||||
|
var reOptMod = rsModifier + '?',
|
||||||
|
rsOptVar = '[' + rsVarRange + ']?',
|
||||||
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
||||||
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
||||||
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
||||||
|
|
||||||
|
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
||||||
|
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the size of a Unicode `string`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string inspect.
|
||||||
|
* @returns {number} Returns the string size.
|
||||||
|
*/
|
||||||
|
function unicodeSize(string) {
|
||||||
|
var result = reUnicode.lastIndex = 0;
|
||||||
|
while (reUnicode.test(string)) {
|
||||||
|
++result;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return unicodeSize;
|
||||||
|
});
|
||||||
41
_unicodeToArray.js
Normal file
41
_unicodeToArray.js
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/** Used to compose unicode character classes. */
|
||||||
|
var rsAstralRange = '\\ud800-\\udfff',
|
||||||
|
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
||||||
|
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
||||||
|
rsVarRange = '\\ufe0e\\ufe0f';
|
||||||
|
|
||||||
|
/** Used to compose unicode capture groups. */
|
||||||
|
var rsAstral = '[' + rsAstralRange + ']',
|
||||||
|
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
||||||
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
||||||
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
||||||
|
rsNonAstral = '[^' + rsAstralRange + ']',
|
||||||
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
||||||
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
||||||
|
rsZWJ = '\\u200d';
|
||||||
|
|
||||||
|
/** Used to compose unicode regexes. */
|
||||||
|
var reOptMod = rsModifier + '?',
|
||||||
|
rsOptVar = '[' + rsVarRange + ']?',
|
||||||
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
||||||
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
||||||
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
||||||
|
|
||||||
|
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
||||||
|
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a Unicode `string` to an array.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to convert.
|
||||||
|
* @returns {Array} Returns the converted array.
|
||||||
|
*/
|
||||||
|
function unicodeToArray(string) {
|
||||||
|
return string.match(reUnicode) || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return unicodeToArray;
|
||||||
|
});
|
||||||
66
_unicodeWords.js
Normal file
66
_unicodeWords.js
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
/** Used to compose unicode character classes. */
|
||||||
|
var rsAstralRange = '\\ud800-\\udfff',
|
||||||
|
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
||||||
|
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
||||||
|
rsDingbatRange = '\\u2700-\\u27bf',
|
||||||
|
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
||||||
|
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
||||||
|
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
||||||
|
rsPunctuationRange = '\\u2000-\\u206f',
|
||||||
|
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
||||||
|
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
||||||
|
rsVarRange = '\\ufe0e\\ufe0f',
|
||||||
|
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
||||||
|
|
||||||
|
/** Used to compose unicode capture groups. */
|
||||||
|
var rsApos = "['\u2019]",
|
||||||
|
rsBreak = '[' + rsBreakRange + ']',
|
||||||
|
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
||||||
|
rsDigits = '\\d+',
|
||||||
|
rsDingbat = '[' + rsDingbatRange + ']',
|
||||||
|
rsLower = '[' + rsLowerRange + ']',
|
||||||
|
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
||||||
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
||||||
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
||||||
|
rsNonAstral = '[^' + rsAstralRange + ']',
|
||||||
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
||||||
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
||||||
|
rsUpper = '[' + rsUpperRange + ']',
|
||||||
|
rsZWJ = '\\u200d';
|
||||||
|
|
||||||
|
/** Used to compose unicode regexes. */
|
||||||
|
var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
|
||||||
|
rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
|
||||||
|
rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
||||||
|
rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
||||||
|
reOptMod = rsModifier + '?',
|
||||||
|
rsOptVar = '[' + rsVarRange + ']?',
|
||||||
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
||||||
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
||||||
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
||||||
|
|
||||||
|
/** Used to match complex or compound words. */
|
||||||
|
var reUnicodeWord = RegExp([
|
||||||
|
rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
||||||
|
rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
|
||||||
|
rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
|
||||||
|
rsUpper + '+' + rsOptUpperContr,
|
||||||
|
rsDigits,
|
||||||
|
rsEmoji
|
||||||
|
].join('|'), 'g');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Splits a Unicode `string` into an array of its words.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} The string to inspect.
|
||||||
|
* @returns {Array} Returns the words of `string`.
|
||||||
|
*/
|
||||||
|
function unicodeWords(string) {
|
||||||
|
return string.match(reUnicodeWord) || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return unicodeWords;
|
||||||
|
});
|
||||||
@@ -6,12 +6,6 @@ define(['./_assignValue', './_copyObject', './_createAssigner', './isArrayLike',
|
|||||||
/** Used to check objects for own properties. */
|
/** Used to check objects for own properties. */
|
||||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
/** Built-in value references. */
|
|
||||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
||||||
|
|
||||||
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
|
|
||||||
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns own enumerable string keyed properties of source objects to the
|
* Assigns own enumerable string keyed properties of source objects to the
|
||||||
* destination object. Source objects are applied from left to right.
|
* destination object. Source objects are applied from left to right.
|
||||||
@@ -45,7 +39,7 @@ define(['./_assignValue', './_copyObject', './_createAssigner', './isArrayLike',
|
|||||||
* // => { 'a': 1, 'c': 3 }
|
* // => { 'a': 1, 'c': 3 }
|
||||||
*/
|
*/
|
||||||
var assign = createAssigner(function(object, source) {
|
var assign = createAssigner(function(object, source) {
|
||||||
if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
|
if (isPrototype(source) || isArrayLike(source)) {
|
||||||
copyObject(source, keys(source), object);
|
copyObject(source, keys(source), object);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
6
at.js
6
at.js
@@ -1,4 +1,4 @@
|
|||||||
define(['./_baseAt', './_baseFlatten', './_baseRest'], function(baseAt, baseFlatten, baseRest) {
|
define(['./_baseAt', './_flatRest'], function(baseAt, flatRest) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an array of values corresponding to `paths` of `object`.
|
* Creates an array of values corresponding to `paths` of `object`.
|
||||||
@@ -17,9 +17,7 @@ define(['./_baseAt', './_baseFlatten', './_baseRest'], function(baseAt, baseFlat
|
|||||||
* _.at(object, ['a[0].b.c', 'a[1]']);
|
* _.at(object, ['a[0].b.c', 'a[1]']);
|
||||||
* // => [3, 4]
|
* // => [3, 4]
|
||||||
*/
|
*/
|
||||||
var at = baseRest(function(object, paths) {
|
var at = flatRest(baseAt);
|
||||||
return baseAt(object, baseFlatten(paths, 1));
|
|
||||||
});
|
|
||||||
|
|
||||||
return at;
|
return at;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_arrayEach', './_baseFlatten', './_baseRest', './bind', './_toKey'], function(arrayEach, baseFlatten, baseRest, bind, toKey) {
|
define(['./_arrayEach', './_baseAssignValue', './bind', './_flatRest', './_toKey'], function(arrayEach, baseAssignValue, bind, flatRest, toKey) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Binds methods of an object to the object itself, overwriting the existing
|
* Binds methods of an object to the object itself, overwriting the existing
|
||||||
@@ -26,10 +26,10 @@ define(['./_arrayEach', './_baseFlatten', './_baseRest', './bind', './_toKey'],
|
|||||||
* jQuery(element).on('click', view.click);
|
* jQuery(element).on('click', view.click);
|
||||||
* // => Logs 'clicked docs' when clicked.
|
* // => Logs 'clicked docs' when clicked.
|
||||||
*/
|
*/
|
||||||
var bindAll = baseRest(function(object, methodNames) {
|
var bindAll = flatRest(function(object, methodNames) {
|
||||||
arrayEach(baseFlatten(methodNames, 1), function(key) {
|
arrayEach(methodNames, function(key) {
|
||||||
key = toKey(key);
|
key = toKey(key);
|
||||||
object[key] = bind(object[key], object);
|
baseAssignValue(object, key, bind(object[key], object));
|
||||||
});
|
});
|
||||||
return object;
|
return object;
|
||||||
});
|
});
|
||||||
|
|||||||
11
concat.js
11
concat.js
@@ -23,17 +23,18 @@ define(['./_arrayPush', './_baseFlatten', './_copyArray', './isArray'], function
|
|||||||
* // => [1]
|
* // => [1]
|
||||||
*/
|
*/
|
||||||
function concat() {
|
function concat() {
|
||||||
var length = arguments.length,
|
var length = arguments.length;
|
||||||
args = Array(length ? length - 1 : 0),
|
if (!length) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
var args = Array(length - 1),
|
||||||
array = arguments[0],
|
array = arguments[0],
|
||||||
index = length;
|
index = length;
|
||||||
|
|
||||||
while (index--) {
|
while (index--) {
|
||||||
args[index - 1] = arguments[index];
|
args[index - 1] = arguments[index];
|
||||||
}
|
}
|
||||||
return length
|
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
||||||
? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
|
|
||||||
: [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return concat;
|
return concat;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_createAggregator'], function(createAggregator) {
|
define(['./_baseAssignValue', './_createAggregator'], function(baseAssignValue, createAggregator) {
|
||||||
|
|
||||||
/** Used for built-in method references. */
|
/** Used for built-in method references. */
|
||||||
var objectProto = Object.prototype;
|
var objectProto = Object.prototype;
|
||||||
@@ -30,7 +30,11 @@ define(['./_createAggregator'], function(createAggregator) {
|
|||||||
* // => { '3': 2, '5': 1 }
|
* // => { '3': 2, '5': 1 }
|
||||||
*/
|
*/
|
||||||
var countBy = createAggregator(function(result, value, key) {
|
var countBy = createAggregator(function(result, value, key) {
|
||||||
hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
|
if (hasOwnProperty.call(result, key)) {
|
||||||
|
++result[key];
|
||||||
|
} else {
|
||||||
|
baseAssignValue(result, key, 1);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return countBy;
|
return countBy;
|
||||||
|
|||||||
11
deburr.js
11
deburr.js
@@ -1,7 +1,7 @@
|
|||||||
define(['./_deburrLetter', './toString'], function(deburrLetter, toString) {
|
define(['./_deburrLetter', './toString'], function(deburrLetter, toString) {
|
||||||
|
|
||||||
/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
|
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
||||||
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
|
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
||||||
|
|
||||||
/** Used to compose unicode character classes. */
|
/** Used to compose unicode character classes. */
|
||||||
var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
||||||
@@ -18,8 +18,9 @@ define(['./_deburrLetter', './toString'], function(deburrLetter, toString) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Deburrs `string` by converting
|
* Deburrs `string` by converting
|
||||||
* [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
||||||
* to basic latin letters and removing
|
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
||||||
|
* letters to basic Latin letters and removing
|
||||||
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -35,7 +36,7 @@ define(['./_deburrLetter', './toString'], function(deburrLetter, toString) {
|
|||||||
*/
|
*/
|
||||||
function deburr(string) {
|
function deburr(string) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
|
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
return deburr;
|
return deburr;
|
||||||
|
|||||||
2
defer.js
2
defer.js
@@ -16,7 +16,7 @@ define(['./_baseDelay', './_baseRest'], function(baseDelay, baseRest) {
|
|||||||
* _.defer(function(text) {
|
* _.defer(function(text) {
|
||||||
* console.log(text);
|
* console.log(text);
|
||||||
* }, 'deferred');
|
* }, 'deferred');
|
||||||
* // => Logs 'deferred' after one or more milliseconds.
|
* // => Logs 'deferred' after one millisecond.
|
||||||
*/
|
*/
|
||||||
var defer = baseRest(function(func, args) {
|
var defer = baseRest(function(func, args) {
|
||||||
return baseDelay(func, 1, args);
|
return baseDelay(func, 1, args);
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ define(['./_baseDifference', './_baseFlatten', './_baseRest', './isArrayLikeObje
|
|||||||
/**
|
/**
|
||||||
* Creates an array of `array` values not included in the other given arrays
|
* Creates an array of `array` values not included in the other given arrays
|
||||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||||
* for equality comparisons. The order of result values is determined by the
|
* for equality comparisons. The order and references of result values are
|
||||||
* order they occur in the first array.
|
* determined by the first array.
|
||||||
*
|
*
|
||||||
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ define(['./_baseDifference', './_baseFlatten', './_baseIteratee', './_baseRest',
|
|||||||
/**
|
/**
|
||||||
* This method is like `_.difference` except that it accepts `iteratee` which
|
* This method is like `_.difference` except that it accepts `iteratee` which
|
||||||
* is invoked for each element of `array` and `values` to generate the criterion
|
* is invoked for each element of `array` and `values` to generate the criterion
|
||||||
* by which they're compared. Result values are chosen from the first array.
|
* by which they're compared. The order and references of result values are
|
||||||
* The iteratee is invoked with one argument: (value).
|
* determined by the first array. The iteratee is invoked with one argument:
|
||||||
|
* (value).
|
||||||
*
|
*
|
||||||
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
|
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ define(['./_baseDifference', './_baseFlatten', './_baseRest', './isArrayLikeObje
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is like `_.difference` except that it accepts `comparator`
|
* This method is like `_.difference` except that it accepts `comparator`
|
||||||
* which is invoked to compare elements of `array` to `values`. Result values
|
* which is invoked to compare elements of `array` to `values`. The order and
|
||||||
* are chosen from the first array. The comparator is invoked with two arguments:
|
* references of result values are determined by the first array. The comparator
|
||||||
* (arrVal, othVal).
|
* is invoked with two arguments: (arrVal, othVal).
|
||||||
*
|
*
|
||||||
* **Note:** Unlike `_.pullAllWith`, this method returns a new array.
|
* **Note:** Unlike `_.pullAllWith`, this method returns a new array.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ define(['./_baseClamp', './_baseToString', './toInteger', './toString'], functio
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @category String
|
* @category String
|
||||||
* @param {string} [string=''] The string to search.
|
* @param {string} [string=''] The string to inspect.
|
||||||
* @param {string} [target] The string to search for.
|
* @param {string} [target] The string to search for.
|
||||||
* @param {number} [position=string.length] The position to search up to.
|
* @param {number} [position=string.length] The position to search up to.
|
||||||
* @returns {boolean} Returns `true` if `string` ends with `target`,
|
* @returns {boolean} Returns `true` if `string` ends with `target`,
|
||||||
|
|||||||
10
escape.js
10
escape.js
@@ -5,8 +5,8 @@ define(['./_escapeHtmlChar', './toString'], function(escapeHtmlChar, toString) {
|
|||||||
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
|
* Converts the characters "&", "<", ">", '"', and "'" in `string` to their
|
||||||
* their corresponding HTML entities.
|
* corresponding HTML entities.
|
||||||
*
|
*
|
||||||
* **Note:** No other characters are escaped. To escape additional
|
* **Note:** No other characters are escaped. To escape additional
|
||||||
* characters use a third-party library like [_he_](https://mths.be/he).
|
* characters use a third-party library like [_he_](https://mths.be/he).
|
||||||
@@ -17,12 +17,6 @@ define(['./_escapeHtmlChar', './toString'], function(escapeHtmlChar, toString) {
|
|||||||
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
|
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
|
||||||
* (under "semi-related fun fact") for more details.
|
* (under "semi-related fun fact") for more details.
|
||||||
*
|
*
|
||||||
* Backticks are escaped because in IE < 9, they can break out of
|
|
||||||
* attribute values or HTML comments. See [#59](https://html5sec.org/#59),
|
|
||||||
* [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
|
|
||||||
* [#133](https://html5sec.org/#133) of the
|
|
||||||
* [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
|
|
||||||
*
|
|
||||||
* When working with HTML you should always
|
* When working with HTML you should always
|
||||||
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
|
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
|
||||||
* XSS vectors.
|
* XSS vectors.
|
||||||
|
|||||||
2
find.js
2
find.js
@@ -9,7 +9,7 @@ define(['./_createFind', './findIndex'], function(createFind, findIndex) {
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @category Collection
|
* @category Collection
|
||||||
* @param {Array|Object} collection The collection to search.
|
* @param {Array|Object} collection The collection to inspect.
|
||||||
* @param {Function} [predicate=_.identity]
|
* @param {Function} [predicate=_.identity]
|
||||||
* The function invoked per iteration.
|
* The function invoked per iteration.
|
||||||
* @param {number} [fromIndex=0] The index to search from.
|
* @param {number} [fromIndex=0] The index to search from.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ define(['./_baseFindIndex', './_baseIteratee', './toInteger'], function(baseFind
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
* @category Array
|
* @category Array
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {Function} [predicate=_.identity]
|
* @param {Function} [predicate=_.identity]
|
||||||
* The function invoked per iteration.
|
* The function invoked per iteration.
|
||||||
* @param {number} [fromIndex=0] The index to search from.
|
* @param {number} [fromIndex=0] The index to search from.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ define(['./_baseFindKey', './_baseForOwn', './_baseIteratee'], function(baseFind
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
* @category Object
|
* @category Object
|
||||||
* @param {Object} object The object to search.
|
* @param {Object} object The object to inspect.
|
||||||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||||||
* @returns {string|undefined} Returns the key of the matched element,
|
* @returns {string|undefined} Returns the key of the matched element,
|
||||||
* else `undefined`.
|
* else `undefined`.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ define(['./_createFind', './findLastIndex'], function(createFind, findLastIndex)
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @category Collection
|
* @category Collection
|
||||||
* @param {Array|Object} collection The collection to search.
|
* @param {Array|Object} collection The collection to inspect.
|
||||||
* @param {Function} [predicate=_.identity]
|
* @param {Function} [predicate=_.identity]
|
||||||
* The function invoked per iteration.
|
* The function invoked per iteration.
|
||||||
* @param {number} [fromIndex=collection.length-1] The index to search from.
|
* @param {number} [fromIndex=collection.length-1] The index to search from.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ define(['./_baseFindIndex', './_baseIteratee', './toInteger'], function(baseFind
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @category Array
|
* @category Array
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {Function} [predicate=_.identity]
|
* @param {Function} [predicate=_.identity]
|
||||||
* The function invoked per iteration.
|
* The function invoked per iteration.
|
||||||
* @param {number} [fromIndex=array.length-1] The index to search from.
|
* @param {number} [fromIndex=array.length-1] The index to search from.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ define(['./_baseFindKey', './_baseForOwnRight', './_baseIteratee'], function(bas
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @category Object
|
* @category Object
|
||||||
* @param {Object} object The object to search.
|
* @param {Object} object The object to inspect.
|
||||||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||||||
* @returns {string|undefined} Returns the key of the matched element,
|
* @returns {string|undefined} Returns the key of the matched element,
|
||||||
* else `undefined`.
|
* else `undefined`.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ define(['./_arrayEach', './_baseEach', './_baseIteratee', './isArray'], function
|
|||||||
* @see _.forEachRight
|
* @see _.forEachRight
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _([1, 2]).forEach(function(value) {
|
* _.forEach([1, 2], function(value) {
|
||||||
* console.log(value);
|
* console.log(value);
|
||||||
* });
|
* });
|
||||||
* // => Logs `1` then `2`.
|
* // => Logs `1` then `2`.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(['./_createAggregator'], function(createAggregator) {
|
define(['./_baseAssignValue', './_createAggregator'], function(baseAssignValue, createAggregator) {
|
||||||
|
|
||||||
/** Used for built-in method references. */
|
/** Used for built-in method references. */
|
||||||
var objectProto = Object.prototype;
|
var objectProto = Object.prototype;
|
||||||
@@ -34,7 +34,7 @@ define(['./_createAggregator'], function(createAggregator) {
|
|||||||
if (hasOwnProperty.call(result, key)) {
|
if (hasOwnProperty.call(result, key)) {
|
||||||
result[key].push(value);
|
result[key].push(value);
|
||||||
} else {
|
} else {
|
||||||
result[key] = [value];
|
baseAssignValue(result, key, [value]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ define(['./_baseIndexOf', './isArrayLike', './isString', './toInteger', './value
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @category Collection
|
* @category Collection
|
||||||
* @param {Array|Object|string} collection The collection to search.
|
* @param {Array|Object|string} collection The collection to inspect.
|
||||||
* @param {*} value The value to search for.
|
* @param {*} value The value to search for.
|
||||||
* @param {number} [fromIndex=0] The index to search from.
|
* @param {number} [fromIndex=0] The index to search from.
|
||||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ define(['./_baseIndexOf', './toInteger'], function(baseIndexOf, toInteger) {
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @category Array
|
* @category Array
|
||||||
* @param {Array} array The array to search.
|
* @param {Array} array The array to inspect.
|
||||||
* @param {*} value The value to search for.
|
* @param {*} value The value to search for.
|
||||||
* @param {number} [fromIndex=0] The index to search from.
|
* @param {number} [fromIndex=0] The index to search from.
|
||||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ define(['./_arrayMap', './_baseIntersection', './_baseRest', './_castArrayLikeOb
|
|||||||
/**
|
/**
|
||||||
* Creates an array of unique values that are included in all given arrays
|
* Creates an array of unique values that are included in all given arrays
|
||||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||||
* for equality comparisons. The order of result values is determined by the
|
* for equality comparisons. The order and references of result values are
|
||||||
* order they occur in the first array.
|
* determined by the first array.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user