Compare commits

...

2 Commits

Author SHA1 Message Date
John-David Dalton
35cdf6513b Bump to v4.13.0. 2016-05-22 19:35:24 -07:00
John-David Dalton
07c844053e Bump to v4.12.0. 2016-05-08 12:23:20 -07:00
542 changed files with 3150 additions and 2863 deletions

View File

@@ -1,4 +1,4 @@
# lodash-es v4.11.2 # lodash-es v4.13.0
The [Lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules. The [Lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules.
@@ -7,4 +7,4 @@ Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
$ lodash modularize exports=es -o ./ $ lodash modularize exports=es -o ./
``` ```
See the [package source](https://github.com/lodash/lodash/tree/4.11.2-es) for more details. See the [package source](https://github.com/lodash/lodash/tree/4.13.0-es) for more details.

View File

@@ -1,5 +1,5 @@
import getNative from './_getNative'; import getNative from './_getNative.js';
import root from './_root'; import root from './_root.js';
/* Built-in method references that are verified to be native. */ /* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'); var DataView = getNative(root, 'DataView');

View File

@@ -1,18 +1,32 @@
import nativeCreate from './_nativeCreate'; import hashClear from './_hashClear.js';
import hashDelete from './_hashDelete.js';
/** Used for built-in method references. */ import hashGet from './_hashGet.js';
var objectProto = Object.prototype; import hashHas from './_hashHas.js';
import hashSet from './_hashSet.js';
/** /**
* Creates a hash object. * Creates a hash object.
* *
* @private * @private
* @constructor * @constructor
* @returns {Object} Returns the new hash object. * @param {Array} [entries] The key-value pairs to cache.
*/ */
function Hash() {} function Hash(entries) {
var index = -1,
length = entries ? entries.length : 0;
// Avoid inheriting from `Object.prototype` when possible. this.clear();
Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
export default Hash; export default Hash;

View File

@@ -1,5 +1,5 @@
import baseCreate from './_baseCreate'; import baseCreate from './_baseCreate.js';
import baseLodash from './_baseLodash'; import baseLodash from './_baseLodash.js';
/** Used as references for the maximum length and index of an array. */ /** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295; var MAX_ARRAY_LENGTH = 4294967295;

32
_ListCache.js Normal file
View File

@@ -0,0 +1,32 @@
import listCacheClear from './_listCacheClear.js';
import listCacheDelete from './_listCacheDelete.js';
import listCacheGet from './_listCacheGet.js';
import listCacheHas from './_listCacheHas.js';
import listCacheSet from './_listCacheSet.js';
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
export default ListCache;

View File

@@ -1,5 +1,5 @@
import baseCreate from './_baseCreate'; import baseCreate from './_baseCreate.js';
import baseLodash from './_baseLodash'; import baseLodash from './_baseLodash.js';
/** /**
* The base constructor for creating `lodash` wrapper objects. * The base constructor for creating `lodash` wrapper objects.

View File

@@ -1,5 +1,5 @@
import getNative from './_getNative'; import getNative from './_getNative.js';
import root from './_root'; import root from './_root.js';
/* Built-in method references that are verified to be native. */ /* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map'); var Map = getNative(root, 'Map');

View File

@@ -1,32 +1,32 @@
import mapClear from './_mapClear'; import mapCacheClear from './_mapCacheClear.js';
import mapDelete from './_mapDelete'; import mapCacheDelete from './_mapCacheDelete.js';
import mapGet from './_mapGet'; import mapCacheGet from './_mapCacheGet.js';
import mapHas from './_mapHas'; import mapCacheHas from './_mapCacheHas.js';
import mapSet from './_mapSet'; import mapCacheSet from './_mapCacheSet.js';
/** /**
* Creates a map cache object to store key-value pairs. * Creates a map cache object to store key-value pairs.
* *
* @private * @private
* @constructor * @constructor
* @param {Array} [values] The values to cache. * @param {Array} [entries] The key-value pairs to cache.
*/ */
function MapCache(values) { function MapCache(entries) {
var index = -1, var index = -1,
length = values ? values.length : 0; length = entries ? entries.length : 0;
this.clear(); this.clear();
while (++index < length) { while (++index < length) {
var entry = values[index]; var entry = entries[index];
this.set(entry[0], entry[1]); this.set(entry[0], entry[1]);
} }
} }
// Add methods to `MapCache`. // Add methods to `MapCache`.
MapCache.prototype.clear = mapClear; MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapDelete; MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapGet; MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapHas; MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapSet; MapCache.prototype.set = mapCacheSet;
export default MapCache; export default MapCache;

View File

@@ -1,5 +1,5 @@
import getNative from './_getNative'; import getNative from './_getNative.js';
import root from './_root'; import root from './_root.js';
/* Built-in method references that are verified to be native. */ /* Built-in method references that are verified to be native. */
var Promise = getNative(root, 'Promise'); var Promise = getNative(root, 'Promise');

View File

@@ -1,4 +1,4 @@
import root from './_root'; import root from './_root.js';
/** Built-in value references. */ /** Built-in value references. */
var Reflect = root.Reflect; var Reflect = root.Reflect;

View File

@@ -1,5 +1,5 @@
import getNative from './_getNative'; import getNative from './_getNative.js';
import root from './_root'; import root from './_root.js';
/* Built-in method references that are verified to be native. */ /* Built-in method references that are verified to be native. */
var Set = getNative(root, 'Set'); var Set = getNative(root, 'Set');

View File

@@ -1,9 +1,10 @@
import MapCache from './_MapCache'; import MapCache from './_MapCache.js';
import cachePush from './_cachePush'; import setCacheAdd from './_setCacheAdd.js';
import setCacheHas from './_setCacheHas.js';
/** /**
* *
* Creates a set cache object to store unique values. * Creates an array cache object to store unique values.
* *
* @private * @private
* @constructor * @constructor
@@ -15,11 +16,12 @@ function SetCache(values) {
this.__data__ = new MapCache; this.__data__ = new MapCache;
while (++index < length) { while (++index < length) {
this.push(values[index]); this.add(values[index]);
} }
} }
// Add methods to `SetCache`. // Add methods to `SetCache`.
SetCache.prototype.push = cachePush; SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
export default SetCache; export default SetCache;

View File

@@ -1,25 +1,19 @@
import stackClear from './_stackClear'; import ListCache from './_ListCache.js';
import stackDelete from './_stackDelete'; import stackClear from './_stackClear.js';
import stackGet from './_stackGet'; import stackDelete from './_stackDelete.js';
import stackHas from './_stackHas'; import stackGet from './_stackGet.js';
import stackSet from './_stackSet'; import stackHas from './_stackHas.js';
import stackSet from './_stackSet.js';
/** /**
* Creates a stack cache object to store key-value pairs. * Creates a stack cache object to store key-value pairs.
* *
* @private * @private
* @constructor * @constructor
* @param {Array} [values] The values to cache. * @param {Array} [entries] The key-value pairs to cache.
*/ */
function Stack(values) { function Stack(entries) {
var index = -1, this.__data__ = new ListCache(entries);
length = values ? values.length : 0;
this.clear();
while (++index < length) {
var entry = values[index];
this.set(entry[0], entry[1]);
}
} }
// Add methods to `Stack`. // Add methods to `Stack`.

View File

@@ -1,4 +1,4 @@
import root from './_root'; import root from './_root.js';
/** Built-in value references. */ /** Built-in value references. */
var Symbol = root.Symbol; var Symbol = root.Symbol;

View File

@@ -1,4 +1,4 @@
import root from './_root'; import root from './_root.js';
/** Built-in value references. */ /** Built-in value references. */
var Uint8Array = root.Uint8Array; var Uint8Array = root.Uint8Array;

View File

@@ -1,5 +1,5 @@
import getNative from './_getNative'; import getNative from './_getNative.js';
import root from './_root'; import root from './_root.js';
/* Built-in method references that are verified to be native. */ /* Built-in method references that are verified to be native. */
var WeakMap = getNative(root, 'WeakMap'); var WeakMap = getNative(root, 'WeakMap');

View File

@@ -2,7 +2,7 @@
* A specialized version of `baseAggregator` for arrays. * A specialized version of `baseAggregator` for arrays.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} setter The function to set `accumulator` values. * @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform keys. * @param {Function} iteratee The iteratee to transform keys.
* @param {Object} accumulator The initial aggregated object. * @param {Object} accumulator The initial aggregated object.
@@ -10,7 +10,7 @@
*/ */
function arrayAggregator(array, setter, iteratee, accumulator) { function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1, var index = -1,
length = array.length; length = array ? array.length : 0;
while (++index < length) { while (++index < length) {
var value = array[index]; var value = array[index];

View File

@@ -1,25 +0,0 @@
/**
* Creates a new array concatenating `array` with `other`.
*
* @private
* @param {Array} array The first array to concatenate.
* @param {Array} other The second array to concatenate.
* @returns {Array} Returns the new concatenated array.
*/
function arrayConcat(array, other) {
var index = -1,
length = array.length,
othIndex = -1,
othLength = other.length,
result = Array(length + othLength);
while (++index < length) {
result[index] = array[index];
}
while (++othIndex < othLength) {
result[index++] = other[othIndex];
}
return result;
}
export default arrayConcat;

View File

@@ -3,13 +3,13 @@
* iteratee shorthands. * iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration. * @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`. * @returns {Array} Returns `array`.
*/ */
function arrayEach(array, iteratee) { function arrayEach(array, iteratee) {
var index = -1, var index = -1,
length = array.length; length = array ? array.length : 0;
while (++index < length) { while (++index < length) {
if (iteratee(array[index], index, array) === false) { if (iteratee(array[index], index, array) === false) {

View File

@@ -3,12 +3,12 @@
* iteratee shorthands. * iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration. * @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`. * @returns {Array} Returns `array`.
*/ */
function arrayEachRight(array, iteratee) { function arrayEachRight(array, iteratee) {
var length = array.length; var length = array ? array.length : 0;
while (length--) { while (length--) {
if (iteratee(array[length], length, array) === false) { if (iteratee(array[length], length, array) === false) {

View File

@@ -3,14 +3,14 @@
* iteratee shorthands. * iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration. * @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check, * @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`. * else `false`.
*/ */
function arrayEvery(array, predicate) { function arrayEvery(array, predicate) {
var index = -1, var index = -1,
length = array.length; length = array ? array.length : 0;
while (++index < length) { while (++index < length) {
if (!predicate(array[index], index, array)) { if (!predicate(array[index], index, array)) {

View File

@@ -3,13 +3,13 @@
* iteratee shorthands. * iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration. * @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array. * @returns {Array} Returns the new filtered array.
*/ */
function arrayFilter(array, predicate) { function arrayFilter(array, predicate) {
var index = -1, var index = -1,
length = array.length, length = array ? array.length : 0,
resIndex = 0, resIndex = 0,
result = []; result = [];

View File

@@ -1,16 +1,17 @@
import baseIndexOf from './_baseIndexOf'; import baseIndexOf from './_baseIndexOf.js';
/** /**
* A specialized version of `_.includes` for arrays without support for * A specialized version of `_.includes` for arrays without support for
* 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 search.
* @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`.
*/ */
function arrayIncludes(array, value) { function arrayIncludes(array, value) {
return !!array.length && baseIndexOf(array, value, 0) > -1; var length = array ? array.length : 0;
return !!length && baseIndexOf(array, value, 0) > -1;
} }
export default arrayIncludes; export default arrayIncludes;

View File

@@ -2,14 +2,14 @@
* 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 search.
* @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`.
*/ */
function arrayIncludesWith(array, value, comparator) { function arrayIncludesWith(array, value, comparator) {
var index = -1, var index = -1,
length = array.length; length = array ? array.length : 0;
while (++index < length) { while (++index < length) {
if (comparator(value, array[index])) { if (comparator(value, array[index])) {

View File

@@ -3,13 +3,13 @@
* shorthands. * shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration. * @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array. * @returns {Array} Returns the new mapped array.
*/ */
function arrayMap(array, iteratee) { function arrayMap(array, iteratee) {
var index = -1, var index = -1,
length = array.length, length = array ? array.length : 0,
result = Array(length); result = Array(length);
while (++index < length) { while (++index < length) {

View File

@@ -3,7 +3,7 @@
* iteratee shorthands. * iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration. * @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value. * @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as * @param {boolean} [initAccum] Specify using the first element of `array` as
@@ -12,7 +12,7 @@
*/ */
function arrayReduce(array, iteratee, accumulator, initAccum) { function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1, var index = -1,
length = array.length; length = array ? array.length : 0;
if (initAccum && length) { if (initAccum && length) {
accumulator = array[++index]; accumulator = array[++index];

View File

@@ -3,7 +3,7 @@
* iteratee shorthands. * iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration. * @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value. * @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the last element of `array` as * @param {boolean} [initAccum] Specify using the last element of `array` as
@@ -11,7 +11,7 @@
* @returns {*} Returns the accumulated value. * @returns {*} Returns the accumulated value.
*/ */
function arrayReduceRight(array, iteratee, accumulator, initAccum) { function arrayReduceRight(array, iteratee, accumulator, initAccum) {
var length = array.length; var length = array ? array.length : 0;
if (initAccum && length) { if (initAccum && length) {
accumulator = array[--length]; accumulator = array[--length];
} }

View File

@@ -3,14 +3,14 @@
* shorthands. * shorthands.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration. * @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check, * @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`. * else `false`.
*/ */
function arraySome(array, predicate) { function arraySome(array, predicate) {
var index = -1, var index = -1,
length = array.length; length = array ? array.length : 0;
while (++index < length) { while (++index < length) {
if (predicate(array[index], index, array)) { if (predicate(array[index], index, array)) {

View File

@@ -1,4 +1,4 @@
import eq from './eq'; import eq from './eq.js';
/** Used for built-in method references. */ /** Used for built-in method references. */
var objectProto = Object.prototype; var objectProto = Object.prototype;

View File

@@ -1,4 +1,4 @@
import eq from './eq'; import eq from './eq.js';
/** /**
* This function is like `assignValue` except that it doesn't assign * This function is like `assignValue` except that it doesn't assign

View File

@@ -1,4 +1,4 @@
import eq from './eq'; import eq from './eq.js';
/** Used for built-in method references. */ /** Used for built-in method references. */
var objectProto = Object.prototype; var objectProto = Object.prototype;

View File

@@ -1,16 +0,0 @@
import assocIndexOf from './_assocIndexOf';
/**
* Gets the associative array value for `key`.
*
* @private
* @param {Array} array The array to query.
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function assocGet(array, key) {
var index = assocIndexOf(array, key);
return index < 0 ? undefined : array[index][1];
}
export default assocGet;

View File

@@ -1,15 +0,0 @@
import assocIndexOf from './_assocIndexOf';
/**
* Checks if an associative array value for `key` exists.
*
* @private
* @param {Array} array The array to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function assocHas(array, key) {
return assocIndexOf(array, key) > -1;
}
export default assocHas;

View File

@@ -1,4 +1,4 @@
import eq from './eq'; import eq from './eq.js';
/** /**
* 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.

View File

@@ -1,20 +0,0 @@
import assocIndexOf from './_assocIndexOf';
/**
* Sets the associative array `key` to `value`.
*
* @private
* @param {Array} array The array to modify.
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
*/
function assocSet(array, key, value) {
var index = assocIndexOf(array, key);
if (index < 0) {
array.push([key, value]);
} else {
array[index][1] = value;
}
}
export default assocSet;

View File

@@ -1,4 +1,4 @@
import baseEach from './_baseEach'; import baseEach from './_baseEach.js';
/** /**
* Aggregates elements of `collection` on `accumulator` with keys transformed * Aggregates elements of `collection` on `accumulator` with keys transformed

View File

@@ -1,5 +1,5 @@
import copyObject from './_copyObject'; import copyObject from './_copyObject.js';
import keys from './keys'; import keys from './keys.js';
/** /**
* The base implementation of `_.assign` without support for multiple sources * The base implementation of `_.assign` without support for multiple sources

View File

@@ -1,4 +1,4 @@
import get from './get'; import get from './get.js';
/** /**
* The base implementation of `_.at` without support for individual paths. * The base implementation of `_.at` without support for individual paths.
@@ -6,7 +6,7 @@ import get from './get';
* @private * @private
* @param {Object} object The object to iterate over. * @param {Object} object The object to iterate over.
* @param {string[]} paths The property paths of elements to pick. * @param {string[]} paths The property paths of elements to pick.
* @returns {Array} Returns the new array of picked elements. * @returns {Array} Returns the picked elements.
*/ */
function baseAt(object, paths) { function baseAt(object, paths) {
var index = -1, var index = -1,

View File

@@ -1,20 +1,20 @@
import Stack from './_Stack'; import Stack from './_Stack.js';
import arrayEach from './_arrayEach'; import arrayEach from './_arrayEach.js';
import assignValue from './_assignValue'; import assignValue from './_assignValue.js';
import baseAssign from './_baseAssign'; import baseAssign from './_baseAssign.js';
import cloneBuffer from './_cloneBuffer'; import cloneBuffer from './_cloneBuffer.js';
import copyArray from './_copyArray'; import copyArray from './_copyArray.js';
import copySymbols from './_copySymbols'; import copySymbols from './_copySymbols.js';
import getAllKeys from './_getAllKeys'; import getAllKeys from './_getAllKeys.js';
import getTag from './_getTag'; import getTag from './_getTag.js';
import initCloneArray from './_initCloneArray'; import initCloneArray from './_initCloneArray.js';
import initCloneByTag from './_initCloneByTag'; import initCloneByTag from './_initCloneByTag.js';
import initCloneObject from './_initCloneObject'; import initCloneObject from './_initCloneObject.js';
import isArray from './isArray'; import isArray from './isArray.js';
import isBuffer from './isBuffer'; import isBuffer from './isBuffer.js';
import isHostObject from './_isHostObject'; import isHostObject from './_isHostObject.js';
import isObject from './isObject'; import isObject from './isObject.js';
import keys from './keys'; import keys from './keys.js';
/** `Object#toString` result references. */ /** `Object#toString` result references. */
var argsTag = '[object Arguments]', var argsTag = '[object Arguments]',

View File

@@ -1,11 +1,11 @@
import keys from './keys'; import keys from './keys.js';
/** /**
* The base implementation of `_.conforms` which doesn't clone `source`. * The base implementation of `_.conforms` which doesn't clone `source`.
* *
* @private * @private
* @param {Object} source The object of property predicates to conform to. * @param {Object} source The object of property predicates to conform to.
* @returns {Function} Returns the new function. * @returns {Function} Returns the new spec function.
*/ */
function baseConforms(source) { function baseConforms(source) {
var props = keys(source), var props = keys(source),

View File

@@ -1,4 +1,4 @@
import isObject from './isObject'; import isObject from './isObject.js';
/** Built-in value references. */ /** Built-in value references. */
var objectCreate = Object.create; var objectCreate = Object.create;

View File

@@ -1,9 +1,9 @@
import SetCache from './_SetCache'; import SetCache from './_SetCache.js';
import arrayIncludes from './_arrayIncludes'; import arrayIncludes from './_arrayIncludes.js';
import arrayIncludesWith from './_arrayIncludesWith'; import arrayIncludesWith from './_arrayIncludesWith.js';
import arrayMap from './_arrayMap'; import arrayMap from './_arrayMap.js';
import baseUnary from './_baseUnary'; import baseUnary from './_baseUnary.js';
import cacheHas from './_cacheHas'; import cacheHas from './_cacheHas.js';
/** Used as the size to enable large array optimizations. */ /** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200; var LARGE_ARRAY_SIZE = 200;

View File

@@ -1,5 +1,5 @@
import baseForOwn from './_baseForOwn'; import baseForOwn from './_baseForOwn.js';
import createBaseEach from './_createBaseEach'; import createBaseEach from './_createBaseEach.js';
/** /**
* The base implementation of `_.forEach` without support for iteratee shorthands. * The base implementation of `_.forEach` without support for iteratee shorthands.

View File

@@ -1,5 +1,5 @@
import baseForOwnRight from './_baseForOwnRight'; import baseForOwnRight from './_baseForOwnRight.js';
import createBaseEach from './_createBaseEach'; import createBaseEach from './_createBaseEach.js';
/** /**
* The base implementation of `_.forEachRight` without support for iteratee shorthands. * The base implementation of `_.forEachRight` without support for iteratee shorthands.

View File

@@ -1,4 +1,4 @@
import baseEach from './_baseEach'; import baseEach from './_baseEach.js';
/** /**
* The base implementation of `_.every` without support for iteratee shorthands. * The base implementation of `_.every` without support for iteratee shorthands.

View File

@@ -1,4 +1,4 @@
import isSymbol from './isSymbol'; import isSymbol from './isSymbol.js';
/** /**
* The base implementation of methods like `_.max` and `_.min` which accepts a * The base implementation of methods like `_.max` and `_.min` which accepts a

View File

@@ -1,5 +1,5 @@
import toInteger from './toInteger'; import toInteger from './toInteger.js';
import toLength from './toLength'; import toLength from './toLength.js';
/** /**
* The base implementation of `_.fill` without an iteratee call guard. * The base implementation of `_.fill` without an iteratee call guard.

View File

@@ -1,4 +1,4 @@
import baseEach from './_baseEach'; import baseEach from './_baseEach.js';
/** /**
* The base implementation of `_.filter` without support for iteratee shorthands. * The base implementation of `_.filter` without support for iteratee shorthands.

View File

@@ -5,12 +5,13 @@
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to search.
* @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 {boolean} [fromRight] Specify iterating from right to left. * @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`. * @returns {number} Returns the index of the matched value, else `-1`.
*/ */
function baseFindIndex(array, predicate, fromRight) { function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length, var length = array.length,
index = fromRight ? length : -1; index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) { while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) { if (predicate(array[index], index, array)) {

View File

@@ -1,25 +1,23 @@
/** /**
* The base implementation of methods like `_.find` and `_.findKey`, without * The base implementation of methods like `_.findKey` and `_.findLastKey`,
* support for iteratee shorthands, which iterates over `collection` using * without support for iteratee shorthands, which iterates over `collection`
* `eachFunc`. * using `eachFunc`.
* *
* @private * @private
* @param {Array|Object} collection The collection to search. * @param {Array|Object} collection The collection to search.
* @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`.
* @param {boolean} [retKey] Specify returning the key of the found element
* instead of the element itself.
* @returns {*} Returns the found element or its key, else `undefined`. * @returns {*} Returns the found element or its key, else `undefined`.
*/ */
function baseFind(collection, predicate, eachFunc, retKey) { function baseFindKey(collection, predicate, eachFunc) {
var result; var result;
eachFunc(collection, function(value, key, collection) { eachFunc(collection, function(value, key, collection) {
if (predicate(value, key, collection)) { if (predicate(value, key, collection)) {
result = retKey ? key : value; result = key;
return false; return false;
} }
}); });
return result; return result;
} }
export default baseFind; export default baseFindKey;

View File

@@ -1,5 +1,5 @@
import arrayPush from './_arrayPush'; import arrayPush from './_arrayPush.js';
import isFlattenable from './_isFlattenable'; import isFlattenable from './_isFlattenable.js';
/** /**
* The base implementation of `_.flatten` with support for restricting flattening. * The base implementation of `_.flatten` with support for restricting flattening.

View File

@@ -1,4 +1,4 @@
import createBaseFor from './_createBaseFor'; import createBaseFor from './_createBaseFor.js';
/** /**
* The base implementation of `baseForOwn` which iterates over `object` * The base implementation of `baseForOwn` which iterates over `object`

View File

@@ -1,5 +1,5 @@
import baseFor from './_baseFor'; import baseFor from './_baseFor.js';
import keys from './keys'; import keys from './keys.js';
/** /**
* The base implementation of `_.forOwn` without support for iteratee shorthands. * The base implementation of `_.forOwn` without support for iteratee shorthands.

View File

@@ -1,5 +1,5 @@
import baseForRight from './_baseForRight'; import baseForRight from './_baseForRight.js';
import keys from './keys'; import keys from './keys.js';
/** /**
* The base implementation of `_.forOwnRight` without support for iteratee shorthands. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.

View File

@@ -1,4 +1,4 @@
import createBaseFor from './_createBaseFor'; import createBaseFor from './_createBaseFor.js';
/** /**
* This function is like `baseFor` except that it iterates over properties * This function is like `baseFor` except that it iterates over properties

View File

@@ -1,5 +1,5 @@
import arrayFilter from './_arrayFilter'; import arrayFilter from './_arrayFilter.js';
import isFunction from './isFunction'; import isFunction from './isFunction.js';
/** /**
* The base implementation of `_.functions` which creates an array of * The base implementation of `_.functions` which creates an array of
@@ -8,7 +8,7 @@ import isFunction from './isFunction';
* @private * @private
* @param {Object} object The object to inspect. * @param {Object} object The object to inspect.
* @param {Array} props The property names to filter. * @param {Array} props The property names to filter.
* @returns {Array} Returns the new array of filtered property names. * @returns {Array} Returns the function names.
*/ */
function baseFunctions(object, props) { function baseFunctions(object, props) {
return arrayFilter(props, function(key) { return arrayFilter(props, function(key) {

View File

@@ -1,6 +1,6 @@
import castPath from './_castPath'; import castPath from './_castPath.js';
import isKey from './_isKey'; import isKey from './_isKey.js';
import toKey from './_toKey'; import toKey from './_toKey.js';
/** /**
* The base implementation of `_.get` without support for default values. * The base implementation of `_.get` without support for default values.

View File

@@ -1,5 +1,5 @@
import arrayPush from './_arrayPush'; import arrayPush from './_arrayPush.js';
import isArray from './isArray'; import isArray from './isArray.js';
/** /**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
@@ -14,9 +14,7 @@ import isArray from './isArray';
*/ */
function baseGetAllKeys(object, keysFunc, symbolsFunc) { function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object); var result = keysFunc(object);
return isArray(object) return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
? result
: arrayPush(result, symbolsFunc(object));
} }
export default baseGetAllKeys; export default baseGetAllKeys;

View File

@@ -1,4 +1,4 @@
import getPrototype from './_getPrototype'; import getPrototype from './_getPrototype.js';
/** Used for built-in method references. */ /** Used for built-in method references. */
var objectProto = Object.prototype; var objectProto = Object.prototype;
@@ -10,7 +10,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
* The base implementation of `_.has` without support for deep paths. * The base implementation of `_.has` without support for deep paths.
* *
* @private * @private
* @param {Object} object The object to query. * @param {Object} [object] The object to query.
* @param {Array|string} key The key to check. * @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`. * @returns {boolean} Returns `true` if `key` exists, else `false`.
*/ */
@@ -18,8 +18,9 @@ function baseHas(object, key) {
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
// that are composed entirely of index properties, return `false` for // that are composed entirely of index properties, return `false` for
// `hasOwnProperty` checks of them. // `hasOwnProperty` checks of them.
return hasOwnProperty.call(object, key) || return object != null &&
(typeof object == 'object' && key in object && getPrototype(object) === null); (hasOwnProperty.call(object, key) ||
(typeof object == 'object' && key in object && getPrototype(object) === null));
} }
export default baseHas; export default baseHas;

View File

@@ -2,12 +2,12 @@
* The base implementation of `_.hasIn` without support for deep paths. * The base implementation of `_.hasIn` without support for deep paths.
* *
* @private * @private
* @param {Object} object The object to query. * @param {Object} [object] The object to query.
* @param {Array|string} key The key to check. * @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`. * @returns {boolean} Returns `true` if `key` exists, else `false`.
*/ */
function baseHasIn(object, key) { function baseHasIn(object, key) {
return key in Object(object); return object != null && key in Object(object);
} }
export default baseHasIn; export default baseHasIn;

View File

@@ -1,4 +1,4 @@
import indexOfNaN from './_indexOfNaN'; import indexOfNaN from './_indexOfNaN.js';
/** /**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.

View File

@@ -1,9 +1,9 @@
import SetCache from './_SetCache'; import SetCache from './_SetCache.js';
import arrayIncludes from './_arrayIncludes'; import arrayIncludes from './_arrayIncludes.js';
import arrayIncludesWith from './_arrayIncludesWith'; import arrayIncludesWith from './_arrayIncludesWith.js';
import arrayMap from './_arrayMap'; import arrayMap from './_arrayMap.js';
import baseUnary from './_baseUnary'; import baseUnary from './_baseUnary.js';
import cacheHas from './_cacheHas'; import cacheHas from './_cacheHas.js';
/* Built-in method references for those with the same name as other `lodash` methods. */ /* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min; var nativeMin = Math.min;

View File

@@ -1,4 +1,4 @@
import baseForOwn from './_baseForOwn'; import baseForOwn from './_baseForOwn.js';
/** /**
* The base implementation of `_.invert` and `_.invertBy` which inverts * The base implementation of `_.invert` and `_.invertBy` which inverts

View File

@@ -1,9 +1,9 @@
import apply from './_apply'; import apply from './_apply.js';
import castPath from './_castPath'; import castPath from './_castPath.js';
import isKey from './_isKey'; import isKey from './_isKey.js';
import last from './last'; import last from './last.js';
import parent from './_parent'; import parent from './_parent.js';
import toKey from './_toKey'; import toKey from './_toKey.js';
/** /**
* The base implementation of `_.invoke` without support for individual * The base implementation of `_.invoke` without support for individual

View File

@@ -1,6 +1,6 @@
import baseIsEqualDeep from './_baseIsEqualDeep'; import baseIsEqualDeep from './_baseIsEqualDeep.js';
import isObject from './isObject'; import isObject from './isObject.js';
import isObjectLike from './isObjectLike'; import isObjectLike from './isObjectLike.js';
/** /**
* The base implementation of `_.isEqual` which supports partial comparisons * The base implementation of `_.isEqual` which supports partial comparisons

View File

@@ -1,11 +1,11 @@
import Stack from './_Stack'; import Stack from './_Stack.js';
import equalArrays from './_equalArrays'; import equalArrays from './_equalArrays.js';
import equalByTag from './_equalByTag'; import equalByTag from './_equalByTag.js';
import equalObjects from './_equalObjects'; import equalObjects from './_equalObjects.js';
import getTag from './_getTag'; import getTag from './_getTag.js';
import isArray from './isArray'; import isArray from './isArray.js';
import isHostObject from './_isHostObject'; import isHostObject from './_isHostObject.js';
import isTypedArray from './isTypedArray'; import isTypedArray from './isTypedArray.js';
/** Used to compose bitmasks for comparison styles. */ /** Used to compose bitmasks for comparison styles. */
var PARTIAL_COMPARE_FLAG = 2; var PARTIAL_COMPARE_FLAG = 2;

View File

@@ -1,5 +1,5 @@
import Stack from './_Stack'; import Stack from './_Stack.js';
import baseIsEqual from './_baseIsEqual'; import baseIsEqual from './_baseIsEqual.js';
/** Used to compose bitmasks for comparison styles. */ /** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1, var UNORDERED_COMPARE_FLAG = 1,

47
_baseIsNative.js Normal file
View File

@@ -0,0 +1,47 @@
import isFunction from './isFunction.js';
import isHostObject from './_isHostObject.js';
import isMasked from './_isMasked.js';
import isObject from './isObject.js';
import toSource from './_toSource.js';
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
export default baseIsNative;

View File

@@ -1,8 +1,8 @@
import baseMatches from './_baseMatches'; import baseMatches from './_baseMatches.js';
import baseMatchesProperty from './_baseMatchesProperty'; import baseMatchesProperty from './_baseMatchesProperty.js';
import identity from './identity'; import identity from './identity.js';
import isArray from './isArray'; import isArray from './isArray.js';
import property from './property'; import property from './property.js';
/** /**
* The base implementation of `_.iteratee`. * The base implementation of `_.iteratee`.

View File

@@ -1,5 +1,5 @@
import Reflect from './_Reflect'; import Reflect from './_Reflect.js';
import iteratorToArray from './_iteratorToArray'; import iteratorToArray from './_iteratorToArray.js';
/** Used for built-in method references. */ /** Used for built-in method references. */
var objectProto = Object.prototype; var objectProto = Object.prototype;

View File

@@ -1,5 +1,5 @@
import baseEach from './_baseEach'; import baseEach from './_baseEach.js';
import isArrayLike from './isArrayLike'; import isArrayLike from './isArrayLike.js';
/** /**
* The base implementation of `_.map` without support for iteratee shorthands. * The base implementation of `_.map` without support for iteratee shorthands.

View File

@@ -1,13 +1,13 @@
import baseIsMatch from './_baseIsMatch'; import baseIsMatch from './_baseIsMatch.js';
import getMatchData from './_getMatchData'; import getMatchData from './_getMatchData.js';
import matchesStrictComparable from './_matchesStrictComparable'; import matchesStrictComparable from './_matchesStrictComparable.js';
/** /**
* The base implementation of `_.matches` which doesn't clone `source`. * The base implementation of `_.matches` which doesn't clone `source`.
* *
* @private * @private
* @param {Object} source The object of property values to match. * @param {Object} source The object of property values to match.
* @returns {Function} Returns the new function. * @returns {Function} Returns the new spec function.
*/ */
function baseMatches(source) { function baseMatches(source) {
var matchData = getMatchData(source); var matchData = getMatchData(source);

View File

@@ -1,10 +1,10 @@
import baseIsEqual from './_baseIsEqual'; import baseIsEqual from './_baseIsEqual.js';
import get from './get'; import get from './get.js';
import hasIn from './hasIn'; import hasIn from './hasIn.js';
import isKey from './_isKey'; import isKey from './_isKey.js';
import isStrictComparable from './_isStrictComparable'; import isStrictComparable from './_isStrictComparable.js';
import matchesStrictComparable from './_matchesStrictComparable'; import matchesStrictComparable from './_matchesStrictComparable.js';
import toKey from './_toKey'; import toKey from './_toKey.js';
/** Used to compose bitmasks for comparison styles. */ /** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1, var UNORDERED_COMPARE_FLAG = 1,
@@ -16,7 +16,7 @@ var UNORDERED_COMPARE_FLAG = 1,
* @private * @private
* @param {string} path The path of the property to get. * @param {string} path The path of the property to get.
* @param {*} srcValue The value to match. * @param {*} srcValue The value to match.
* @returns {Function} Returns the new function. * @returns {Function} Returns the new spec function.
*/ */
function baseMatchesProperty(path, srcValue) { function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) { if (isKey(path) && isStrictComparable(srcValue)) {

View File

@@ -1,4 +1,4 @@
import baseSum from './_baseSum'; import baseSum from './_baseSum.js';
/** Used as references for various `Number` constants. */ /** Used as references for various `Number` constants. */
var NAN = 0 / 0; var NAN = 0 / 0;

View File

@@ -1,11 +1,11 @@
import Stack from './_Stack'; import Stack from './_Stack.js';
import arrayEach from './_arrayEach'; import arrayEach from './_arrayEach.js';
import assignMergeValue from './_assignMergeValue'; import assignMergeValue from './_assignMergeValue.js';
import baseMergeDeep from './_baseMergeDeep'; import baseMergeDeep from './_baseMergeDeep.js';
import isArray from './isArray'; import isArray from './isArray.js';
import isObject from './isObject'; import isObject from './isObject.js';
import isTypedArray from './isTypedArray'; import isTypedArray from './isTypedArray.js';
import keysIn from './keysIn'; import keysIn from './keysIn.js';
/** /**
* The base implementation of `_.merge` without support for multiple sources. * The base implementation of `_.merge` without support for multiple sources.

View File

@@ -1,14 +1,14 @@
import assignMergeValue from './_assignMergeValue'; import assignMergeValue from './_assignMergeValue.js';
import baseClone from './_baseClone'; import baseClone from './_baseClone.js';
import copyArray from './_copyArray'; import copyArray from './_copyArray.js';
import isArguments from './isArguments'; import isArguments from './isArguments.js';
import isArray from './isArray'; import isArray from './isArray.js';
import isArrayLikeObject from './isArrayLikeObject'; import isArrayLikeObject from './isArrayLikeObject.js';
import isFunction from './isFunction'; import isFunction from './isFunction.js';
import isObject from './isObject'; import isObject from './isObject.js';
import isPlainObject from './isPlainObject'; import isPlainObject from './isPlainObject.js';
import isTypedArray from './isTypedArray'; import isTypedArray from './isTypedArray.js';
import toPlainObject from './toPlainObject'; import toPlainObject from './toPlainObject.js';
/** /**
* A specialized version of `baseMerge` for arrays and objects which performs * A specialized version of `baseMerge` for arrays and objects which performs

View File

@@ -1,4 +1,4 @@
import isIndex from './_isIndex'; import isIndex from './_isIndex.js';
/** /**
* The base implementation of `_.nth` which doesn't coerce `n` to an integer. * The base implementation of `_.nth` which doesn't coerce `n` to an integer.

View File

@@ -1,10 +1,10 @@
import arrayMap from './_arrayMap'; import arrayMap from './_arrayMap.js';
import baseIteratee from './_baseIteratee'; import baseIteratee from './_baseIteratee.js';
import baseMap from './_baseMap'; import baseMap from './_baseMap.js';
import baseSortBy from './_baseSortBy'; import baseSortBy from './_baseSortBy.js';
import baseUnary from './_baseUnary'; import baseUnary from './_baseUnary.js';
import compareMultiple from './_compareMultiple'; import compareMultiple from './_compareMultiple.js';
import identity from './identity'; import identity from './identity.js';
/** /**
* The base implementation of `_.orderBy` without param guards. * The base implementation of `_.orderBy` without param guards.

View File

@@ -1,4 +1,4 @@
import arrayReduce from './_arrayReduce'; import arrayReduce from './_arrayReduce.js';
/** /**
* The base implementation of `_.pick` without support for individual * The base implementation of `_.pick` without support for individual

View File

@@ -1,4 +1,4 @@
import getAllKeysIn from './_getAllKeysIn'; import getAllKeysIn from './_getAllKeysIn.js';
/** /**
* The base implementation of `_.pickBy` without support for iteratee shorthands. * The base implementation of `_.pickBy` without support for iteratee shorthands.

View File

@@ -3,7 +3,7 @@
* *
* @private * @private
* @param {string} key The key of the property to get. * @param {string} key The key of the property to get.
* @returns {Function} Returns the new function. * @returns {Function} Returns the new accessor function.
*/ */
function baseProperty(key) { function baseProperty(key) {
return function(object) { return function(object) {

View File

@@ -1,11 +1,11 @@
import baseGet from './_baseGet'; import baseGet from './_baseGet.js';
/** /**
* A specialized version of `baseProperty` which supports deep paths. * A specialized version of `baseProperty` which supports deep paths.
* *
* @private * @private
* @param {Array|string} path The path of the property to get. * @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new function. * @returns {Function} Returns the new accessor function.
*/ */
function basePropertyDeep(path) { function basePropertyDeep(path) {
return function(object) { return function(object) {

View File

@@ -1,7 +1,8 @@
import arrayMap from './_arrayMap'; import arrayMap from './_arrayMap.js';
import baseIndexOf from './_baseIndexOf'; import baseIndexOf from './_baseIndexOf.js';
import baseIndexOfWith from './_baseIndexOfWith'; import baseIndexOfWith from './_baseIndexOfWith.js';
import baseUnary from './_baseUnary'; import baseUnary from './_baseUnary.js';
import copyArray from './_copyArray.js';
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype; var arrayProto = Array.prototype;
@@ -26,6 +27,9 @@ function basePullAll(array, values, iteratee, comparator) {
length = values.length, length = values.length,
seen = array; seen = array;
if (array === values) {
values = copyArray(values);
}
if (iteratee) { if (iteratee) {
seen = arrayMap(array, baseUnary(iteratee)); seen = arrayMap(array, baseUnary(iteratee));
} }

View File

@@ -1,9 +1,9 @@
import castPath from './_castPath'; import castPath from './_castPath.js';
import isIndex from './_isIndex'; import isIndex from './_isIndex.js';
import isKey from './_isKey'; import isKey from './_isKey.js';
import last from './last'; import last from './last.js';
import parent from './_parent'; import parent from './_parent.js';
import toKey from './_toKey'; import toKey from './_toKey.js';
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype; var arrayProto = Array.prototype;

View File

@@ -11,7 +11,7 @@ var nativeCeil = Math.ceil,
* @param {number} end The end of the range. * @param {number} end The end of the range.
* @param {number} step The value to increment or decrement by. * @param {number} step The value to increment or decrement by.
* @param {boolean} [fromRight] Specify iterating from right to left. * @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Array} Returns the new array of numbers. * @returns {Array} Returns the range of numbers.
*/ */
function baseRange(start, end, step, fromRight) { function baseRange(start, end, step, fromRight) {
var index = -1, var index = -1,

View File

@@ -1,9 +1,9 @@
import assignValue from './_assignValue'; import assignValue from './_assignValue.js';
import castPath from './_castPath'; import castPath from './_castPath.js';
import isIndex from './_isIndex'; import isIndex from './_isIndex.js';
import isKey from './_isKey'; import isKey from './_isKey.js';
import isObject from './isObject'; import isObject from './isObject.js';
import toKey from './_toKey'; import toKey from './_toKey.js';
/** /**
* The base implementation of `_.set`. * The base implementation of `_.set`.

View File

@@ -1,5 +1,5 @@
import identity from './identity'; import identity from './identity.js';
import metaMap from './_metaMap'; import metaMap from './_metaMap.js';
/** /**
* The base implementation of `setData` without support for hot loop detection. * The base implementation of `setData` without support for hot loop detection.

View File

@@ -1,4 +1,4 @@
import baseEach from './_baseEach'; import baseEach from './_baseEach.js';
/** /**
* The base implementation of `_.some` without support for iteratee shorthands. * The base implementation of `_.some` without support for iteratee shorthands.

View File

@@ -1,6 +1,6 @@
import baseSortedIndexBy from './_baseSortedIndexBy'; import baseSortedIndexBy from './_baseSortedIndexBy.js';
import identity from './identity'; import identity from './identity.js';
import isSymbol from './isSymbol'; import isSymbol from './isSymbol.js';
/** Used as references for the maximum length and index of an array. */ /** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295, var MAX_ARRAY_LENGTH = 4294967295,

View File

@@ -1,4 +1,4 @@
import isSymbol from './isSymbol'; import isSymbol from './isSymbol.js';
/** Used as references for the maximum length and index of an array. */ /** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295, var MAX_ARRAY_LENGTH = 4294967295,

View File

@@ -1,4 +1,4 @@
import eq from './eq'; import eq from './eq.js';
/** /**
* The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without

View File

@@ -1,4 +1,4 @@
import isSymbol from './isSymbol'; import isSymbol from './isSymbol.js';
/** Used as references for various `Number` constants. */ /** Used as references for various `Number` constants. */
var NAN = 0 / 0; var NAN = 0 / 0;

View File

@@ -1,4 +1,4 @@
import arrayMap from './_arrayMap'; import arrayMap from './_arrayMap.js';
/** /**
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
@@ -7,7 +7,7 @@ import arrayMap from './_arrayMap';
* @private * @private
* @param {Object} object The object to query. * @param {Object} object The object to query.
* @param {Array} props The property names to get values for. * @param {Array} props The property names to get values for.
* @returns {Object} Returns the new array of key-value pairs. * @returns {Object} Returns the key-value pairs.
*/ */
function baseToPairs(object, props) { function baseToPairs(object, props) {
return arrayMap(props, function(key) { return arrayMap(props, function(key) {

View File

@@ -1,5 +1,5 @@
import Symbol from './_Symbol'; import Symbol from './_Symbol.js';
import isSymbol from './isSymbol'; import isSymbol from './isSymbol.js';
/** Used as references for various `Number` constants. */ /** Used as references for various `Number` constants. */
var INFINITY = 1 / 0; var INFINITY = 1 / 0;

View File

@@ -3,7 +3,7 @@
* *
* @private * @private
* @param {Function} func The function to cap arguments for. * @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new function. * @returns {Function} Returns the new capped function.
*/ */
function baseUnary(func) { function baseUnary(func) {
return function(value) { return function(value) {

View File

@@ -1,9 +1,9 @@
import SetCache from './_SetCache'; import SetCache from './_SetCache.js';
import arrayIncludes from './_arrayIncludes'; import arrayIncludes from './_arrayIncludes.js';
import arrayIncludesWith from './_arrayIncludesWith'; import arrayIncludesWith from './_arrayIncludesWith.js';
import cacheHas from './_cacheHas'; import cacheHas from './_cacheHas.js';
import createSet from './_createSet'; import createSet from './_createSet.js';
import setToArray from './_setToArray'; import setToArray from './_setToArray.js';
/** Used as the size to enable large array optimizations. */ /** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200; var LARGE_ARRAY_SIZE = 200;

View File

@@ -1,9 +1,9 @@
import baseHas from './_baseHas'; import baseHas from './_baseHas.js';
import castPath from './_castPath'; import castPath from './_castPath.js';
import isKey from './_isKey'; import isKey from './_isKey.js';
import last from './last'; import last from './last.js';
import parent from './_parent'; import parent from './_parent.js';
import toKey from './_toKey'; import toKey from './_toKey.js';
/** /**
* The base implementation of `_.unset`. * The base implementation of `_.unset`.

View File

@@ -1,5 +1,5 @@
import baseGet from './_baseGet'; import baseGet from './_baseGet.js';
import baseSet from './_baseSet'; import baseSet from './_baseSet.js';
/** /**
* The base implementation of `_.update`. * The base implementation of `_.update`.

View File

@@ -1,4 +1,4 @@
import arrayMap from './_arrayMap'; import arrayMap from './_arrayMap.js';
/** /**
* The base implementation of `_.values` and `_.valuesIn` which creates an * The base implementation of `_.values` and `_.valuesIn` which creates an

View File

@@ -1,4 +1,4 @@
import baseSlice from './_baseSlice'; import baseSlice from './_baseSlice.js';
/** /**
* The base implementation of methods like `_.dropWhile` and `_.takeWhile` * The base implementation of methods like `_.dropWhile` and `_.takeWhile`

Some files were not shown because too many files have changed in this diff Show More