Lines Matching +defs:fill +defs:value

39   /** Used to compose bitmasks for value comparisons. */
175 * - "=" (default value)
510 var value = array[index];
511 setter(accumulator, value, iteratee(value), array);
595 var value = array[index];
596 if (predicate(value, index, array)) {
597 result[resIndex++] = value;
609 * @param {*} target The value to search for.
612 function arrayIncludes(array, value) {
614 return !!length && baseIndexOf(array, value, 0) > -1;
622 * @param {*} target The value to search for.
626 function arrayIncludesWith(array, value, comparator) {
631 if (comparator(value, array[index])) {
684 * @param {*} [accumulator] The initial value.
686 * the initial value.
687 * @returns {*} Returns the accumulated value.
709 * @param {*} [accumulator] The initial value.
711 * the initial value.
712 * @returns {*} Returns the accumulated value.
791 eachFunc(collection, function(value, key, collection) {
792 if (predicate(value, key, collection)) {
809 * @returns {number} Returns the index of the matched value, else `-1`.
828 * @param {*} value The value to search for.
830 * @returns {number} Returns the index of the matched value, else `-1`.
832 function baseIndexOf(array, value, fromIndex) {
833 return value === value
834 ? strictIndexOf(array, value, fromIndex)
843 * @param {*} value The value to search for.
846 * @returns {number} Returns the index of the matched value, else `-1`.
848 function baseIndexOfWith(array, value, fromIndex, comparator) {
853 if (comparator(array[index], value)) {
864 * @param {*} value The value to check.
865 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
867 function baseIsNaN(value) {
868 return value !== value;
918 * @param {*} accumulator The initial value.
920 * `collection` as the initial value.
922 * @returns {*} Returns the accumulated value.
925 eachFunc(collection, function(value, index, collection) {
927 ? (initAccum = false, value)
928 : iteratee(accumulator, value, index, collection);
948 array[length] = array[length].value;
997 * of key-value pairs for `object` corresponding to the property names of `props`.
1002 * @returns {Object} Returns the key-value pairs.
1031 return function(value) {
1032 return func(value);
1053 * Checks if a `cache` value for `key` exists.
1148 * Gets the value at `key` of `object`.
1153 * @returns {*} Returns the property value.
1193 result.push(data.value);
1199 * Converts `map` to its key-value pairs.
1203 * @returns {Array} Returns the key-value pairs.
1209 map.forEach(function(value, key) {
1210 result[++index] = [key, value];
1245 var value = array[index];
1246 if (value === placeholder || value === PLACEHOLDER) {
1265 set.forEach(function(value) {
1266 result[++index] = value;
1272 * Converts `set` to its value-value pairs.
1276 * @returns {Array} Returns the value-value pairs.
1282 set.forEach(function(value) {
1283 result[++index] = [value, value];
1294 * @param {*} value The value to search for.
1296 * @returns {number} Returns the index of the matched value, else `-1`.
1298 function strictIndexOf(array, value, fromIndex) {
1303 if (array[index] === value) {
1316 * @param {*} value The value to search for.
1318 * @returns {number} Returns the index of the matched value, else `-1`.
1320 function strictLastIndexOf(array, value, fromIndex) {
1323 if (array[index] === value) {
1504 /** Built-in value references. */
1574 * Creates a `lodash` object which wraps `value` to enable implicit method
1576 * and functions can be chained together. Methods that retrieve a single value
1577 * or may return a primitive value will automatically end the chain sequence
1578 * and return the unwrapped value. Otherwise, the value must be unwrapped
1579 * with `_#value`.
1581 * Explicit chain sequences, which must be unwrapped with `_#value`, may be
1585 * `_#value` is implicitly or explicitly called.
1595 * Chaining is supported in custom builds as long as the `_#value` method is
1617 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
1662 * `upperFirst`, `value`, and `words`
1667 * @param {*} value The value to wrap in a `lodash` instance.
1677 * // Returns an unwrapped value.
1681 * // Returns a wrapped value.
1687 * _.isArray(squares.value());
1690 function lodash(value) {
1691 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
1692 if (value instanceof LodashWrapper) {
1693 return value;
1695 if (hasOwnProperty.call(value, '__wrapped__')) {
1696 return wrapperClone(value);
1699 return new LodashWrapper(value);
1739 * @param {*} value The value to wrap.
1742 function LodashWrapper(value, chainAll) {
1743 this.__wrapped__ = value;
1821 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
1825 * @param {*} value The value to wrap.
1827 function LazyWrapper(value) {
1828 this.__wrapped__ = value;
1877 * Extracts the unwrapped value from its lazy wrapper.
1880 * @name value
1882 * @returns {*} Returns the unwrapped value.
1885 var array = this.__wrapped__.value(),
1910 value = array[index];
1916 computed = iteratee(value);
1919 value = computed;
1928 result[resIndex++] = value;
1944 * @param {Array} [entries] The key-value pairs to cache.
1958 * Removes all key-value entries from the hash.
1970 * Removes `key` and its value from the hash.
1976 * @param {string} key The key of the value to remove.
1986 * Gets the hash value for `key`.
1991 * @param {string} key The key of the value to get.
1992 * @returns {*} Returns the entry value.
2004 * Checks if a hash value for `key` exists.
2018 * Sets the hash `key` to `value`.
2023 * @param {string} key The key of the value to set.
2024 * @param {*} value The value to set.
2027 function hashSet(key, value) {
2030 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
2048 * @param {Array} [entries] The key-value pairs to cache.
2062 * Removes all key-value entries from the list cache.
2074 * Removes `key` and its value from the list cache.
2079 * @param {string} key The key of the value to remove.
2100 * Gets the list cache value for `key`.
2105 * @param {string} key The key of the value to get.
2106 * @returns {*} Returns the entry value.
2116 * Checks if a list cache value for `key` exists.
2129 * Sets the list cache `key` to `value`.
2134 * @param {string} key The key of the value to set.
2135 * @param {*} value The value to set.
2138 function listCacheSet(key, value) {
2144 data.push([key, value]);
2146 data[index][1] = value;
2161 * Creates a map cache object to store key-value pairs.
2165 * @param {Array} [entries] The key-value pairs to cache.
2179 * Removes all key-value entries from the map.
2195 * Removes `key` and its value from the map.
2200 * @param {string} key The key of the value to remove.
2210 * Gets the map value for `key`.
2215 * @param {string} key The key of the value to get.
2216 * @returns {*} Returns the entry value.
2223 * Checks if a map value for `key` exists.
2236 * Sets the map `key` to `value`.
2241 * @param {string} key The key of the value to set.
2242 * @param {*} value The value to set.
2245 function mapCacheSet(key, value) {
2249 data.set(key, value);
2282 * Adds `value` to the array cache.
2288 * @param {*} value The value to cache.
2291 function setCacheAdd(value) {
2292 this.__data__.set(value, HASH_UNDEFINED);
2297 * Checks if `value` is in the array cache.
2302 * @param {*} value The value to search for.
2303 * @returns {number} Returns `true` if `value` is found, else `false`.
2305 function setCacheHas(value) {
2306 return this.__data__.has(value);
2316 * Creates a stack cache object to store key-value pairs.
2320 * @param {Array} [entries] The key-value pairs to cache.
2328 * Removes all key-value entries from the stack.
2340 * Removes `key` and its value from the stack.
2345 * @param {string} key The key of the value to remove.
2357 * Gets the stack value for `key`.
2362 * @param {string} key The key of the value to get.
2363 * @returns {*} Returns the entry value.
2370 * Checks if a stack value for `key` exists.
2383 * Sets the stack `key` to `value`.
2388 * @param {string} key The key of the value to set.
2389 * @param {*} value The value to set.
2392 function stackSet(key, value) {
2397 pairs.push([key, value]);
2403 data.set(key, value);
2418 * Creates an array of the enumerable property names of the array-like `value`.
2421 * @param {*} value The value to query.
2425 function arrayLikeKeys(value, inherited) {
2426 var isArr = isArray(value),
2427 isArg = !isArr && isArguments(value),
2428 isBuff = !isArr && !isArg && isBuffer(value),
2429 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
2431 result = skipIndexes ? baseTimes(value.length, String) : [],
2434 for (var key in value) {
2435 if ((inherited || hasOwnProperty.call(value, key)) &&
2494 * @param {*} value The value to assign.
2496 function assignMergeValue(object, key, value) {
2497 if ((value !== undefined && !eq(object[key], value)) ||
2498 (value === undefined && !(key in object))) {
2499 baseAssignValue(object, key, value);
2504 * Assigns `value` to `key` of `object` if the existing value is not equivalent
2511 * @param {*} value The value to assign.
2513 function assignValue(object, key, value) {
2515 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
2516 (value === undefined && !(key in object))) {
2517 baseAssignValue(object, key, value);
2522 * Gets the index at which the `key` is found in `array` of key-value pairs.
2527 * @returns {number} Returns the index of the matched value, else `-1`.
2551 baseEach(collection, function(value, key, collection) {
2552 setter(accumulator, value, iteratee(value), collection);
2585 * value checks.
2590 * @param {*} value The value to assign.
2592 function baseAssignValue(object, key, value) {
2597 'value': value,
2601 object[key] = value;
2651 * @param {*} value The value to clone.
2657 * @param {string} [key] The key of `value`.
2658 * @param {Object} [object] The parent object of `value`.
2660 * @returns {*} Returns the cloned value.
2662 function baseClone(value, bitmask, customizer, key, object, stack) {
2669 result = object ? customizer(value, key, object, stack) : customizer(value);
2674 if (!isObject(value)) {
2675 return value;
2677 var isArr = isArray(value);
2679 result = initCloneArray(value);
2681 return copyArray(value, result);
2684 var tag = getTag(value),
2687 if (isBuffer(value)) {
2688 return cloneBuffer(value, isDeep);
2691 result = (isFlat || isFunc) ? {} : initCloneObject(value);
2694 ? copySymbolsIn(value, baseAssignIn(result, value))
2695 : copySymbols(value, baseAssign(result, value));
2699 return object ? value : {};
2701 result = initCloneByTag(value, tag, isDeep);
2706 var stacked = stack.get(value);
2710 stack.set(value, result);
2712 if (isSet(value)) {
2713 value.forEach(function(subValue) {
2714 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2716 } else if (isMap(value)) {
2717 value.forEach(function(subValue, key) {
2718 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2726 var props = isArr ? undefined : keysFunc(value);
2727 arrayEach(props || value, function(subValue, key) {
2730 subValue = value[key];
2733 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2769 value = object[key];
2771 if ((value === undefined && !(key in object)) || !predicate(value)) {
2831 var value = array[index],
2832 computed = iteratee == null ? value : iteratee(value);
2834 value = (comparator || value !== 0) ? value : 0;
2842 result.push(value);
2845 result.push(value);
2882 baseEach(collection, function(value, index, collection) {
2883 result = !!predicate(value, index, collection);
2891 * `comparator` to determine the extremum value.
2897 * @returns {*} Returns the extremum value.
2904 var value = array[index],
2905 current = iteratee(value);
2912 result = value;
2919 * The base implementation of `_.fill` without an iteratee call guard.
2922 * @param {Array} array The array to fill.
2923 * @param {*} value The value to fill `array` with.
2928 function baseFill(array, value, start, end) {
2941 array[start++] = value;
2956 baseEach(collection, function(value, index, collection) {
2957 if (predicate(value, index, collection)) {
2958 result.push(value);
2972 * @param {Array} [result=[]] The initial result value.
2983 var value = array[index];
2984 if (depth > 0 && predicate(value)) {
2987 baseFlatten(value, depth - 1, predicate, isStrict, result);
2989 arrayPush(result, value);
2992 result[result.length] = value;
3068 * @returns {*} Returns the resolved value.
3102 * @param {*} value The value to query.
3105 function baseGetTag(value) {
3106 if (value == null) {
3107 return value === undefined ? undefinedTag : nullTag;
3109 return (symToStringTag && symToStringTag in Object(value))
3110 ? getRawTag(value)
3111 : objectToString(value);
3118 * @param {*} value The value to compare.
3119 * @param {*} other The other value to compare.
3120 * @returns {boolean} Returns `true` if `value` is greater than `other`,
3123 function baseGt(value, other) {
3124 return value > other;
3200 var value = array[index],
3201 computed = iteratee ? iteratee(value) : value;
3203 value = (comparator || value !== 0) ? value : 0;
3221 result.push(value);
3239 baseForOwn(object, function(value, key, object) {
3240 setter(accumulator, iteratee(value), key, object);
3266 * @param {*} value The value to check.
3267 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
3269 function baseIsArguments(value) {
3270 return isObjectLike(value) && baseGetTag(value) == argsTag;
3277 * @param {*} value The value to check.
3278 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
3280 function baseIsArrayBuffer(value) {
3281 return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
3288 * @param {*} value The value to check.
3289 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
3291 function baseIsDate(value) {
3292 return isObjectLike(value) && baseGetTag(value) == dateTag;
3300 * @param {*} value The value to compare.
3301 * @param {*} other The other value to compare.
3306 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
3309 function baseIsEqual(value, other, bitmask, customizer, stack) {
3310 if (value === other) {
3313 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
3314 return value !== value && other !== other;
3316 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
3364 var objUnwrapped = objIsWrapped ? object.value() : object,
3365 othUnwrapped = othIsWrapped ? other.value() : other;
3382 * @param {*} value The value to check.
3383 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
3385 function baseIsMap(value) {
3386 return isObjectLike(value) && getTag(value) == mapTag;
3447 * @param {*} value The value to check.
3448 * @returns {boolean} Returns `true` if `value` is a native function,
3451 function baseIsNative(value) {
3452 if (!isObject(value) || isMasked(value)) {
3455 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
3456 return pattern.test(toSource(value));
3463 * @param {*} value The value to check.
3464 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
3466 function baseIsRegExp(value) {
3467 return isObjectLike(value) && baseGetTag(value) == regexpTag;
3474 * @param {*} value The value to check.
3475 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
3477 function baseIsSet(value) {
3478 return isObjectLike(value) && getTag(value) == setTag;
3485 * @param {*} value The value to check.
3486 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
3488 function baseIsTypedArray(value) {
3489 return isObjectLike(value) &&
3490 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
3497 * @param {*} [value=_.identity] The value to convert to an iteratee.
3500 function baseIteratee(value) {
3503 if (typeof value == 'function') {
3504 return value;
3506 if (value == null) {
3509 if (typeof value == 'object') {
3510 return isArray(value)
3511 ? baseMatchesProperty(value[0], value[1])
3512 : baseMatches(value);
3514 return property(value);
3563 * @param {*} value The value to compare.
3564 * @param {*} other The other value to compare.
3565 * @returns {boolean} Returns `true` if `value` is less than `other`,
3568 function baseLt(value, other) {
3569 return value < other;
3584 baseEach(collection, function(value, key, collection) {
3585 result[++index] = iteratee(value, key, collection);
3612 * @param {*} srcValue The value to match.
3668 * @param {string} key The key of the value to merge.
3767 return function(value) {
3768 return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
3780 var result = baseMap(collection, function(value, key, collection) {
3782 return iteratee(value);
3784 return { 'criteria': criteria, 'index': ++index, 'value': value };
3802 return basePickBy(object, paths, function(value, path) {
3823 value = baseGet(object, path);
3825 if (predicate(value, path)) {
3826 baseSet(result, castPath(path, object), value);
3870 value = values[index],
3871 computed = iteratee ? iteratee(value) : value;
3930 * @param {number} step The value to increment or decrement by.
4016 * @param {*} value The value to set.
4020 function baseSet(object, path, value, customizer) {
4033 newValue = value;
4079 'value': constant(string),
4137 baseEach(collection, function(value, index, collection) {
4138 result = predicate(value, index, collection);
4146 * performs a binary search of `array` to determine the index at which `value`
4151 * @param {*} value The value to evaluate.
4153 * @returns {number} Returns the index at which `value` should be inserted
4156 function baseSortedIndex(array, value, retHighest) {
4160 if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
4166 (retHighest ? (computed <= value) : (computed < value))) {
4174 return baseSortedIndexBy(array, value, identity, retHighest);
4179 * which invokes `iteratee` for `value` and each element of `array` to compute
4180 * their sort ranking. The iteratee is invoked with one argument; (value).
4184 * @param {*} value The value to evaluate.
4187 * @returns {number} Returns the index at which `value` should be inserted
4190 function baseSortedIndexBy(array, value, iteratee, retHighest) {
4197 value = iteratee(value);
4198 var valIsNaN = value !== value,
4199 valIsNull = value === null,
4200 valIsSymbol = isSymbol(value),
4201 valIsUndefined = value === undefined;
4222 setLow = retHighest ? (computed <= value) : (computed < value);
4249 var value = array[index],
4250 computed = iteratee ? iteratee(value) : value;
4254 result[resIndex++] = value === 0 ? 0 : value;
4265 * @param {*} value The value to process.
4268 function baseToNumber(value) {
4269 if (typeof value == 'number') {
4270 return value;
4272 if (isSymbol(value)) {
4275 return +value;
4283 * @param {*} value The value to process.
4286 function baseToString(value) {
4288 if (typeof value == 'string') {
4289 return value;
4291 if (isArray(value)) {
4293 return arrayMap(value, baseToString) + '';
4295 if (isSymbol(value)) {
4296 return symbolToString ? symbolToString.call(value) : '';
4298 var result = (value + '');
4299 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
4337 var value = array[index],
4338 computed = iteratee ? iteratee(value) : value;
4340 value = (comparator || value !== 0) ? value : 0;
4351 result.push(value);
4357 result.push(value);
4383 * @param {Function} updater The function to produce the updated value.
4416 * performing a sequence of actions on the unwrapped `value`, where each
4417 * successive action is supplied the return value of the previous.
4420 * @param {*} value The unwrapped value.
4421 * @param {Array} actions Actions to perform to resolve the unwrapped value.
4422 * @returns {*} Returns the resolved value.
4424 function baseWrapperValue(value, actions) {
4425 var result = value;
4427 result = result.value();
4481 var value = index < valsLength ? values[index] : undefined;
4482 assignFunc(result, props[index], value);
4488 * Casts `value` to an empty array if it's not an array like object.
4491 * @param {*} value The value to inspect.
4494 function castArrayLikeObject(value) {
4495 return isArrayLikeObject(value) ? value : [];
4499 * Casts `value` to `identity` if it's not a function.
4502 * @param {*} value The value to inspect.
4505 function castFunction(value) {
4506 return typeof value == 'function' ? value : identity;
4510 * Casts `value` to a path array if it's not one.
4513 * @param {*} value The value to inspect.
4517 function castPath(value, object) {
4518 if (isArray(value)) {
4519 return value;
4521 return isKey(value, object) ? [value] : stringToPath(toString(value));
4646 * @param {*} value The value to compare.
4647 * @param {*} other The other value to compare.
4648 * @returns {number} Returns the sort order indicator for `value`.
4650 function compareAscending(value, other) {
4651 if (value !== other) {
4652 var valIsDefined = value !== undefined,
4653 valIsNull = value === null,
4654 valIsReflexive = value === value,
4655 valIsSymbol = isSymbol(value);
4662 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
4669 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
4681 * Used by `_.orderBy` to compare multiple properties of a value to another
4712 // that causes it, under certain circumstances, to provide the same value for
5171 value = args[0];
5173 if (wrapper && args.length == 1 && isArray(value)) {
5174 return wrapper.plant(value).value();
5177 result = length ? funcs[index].apply(this, args) : value;
5279 * @param {number} [defaultValue] The value used for `undefined` arguments.
5283 return function(value, other) {
5285 if (value === undefined && other === undefined) {
5288 if (value !== undefined) {
5289 result = value;
5295 if (typeof value == 'string' || typeof other == 'string') {
5296 value = baseToString(value);
5299 value = baseToNumber(value);
5302 result = operator(value, other);
5417 return function(value, other) {
5418 if (!(typeof value == 'string' && typeof other == 'string')) {
5419 value = toNumber(value);
5422 return operator(value, other);
5433 * @param {*} placeholder The placeholder value.
5485 value = func(pair[0] + 'e' + (+pair[1] + precision));
5487 pair = (toString(value) + 'e').split('e');
5611 * @param {*} objValue The destination value.
5612 * @param {*} srcValue The source value.
5615 * @returns {*} Returns the value to assign.
5630 * @param {*} objValue The destination value.
5631 * @param {*} srcValue The source value.
5637 * @returns {*} Returns the value to assign.
5654 * @param {*} value The value to inspect.
5656 * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
5658 function customOmitClone(value) {
5659 return isPlainObject(value) ? undefined : value;
5965 * Gets the argument placeholder value for `func`.
5969 * @returns {*} Returns the placeholder value.
5983 * @param {*} [value] The value to convert to an iteratee.
6021 value = object[key];
6023 result[length] = [key, value, isStrictComparable(value)];
6037 var value = getValue(object, key);
6038 return baseIsNative(value) ? value : undefined;
6045 * @param {*} value The value to query.
6048 function getRawTag(value) {
6049 var isOwn = hasOwnProperty.call(value, symToStringTag),
6050 tag = value[symToStringTag];
6053 value[symToStringTag] = undefined;
6057 var result = nativeObjectToString.call(value);
6060 value[symToStringTag] = tag;
6062 delete value[symToStringTag];
6102 * Gets the `toStringTag` of `value`.
6105 * @param {*} value The value to query.
6116 getTag = function(value) {
6117 var result = baseGetTag(value),
6118 Ctor = result == objectTag ? value.constructor : undefined,
6305 * Checks if `value` is a flattenable `arguments` object or array.
6308 * @param {*} value The value to check.
6309 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
6311 function isFlattenable(value) {
6312 return isArray(value) || isArguments(value) ||
6313 !!(spreadableSymbol && value && value[spreadableSymbol]);
6317 * Checks if `value` is a valid array-like index.
6320 * @param {*} value The value to check.
6322 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
6324 function isIndex(value, length) {
6325 var type = typeof value;
6330 (type != 'symbol' && reIsUint.test(value))) &&
6331 (value > -1 && value % 1 == 0 && value < length);
6338 * @param {*} value The potential iteratee value argument.
6344 function isIterateeCall(value, index, object) {
6353 return eq(object[index], value);
6359 * Checks if `value` is a property name and not a property path.
6362 * @param {*} value The value to check.
6364 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
6366 function isKey(value, object) {
6367 if (isArray(value)) {
6370 var type = typeof value;
6372 value == null || isSymbol(value)) {
6375 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
6376 (object != null && value in Object(object));
6380 * Checks if `value` is suitable for use as unique object key.
6383 * @param {*} value The value to check.
6384 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
6386 function isKeyable(value) {
6387 var type = typeof value;
6389 ? (value !== '__proto__')
6390 : (value === null);
6430 * @param {*} value The value to check.
6436 * Checks if `value` is likely a prototype object.
6439 * @param {*} value The value to check.
6440 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
6442 function isPrototype(value) {
6443 var Ctor = value && value.constructor,
6446 return value === proto;
6450 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
6453 * @param {*} value The value to check.
6454 * @returns {boolean} Returns `true` if `value` if suitable for strict
6457 function isStrictComparable(value) {
6458 return value === value && !isObject(value);
6467 * @param {*} srcValue The value to match.
6538 var value = source[3];
6539 if (value) {
6541 data[3] = partials ? composeArgs(partials, value, source[4]) : value;
6545 value = source[5];
6546 if (value) {
6548 data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
6552 value = source[7];
6553 if (value) {
6554 data[7] = value;
6591 * Converts `value` to a string using `Object.prototype.toString`.
6594 * @param {*} value The value to convert.
6597 function objectToString(value) {
6598 return nativeObjectToString.call(value);
6632 * Gets the parent value at `path` of `object`.
6636 * @param {Array} path The path to get the parent value of.
6637 * @returns {*} Returns the parent value.
6666 * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
6671 * @returns {*} Returns the property value.
6783 value = array[rand];
6786 array[index] = value;
6811 * Converts `value` to a string key if it's not a string or symbol.
6814 * @param {*} value The value to inspect.
6817 function toKey(value) {
6818 if (typeof value == 'string' || isSymbol(value)) {
6819 return value;
6821 var result = (value + '');
6822 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
6854 var value = '_.' + pair[0];
6855 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
6856 details.push(value);
6945 var value = array[index];
6946 if (value) {
6947 result[resIndex++] = value;
7022 * (value).
7158 * invoked with three arguments: (value, index, array).
7199 * invoked with three arguments: (value, index, array).
7238 * Fills elements of `array` with `value` from `start` up to, but not
7247 * @param {Array} array The array to fill.
7248 * @param {*} value The value to fill `array` with.
7256 * _.fill(array, 'a');
7260 * _.fill(Array(3), 2);
7263 * _.fill([4, 6, 8, 10], '*', 1, 3);
7266 function fill(array, value, start, end) {
7271 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
7275 return baseFill(array, value, start, end);
7444 * from key-value `pairs`.
7450 * @param {Array} pairs The key-value pairs.
7492 * Gets the index at which the first occurrence of `value` is found in `array`
7502 * @param {*} value The value to search for.
7504 * @returns {number} Returns the index of the matched value, else `-1`.
7514 function indexOf(array, value, fromIndex) {
7523 return baseIndexOf(array, value, index);
7574 * (value).
7687 * @param {*} value The value to search for.
7689 * @returns {number} Returns the index of the matched value, else `-1`.
7699 function lastIndexOf(array, value, fromIndex) {
7709 return value === value
7710 ? strictLastIndexOf(array, value, index)
7793 * by which they're compared. The iteratee is invoked with one argument: (value).
7886 * with three arguments: (value, index, array).
7889 * to pull elements from an array by value.
7922 var value = array[index];
7923 if (predicate(value, index, array)) {
7924 result.push(value);
7992 * Uses a binary search to determine the lowest index at which `value`
8000 * @param {*} value The value to evaluate.
8001 * @returns {number} Returns the index at which `value` should be inserted
8008 function sortedIndex(array, value) {
8009 return baseSortedIndex(array, value);
8014 * which is invoked for `value` and each element of `array` to compute their
8015 * sort ranking. The iteratee is invoked with one argument: (value).
8022 * @param {*} value The value to evaluate.
8024 * @returns {number} Returns the index at which `value` should be inserted
8037 function sortedIndexBy(array, value, iteratee) {
8038 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
8050 * @param {*} value The value to search for.
8051 * @returns {number} Returns the index of the matched value, else `-1`.
8057 function sortedIndexOf(array, value) {
8060 var index = baseSortedIndex(array, value);
8061 if (index < length && eq(array[index], value)) {
8070 * index at which `value` should be inserted into `array` in order to
8078 * @param {*} value The value to evaluate.
8079 * @returns {number} Returns the index at which `value` should be inserted
8086 function sortedLastIndex(array, value) {
8087 return baseSortedIndex(array, value, true);
8092 * which is invoked for `value` and each element of `array` to compute their
8093 * sort ranking. The iteratee is invoked with one argument: (value).
8100 * @param {*} value The value to evaluate.
8102 * @returns {number} Returns the index at which `value` should be inserted
8115 function sortedLastIndexBy(array, value, iteratee) {
8116 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
8128 * @param {*} value The value to search for.
8129 * @returns {number} Returns the index of the matched value, else `-1`.
8135 function sortedLastIndexOf(array, value) {
8138 var index = baseSortedIndex(array, value, true) - 1;
8139 if (eq(array[index], value)) {
8279 * three arguments: (value, index, array).
8320 * three arguments: (value, index, array).
8382 * array in which the value occurs. The iteratee is invoked with one argument:
8383 * (value).
8412 * the first array in which the value occurs. The comparator is invoked
8463 * (value).
8632 * argument: (value).
8773 * Creates a `lodash` wrapper instance that wraps `value` with explicit method
8775 * with `_#value`.
8781 * @param {*} value The value to wrap.
8798 * .value();
8801 function chain(value) {
8802 var result = lodash(value);
8808 * This method invokes `interceptor` and returns `value`. The interceptor
8809 * is invoked with one argument; (value). The purpose of this method is to
8816 * @param {*} value The value to provide to `interceptor`.
8818 * @returns {*} Returns `value`.
8827 * .value();
8830 function tap(value, interceptor) {
8831 interceptor(value);
8832 return value;
8844 * @param {*} value The value to provide to `interceptor`.
8852 * .thru(function(value) {
8853 * return [value];
8855 * .value();
8858 function thru(value, interceptor) {
8859 return interceptor(value);
8875 * _(object).at(['a[0].b.c', 'a[1]']).value();
8881 value = this.__wrapped__,
8885 !(value instanceof LazyWrapper) || !isIndex(start)) {
8888 value = value.slice(start, +start + (length ? 1 : 0));
8889 value.__actions__.push({
8894 return new LodashWrapper(value, this.__chain__).thru(function(array) {
8926 * .value();
8960 return new LodashWrapper(this.value(), this.__chain__);
8964 * Gets the next value on a wrapped object following the
8971 * @returns {Object} Returns the next iterator value.
8977 * // => { 'done': false, 'value': 1 }
8980 * // => { 'done': false, 'value': 2 }
8983 * // => { 'done': true, 'value': undefined }
8987 this.__values__ = toArray(this.value());
8990 value = done ? undefined : this.__values__[this.__index__++];
8992 return { 'done': done, 'value': value };
9018 * Creates a clone of the chain sequence planting `value` as the wrapped value.
9024 * @param {*} value The value to plant.
9035 * other.value();
9038 * wrapped.value();
9041 function wrapperPlant(value) {
9057 previous.__wrapped__ = value;
9075 * _(array).reverse().value()
9082 var value = this.__wrapped__;
9083 if (value instanceof LazyWrapper) {
9084 var wrapped = value;
9100 * Executes the chain sequence to resolve the unwrapped value.
9102 * @name value
9107 * @returns {*} Returns the resolved unwrapped value.
9110 * _([1, 2, 3]).value();
9121 * each element of `collection` thru `iteratee`. The corresponding value of
9123 * iteratee is invoked with one argument: (value).
9141 var countBy = createAggregator(function(result, value, key) {
9152 * invoked with three arguments: (value, index|key, collection).
9201 * arguments: (value, index|key, collection).
9247 * arguments: (value, index|key, collection).
9306 * with three arguments: (value, index|key, collection).
9380 * The iteratee is invoked with three arguments: (value, index|key, collection).
9398 * _.forEach([1, 2], function(value) {
9399 * console.log(value);
9403 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
9428 * _.forEachRight([1, 2], function(value) {
9429 * console.log(value);
9442 * value of each key is an array of elements responsible for generating the
9443 * key. The iteratee is invoked with one argument: (value).
9461 var groupBy = createAggregator(function(result, value, key) {
9463 result[key].push(value);
9465 baseAssignValue(result, key, [value]);
9470 * Checks if `value` is in `collection`. If `collection` is a string, it's
9471 * checked for a substring of `value`, otherwise
9481 * @param {*} value The value to search for.
9484 * @returns {boolean} Returns `true` if `value` is found, else `false`.
9499 function includes(collection, value, fromIndex, guard) {
9508 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
9509 : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
9540 baseEach(collection, function(value) {
9541 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
9548 * each element of `collection` thru `iteratee`. The corresponding value of
9550 * iteratee is invoked with one argument: (value).
9574 var keyBy = createAggregator(function(result, value, key) {
9575 baseAssignValue(result, key, value);
9581 * (value, index|key, collection).
9588 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
9672 * invoked with one argument: (value).
9704 var partition = createAggregator(function(result, value, key) {
9705 result[key ? 0 : 1].push(value);
9709 * Reduces `collection` to a value which is the accumulated result of running
9711 * invocation is supplied the return value of the previous. If `accumulator`
9713 * value. The iteratee is invoked with four arguments:
9714 * (accumulator, value, index|key, collection).
9729 * @param {*} [accumulator] The initial value.
9730 * @returns {*} Returns the accumulated value.
9739 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
9740 * (result[value] || (result[value] = [])).push(key);
9762 * @param {*} [accumulator] The initial value.
9763 * @returns {*} Returns the accumulated value.
9927 * invoked with three arguments: (value, index|key, collection).
9972 * equal elements. The iteratees are invoked with one argument: (value).
10131 * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
10180 * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
10232 * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
10277 * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
10669 * to the function return the value of the first invocation. The `func` is
10742 * The `_.partial.placeholder` value, which defaults to `_` in monolithic
10779 * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
10814 * to the specified `indexes` where the argument value at the first index is
10815 * provided as the first argument, the argument value at the second index is
11003 * Creates a function that provides `value` to `wrapper` as its first
11012 * @param {*} value The value to wrap.
11024 function wrap(value, wrapper) {
11025 return partial(castFunction(wrapper), value);
11031 * Casts `value` as an array if it's not one.
11037 * @param {*} value The value to inspect.
11067 var value = arguments[0];
11068 return isArray(value) ? value : [value];
11072 * Creates a shallow clone of `value`.
11086 * @param {*} value The value to clone.
11087 * @returns {*} Returns the cloned value.
11097 function clone(value) {
11098 return baseClone(value, CLONE_SYMBOLS_FLAG);
11103 * is invoked to produce the cloned value. If `customizer` returns `undefined`,
11105 * up to four arguments; (value [, index|key, object, stack]).
11111 * @param {*} value The value to clone.
11113 * @returns {*} Returns the cloned value.
11117 * function customizer(value) {
11118 * if (_.isElement(value)) {
11119 * return value.cloneNode(false);
11132 function cloneWith(value, customizer) {
11134 return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
11138 * This method is like `_.clone` except that it recursively clones `value`.
11144 * @param {*} value The value to recursively clone.
11145 * @returns {*} Returns the deep cloned value.
11155 function cloneDeep(value) {
11156 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
11160 * This method is like `_.cloneWith` except that it recursively clones `value`.
11166 * @param {*} value The value to recursively clone.
11168 * @returns {*} Returns the deep cloned value.
11172 * function customizer(value) {
11173 * if (_.isElement(value)) {
11174 * return value.cloneNode(true);
11187 function cloneDeepWith(value, customizer) {
11189 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
11229 * @param {*} value The value to compare.
11230 * @param {*} other The other value to compare.
11252 function eq(value, other) {
11253 return value === other || (value !== value && other !== other);
11257 * Checks if `value` is greater than `other`.
11263 * @param {*} value The value to compare.
11264 * @param {*} other The other value to compare.
11265 * @returns {boolean} Returns `true` if `value` is greater than `other`,
11282 * Checks if `value` is greater than or equal to `other`.
11288 * @param {*} value The value to compare.
11289 * @param {*} other The other value to compare.
11290 * @returns {boolean} Returns `true` if `value` is greater than or equal to
11304 var gte = createRelationalOperation(function(value, other) {
11305 return value >= other;
11309 * Checks if `value` is likely an `arguments` object.
11315 * @param {*} value The value to check.
11316 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
11326 var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
11327 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
11328 !propertyIsEnumerable.call(value, 'callee');
11332 * Checks if `value` is classified as an `Array` object.
11338 * @param {*} value The value to check.
11339 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
11357 * Checks if `value` is classified as an `ArrayBuffer` object.
11363 * @param {*} value The value to check.
11364 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
11376 * Checks if `value` is array-like. A value is considered array-like if it's
11377 * not a function and has a `value.length` that's an integer greater than or
11384 * @param {*} value The value to check.
11385 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
11400 function isArrayLike(value) {
11401 return value != null && isLength(value.length) && !isFunction(value);
11405 * This method is like `_.isArrayLike` except that it also checks if `value`
11412 * @param {*} value The value to check.
11413 * @returns {boolean} Returns `true` if `value` is an array-like object,
11429 function isArrayLikeObject(value) {
11430 return isObjectLike(value) && isArrayLike(value);
11434 * Checks if `value` is classified as a boolean primitive or object.
11440 * @param {*} value The value to check.
11441 * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
11450 function isBoolean(value) {
11451 return value === true || value === false ||
11452 (isObjectLike(value) && baseGetTag(value) == boolTag);
11456 * Checks if `value` is a buffer.
11462 * @param {*} value The value to check.
11463 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
11475 * Checks if `value` is classified as a `Date` object.
11481 * @param {*} value The value to check.
11482 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
11494 * Checks if `value` is likely a DOM element.
11500 * @param {*} value The value to check.
11501 * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
11510 function isElement(value) {
11511 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
11515 * Checks if `value` is an empty object, collection, map, or set.
11528 * @param {*} value The value to check.
11529 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
11547 function isEmpty(value) {
11548 if (value == null) {
11551 if (isArrayLike(value) &&
11552 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
11553 isBuffer(value) || isTypedArray(value) || isArguments(value))) {
11554 return !value.length;
11556 var tag = getTag(value);
11558 return !value.size;
11560 if (isPrototype(value)) {
11561 return !baseKeys(value).length;
11563 for (var key in value) {
11564 if (hasOwnProperty.call(value, key)) {
11585 * @param {*} value The value to compare.
11586 * @param {*} other The other value to compare.
11599 function isEqual(value, other) {
11600 return baseIsEqual(value, other);
11613 * @param {*} value The value to compare.
11614 * @param {*} other The other value to compare.
11619 * function isGreeting(value) {
11620 * return /^h(?:i|ello)$/.test(value);
11635 function isEqualWith(value, other, customizer) {
11637 var result = customizer ? customizer(value, other) : undefined;
11638 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
11642 * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
11649 * @param {*} value The value to check.
11650 * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
11659 function isError(value) {
11660 if (!isObjectLike(value)) {
11663 var tag = baseGetTag(value);
11665 (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
11669 * Checks if `value` is a finite primitive number.
11678 * @param {*} value The value to check.
11679 * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
11694 function isFinite(value) {
11695 return typeof value == 'number' && nativeIsFinite(value);
11699 * Checks if `value` is classified as a `Function` object.
11705 * @param {*} value The value to check.
11706 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
11715 function isFunction(value) {
11716 if (!isObject(value)) {
11721 var tag = baseGetTag(value);
11726 * Checks if `value` is an integer.
11735 * @param {*} value The value to check.
11736 * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
11751 function isInteger(value) {
11752 return typeof value == 'number' && value == toInteger(value);
11756 * Checks if `value` is a valid array-like length.
11765 * @param {*} value The value to check.
11766 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
11781 function isLength(value) {
11782 return typeof value == 'number' &&
11783 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
11787 * Checks if `value` is the
11795 * @param {*} value The value to check.
11796 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
11811 function isObject(value) {
11812 var type = typeof value;
11813 return value != null && (type == 'object' || type == 'function');
11817 * Checks if `value` is object-like. A value is object-like if it's not `null`
11824 * @param {*} value The value to check.
11825 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
11840 function isObjectLike(value) {
11841 return value != null && typeof value == 'object';
11845 * Checks if `value` is classified as a `Map` object.
11851 * @param {*} value The value to check.
11852 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
11871 * values against any array or object value, respectively. See `_.isEqual`
11872 * for a list of supported value comparisons.
11911 * function isGreeting(value) {
11912 * return /^h(?:i|ello)$/.test(value);
11933 * Checks if `value` is `NaN`.
11944 * @param {*} value The value to check.
11945 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
11960 function isNaN(value) {
11961 // An `NaN` primitive is the only value that is not equal to itself.
11964 return isNumber(value) && value != +value;
11968 * Checks if `value` is a pristine native function.
11982 * @param {*} value The value to check.
11983 * @returns {boolean} Returns `true` if `value` is a native function,
11993 function isNative(value) {
11994 if (isMaskable(value)) {
11997 return baseIsNative(value);
12001 * Checks if `value` is `null`.
12007 * @param {*} value The value to check.
12008 * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
12017 function isNull(value) {
12018 return value === null;
12022 * Checks if `value` is `null` or `undefined`.
12028 * @param {*} value The value to check.
12029 * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
12041 function isNil(value) {
12042 return value == null;
12046 * Checks if `value` is classified as a `Number` primitive or object.
12055 * @param {*} value The value to check.
12056 * @returns {boolean} Returns `true` if `value` is a number, else `false`.
12071 function isNumber(value) {
12072 return typeof value == 'number' ||
12073 (isObjectLike(value) && baseGetTag(value) == numberTag);
12077 * Checks if `value` is a plain object, that is, an object created by the
12084 * @param {*} value The value to check.
12085 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
12104 function isPlainObject(value) {
12105 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
12108 var proto = getPrototype(value);
12118 * Checks if `value` is classified as a `RegExp` object.
12124 * @param {*} value The value to check.
12125 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
12137 * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
12147 * @param {*} value The value to check.
12148 * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
12163 function isSafeInteger(value) {
12164 return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
12168 * Checks if `value` is classified as a `Set` object.
12174 * @param {*} value The value to check.
12175 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
12187 * Checks if `value` is classified as a `String` primitive or object.
12193 * @param {*} value The value to check.
12194 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
12203 function isString(value) {
12204 return typeof value == 'string' ||
12205 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
12209 * Checks if `value` is classified as a `Symbol` primitive or object.
12215 * @param {*} value The value to check.
12216 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
12225 function isSymbol(value) {
12226 return typeof value == 'symbol' ||
12227 (isObjectLike(value) && baseGetTag(value) == symbolTag);
12231 * Checks if `value` is classified as a typed array.
12237 * @param {*} value The value to check.
12238 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
12250 * Checks if `value` is `undefined`.
12256 * @param {*} value The value to check.
12257 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
12266 function isUndefined(value) {
12267 return value === undefined;
12271 * Checks if `value` is classified as a `WeakMap` object.
12277 * @param {*} value The value to check.
12278 * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
12287 function isWeakMap(value) {
12288 return isObjectLike(value) && getTag(value) == weakMapTag;
12292 * Checks if `value` is classified as a `WeakSet` object.
12298 * @param {*} value The value to check.
12299 * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
12308 function isWeakSet(value) {
12309 return isObjectLike(value) && baseGetTag(value) == weakSetTag;
12313 * Checks if `value` is less than `other`.
12319 * @param {*} value The value to compare.
12320 * @param {*} other The other value to compare.
12321 * @returns {boolean} Returns `true` if `value` is less than `other`,
12338 * Checks if `value` is less than or equal to `other`.
12344 * @param {*} value The value to compare.
12345 * @param {*} other The other value to compare.
12346 * @returns {boolean} Returns `true` if `value` is less than or equal to
12360 var lte = createRelationalOperation(function(value, other) {
12361 return value <= other;
12365 * Converts `value` to an array.
12371 * @param {*} value The value to convert.
12387 function toArray(value) {
12388 if (!value) {
12391 if (isArrayLike(value)) {
12392 return isString(value) ? stringToArray(value) : copyArray(value);
12394 if (symIterator && value[symIterator]) {
12395 return iteratorToArray(value[symIterator]());
12397 var tag = getTag(value),
12400 return func(value);
12404 * Converts `value` to a finite number.
12410 * @param {*} value The value to convert.
12426 function toFinite(value) {
12427 if (!value) {
12428 return value === 0 ? value : 0;
12430 value = toNumber(value);
12431 if (value === INFINITY || value === -INFINITY) {
12432 var sign = (value < 0 ? -1 : 1);
12435 return value === value ? value : 0;
12439 * Converts `value` to an integer.
12448 * @param {*} value The value to convert.
12464 function toInteger(value) {
12465 var result = toFinite(value),
12472 * Converts `value` to an integer suitable for use as the length of an
12482 * @param {*} value The value to convert.
12498 function toLength(value) {
12499 return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
12503 * Converts `value` to a number.
12509 * @param {*} value The value to process.
12525 function toNumber(value) {
12526 if (typeof value == 'number') {
12527 return value;
12529 if (isSymbol(value)) {
12532 if (isObject(value)) {
12533 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
12534 value = isObject(other) ? (other + '') : other;
12536 if (typeof value != 'string') {
12537 return value === 0 ? value : +value;
12539 value = baseTrim(value);
12540 var isBinary = reIsBinary.test(value);
12541 return (isBinary || reIsOctal.test(value))
12542 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
12543 : (reIsBadHex.test(value) ? NAN : +value);
12547 * Converts `value` to a plain object flattening inherited enumerable string
12548 * keyed properties of `value` to own properties of the plain object.
12554 * @param {*} value The value to convert.
12570 function toPlainObject(value) {
12571 return copyObject(value, keysIn(value));
12575 * Converts `value` to a safe integer. A safe integer can be compared and
12582 * @param {*} value The value to convert.
12598 function toSafeInteger(value) {
12599 return value
12600 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
12601 : (value === 0 ? value : 0);
12605 * Converts `value` to a string. An empty string is returned for `null`
12612 * @param {*} value The value to convert.
12625 function toString(value) {
12626 return value == null ? '' : baseToString(value);
12873 var value = object[key];
12875 if (value === undefined ||
12876 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
12990 * with three arguments: (value, key, object). Iteratee functions may exit
13010 * _.forIn(new Foo, function(value, key) {
13042 * _.forInRight(new Foo, function(value, key) {
13056 * arguments: (value, key, object). Iteratee functions may exit iteration
13076 * _.forOwn(new Foo, function(value, key) {
13106 * _.forOwnRight(new Foo, function(value, key) {
13170 * Gets the value at `path` of `object`. If the resolved value is
13179 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
13180 * @returns {*} Returns the resolved value.
13278 var invert = createInverter(function(result, value, key) {
13279 if (value != null &&
13280 typeof value.toString != 'function') {
13281 value = nativeObjectToString.call(value);
13284 result[value] = key;
13290 * corresponding inverted value of each inverted key is an array of keys
13291 * responsible for generating the inverted value. The iteratee is invoked
13292 * with one argument: (value).
13308 * _.invertBy(object, function(value) {
13309 * return 'group' + value;
13313 var invertBy = createInverter(function(result, value, key) {
13314 if (value != null &&
13315 typeof value.toString != 'function') {
13316 value = nativeObjectToString.call(value);
13319 if (hasOwnProperty.call(result, value)) {
13320 result[value].push(key);
13322 result[value] = [key];
13409 * with three arguments: (value, key, object).
13421 * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
13422 * return key + value;
13430 baseForOwn(object, function(value, key, object) {
13431 baseAssignValue(result, iteratee(value, key, object), value);
13440 * (value, key, object).
13468 baseForOwn(object, function(value, key, object) {
13469 baseAssignValue(result, key, iteratee(value, key, object));
13478 * skipped if a destination value exists. Array and plain object properties
13479 * are merged recursively. Other objects and value types are overridden by
13590 * arguments: (value, key).
13633 * truthy for. The predicate is invoked with two arguments: (value, key).
13657 return basePickBy(object, props, function(value, path) {
13658 return predicate(value, path[0]);
13663 * This method is like `_.get` except that if the resolved value is a
13673 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
13674 * @returns {*} Returns the resolved value.
13703 var value = object == null ? undefined : object[toKey(path[index])];
13704 if (value === undefined) {
13706 value = defaultValue;
13708 object = isFunction(value) ? value.call(object) : value;
13714 * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
13727 * @param {*} value The value to set.
13741 function set(object, path, value) {
13742 return object == null ? object : baseSet(object, path, value);
13759 * @param {*} value The value to set.
13769 function setWith(object, path, value, customizer) {
13771 return object == null ? object : baseSet(object, path, value, customizer);
13775 * Creates an array of own enumerable string keyed-value pairs for `object`
13785 * @returns {Array} Returns the key-value pairs.
13801 * Creates an array of own and inherited enumerable string keyed-value pairs
13811 * @returns {Array} Returns the key-value pairs.
13832 * iteratee is invoked with four arguments: (accumulator, value, key, object).
13841 * @param {*} [accumulator] The custom accumulator value.
13842 * @returns {*} Returns the accumulated value.
13851 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
13852 * (result[value] || (result[value] = [])).push(key);
13873 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
13874 return iteratee(accumulator, value, index, object);
13912 * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
13913 * is invoked with one argument: (value).
13923 * @param {Function} updater The function to produce the updated value.
13955 * @param {Function} updater The function to produce the updated value.
14300 * unless they're part of a tag or unquoted attribute value. See
14523 * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
14534 * @param {number} [radix=10] The radix to interpret `value` by.
14779 * var compiled = _.template('<b><%- value %></b>');
14780 * compiled({ 'value': '<script>' });
14800 * var compiled = _.template('<%= "\\<%- value %\\>" %>');
14801 * compiled({ 'value': 'ignored' });
14802 * // => '<%- value %>'
14899 // order to produce the correct `offset` value.
14976 function toLower(value) {
14977 return toString(value).toLowerCase();
15001 function toUpper(value) {
15002 return toString(value).toUpperCase();
15446 * Creates a function that returns `value`.
15452 * @param {*} value The value to return from the new function.
15464 function constant(value) {
15466 return value;
15471 * Checks `value` to determine whether a default value should be returned in
15472 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
15479 * @param {*} value The value to check.
15480 * @param {*} defaultValue The default value.
15481 * @returns {*} Returns the resolved value.
15490 function defaultTo(value, defaultValue) {
15491 return (value == null || value !== value) ? defaultValue : value;
15497 * invocation is supplied the return value of the previous.
15548 * @param {*} value Any value.
15549 * @returns {*} Returns `value`.
15557 function identity(value) {
15558 return value;
15564 * property value for a given element. If `func` is an array or object, the
15572 * @param {*} [func=_.identity] The value to convert to a callback.
15616 * values against any array or object value, respectively. See `_.isEqual`
15617 * for a list of supported value comparisons.
15648 * value at `path` of a given object to `srcValue`, returning `true` if the
15649 * object value is equivalent, else `false`.
15652 * `srcValue` values against any array or object value, respectively. See
15653 * `_.isEqual` for a list of supported value comparisons.
15663 * @param {*} srcValue The value to match.
15771 * _('fred').vowels().value();
15806 return func.apply(object, arrayPush([this.value()], arguments));
15815 * Reverts the `_` variable to its previous value and returns a reference to
15961 * Creates a function that returns the value at `path` of a given object.
15988 * the value at a given path of `object`.
16028 * @param {number} [step=1] The value to increment or decrement by.
16066 * @param {number} [step=1] The value to increment or decrement by.
16227 * Converts `value` to a property path array.
16233 * @param {*} value The value to convert.
16243 function toPath(value) {
16244 if (isArray(value)) {
16245 return arrayMap(value, toKey);
16247 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
16257 * @param {string} [prefix=''] The value to prefix the ID with.
16359 * Computes the maximum value of `array`. If `array` is empty or falsey,
16367 * @returns {*} Returns the maximum value.
16385 * the value is ranked. The iteratee is invoked with one argument: (value).
16393 * @returns {*} Returns the maximum value.
16431 * invoked for each element in `array` to generate the value to be averaged.
16432 * The iteratee is invoked with one argument: (value).
16457 * Computes the minimum value of `array`. If `array` is empty or falsey,
16465 * @returns {*} Returns the minimum value.
16483 * the value is ranked. The iteratee is invoked with one argument: (value).
16491 * @returns {*} Returns the minimum value.
16592 * invoked for each element in `array` to generate the value to be summed.
16593 * The iteratee is invoked with one argument: (value).
16657 lodash.fill = fill;
16990 // Add `LazyWrapper` methods that accept an `iteratee` value.
17011 return this[takeName](1).value()[0];
17040 return this.map(function(value) {
17041 return baseInvoke(value, path, args);
17087 var value = this.__wrapped__,
17089 isLazy = value instanceof LazyWrapper,
17091 useLazy = isLazy || isArray(value);
17093 var interceptor = function(value) {
17094 var result = lodashFunc.apply(lodash, arrayPush([value], args));
17099 // Avoid lazy use if the iteratee has a "length" value other than `1`.
17108 value = onlyLazy ? value : new LazyWrapper(this);
17109 var result = func.apply(value, args);
17117 return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
17130 var value = this.value();
17131 return func.apply(isArray(value) ? value : [], args);
17133 return this[chainName](function(value) {
17134 return func.apply(isArray(value) ? value : [], args);
17159 LazyWrapper.prototype.value = lazyValue;
17168 lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;