Lines Matching +defs:n +defs:values

25   /** Used to stand-in for `undefined` hash values. */
131 reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
163 var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
164 reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
191 /** Used to match `RegExp` flags from their coerced string values. */
194 /** Used to detect bad signed hexadecimal string values. */
197 /** Used to detect binary string values. */
203 /** Used to detect octal string values. */
206 /** Used to detect unsigned integer values. */
216 var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
229 rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
307 /** Used to identify `toStringTag` values of typed arrays. */
323 /** Used to identify `toStringTag` values supported by `_.clone`. */
350 '\xd1': 'N', '\xf1': 'n',
377 '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
394 '\u0149': "'n", '\u017f': 's'
419 '\n': 'n',
500 * @param {Function} setter The function to set `accumulator` values.
659 * Appends the elements of `values` to `array`.
663 * @param {Array} values The values to append.
666 function arrayPush(array, values) {
668 length = values.length,
672 array[offset + index] = values[index];
936 * values.
981 * @param {number} n The number of times to invoke `iteratee`.
985 function baseTimes(n, iteratee) {
987 result = Array(n);
989 while (++index < n) {
1001 * @param {Array} props The property names to get values for.
1037 * The base implementation of `_.values` and `_.valuesIn` which creates an
1038 * array of `object` property values corresponding to the property names
1043 * @param {Array} props The property names to get values for.
1044 * @returns {Object} Returns the array of property values.
1255 * Converts `set` to an array of its values.
1259 * @returns {Array} Returns the values.
1290 * comparisons of values, i.e. `===`.
1312 * comparisons of values, i.e. `===`.
1488 * of values.
1633 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
1671 * function square(n) {
1672 * return n * n;
1762 * Used to detect `data` property values to be HTML-escaped.
1778 * Used to detect `data` property values to inject.
2265 * Creates an array cache object to store unique values.
2269 * @param {Array} [values] The values to cache.
2271 function SetCache(values) {
2273 length = values == null ? 0 : values.length;
2277 this.add(values[index]);
2469 * @param {number} n The number of elements to sample.
2472 function arraySampleSize(array, n) {
2473 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
2489 * `undefined` values.
2541 * by `iteratee` and values set by `setter`.
2545 * @param {Function} setter The function to set `accumulator` values.
2801 * @param {Array} values The values to exclude.
2804 * @returns {Array} Returns the new array of filtered values.
2806 function baseDifference(array, values, iteratee, comparator) {
2812 valuesLength = values.length;
2818 values = arrayMap(values, baseUnary(iteratee));
2824 else if (values.length >= LARGE_ARRAY_SIZE) {
2827 values = new SetCache(values);
2838 if (values[valuesIndex] === computed) {
2844 else if (!includes(values, computed, comparator)) {
2896 * @param {Function} comparator The comparator used to compare values.
2971 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
3063 * The base implementation of `_.get` without support for default values.
3172 * @returns {Array} Returns the new array of shared values.
3229 * `object` with values transformed by `iteratee` and set by `setter`.
3233 * @param {Function} setter The function to set `accumulator` values.
3234 * @param {Function} iteratee The iteratee to transform values.
3307 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
3329 * @param {Function} equalFunc The function to determine equivalents of values.
3394 * @param {Object} source The object of property values to match.
3395 * @param {Array} matchData The property names, values, and compare flags to match.
3594 * @param {Object} source The object of property values to match.
3634 * @param {Function} [customizer] The function to customize merged values.
3635 * @param {Object} [stack] Tracks traversed source values and their merged
3670 * @param {Function} mergeFunc The function to merge values.
3671 * @param {Function} [customizer] The function to customize assigned values.
3672 * @param {Object} [stack] Tracks traversed source values and their merged
3742 * @param {number} n The index of the element to return.
3745 function baseNth(array, n) {
3750 n += n < 0 ? length : 0;
3751 return isIndex(n, length) ? array[n] : undefined;
3851 * @param {Array} values The values to remove.
3856 function basePullAll(array, values, iteratee, comparator) {
3859 length = values.length,
3862 if (array === values) {
3863 values = copyArray(values);
3870 value = values[index],
3951 * @param {number} n The number of times to repeat the string.
3954 function baseRepeat(string, n) {
3956 if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
3962 if (n % 2) {
3965 n = nativeFloor(n / 2);
3966 if (n) {
3969 } while (n);
3994 return arraySample(values(collection));
4002 * @param {number} n The number of elements to sample.
4005 function baseSampleSize(collection, n) {
4006 var array = values(collection);
4007 return shuffleSelf(array, baseClamp(n, 0, array.length));
4092 return shuffleSelf(values(collection));
4262 * conversions of binary, hexadecimal, or octal string values.
4280 * values to empty strings.
4292 // Recursively convert values (susceptible to call stack limits).
4442 * @returns {Array} Returns the new array of values.
4466 * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
4470 * @param {Array} values The property values.
4471 * @param {Function} assignFunc The function to assign values.
4474 function baseZipObject(props, values, assignFunc) {
4477 valsLength = values.length,
4481 var value = index < valsLength ? values[index] : undefined;
4643 * Compares values to sort them in ascending order.
4684 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
4686 * of corresponding values.
4794 * Copies the values of `source` to `array`.
4797 * @param {Array} source The array to copy values from.
4798 * @param {Array} [array=[]] The array to copy values to.
4819 * @param {Function} [customizer] The function to customize copied values.
4876 * @param {Function} setter The function to set accumulator values.
4893 * @param {Function} assigner The function to assign values.
5264 * @param {Function} setter The function to set accumulator values.
5275 * Creates a function that performs a mathematical operation on two values.
5410 * Creates a function that performs a relational operation on two values.
5495 * Creates a set object of `values`.
5498 * @param {Array} values The values to add to the set.
5501 var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
5502 return new Set(values);
5635 * @param {Object} [stack] Tracks traversed source values and their merged
5671 * @param {Function} equalFunc The function to determine equivalents of values.
5683 // Check that cyclic values are equal.
5741 * **Note:** This function only supports comparing values with tags of
5750 * @param {Function} equalFunc The function to determine equivalents of values.
5798 // Assume cyclic values are equal.
5828 * @param {Function} equalFunc The function to determine equivalents of values.
5849 // Check that cyclic values are equal.
6009 * Gets the property names, values, and compare flags of `object`.
6042 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
6240 * **Note:** This function only supports cloning values with tags of
6301 return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
6462 * A specialized version of `matchesProperty` for source values suitable
6924 * Creates an array with all falsey values removed. The values `false`, `null`,
6932 * @returns {Array} Returns the new array of filtered values.
6955 * and/or values.
6962 * @param {...*} [values] The values to concatenate.
6991 * Creates an array of `array` values not included in the other given arrays
6993 * for equality comparisons. The order and references of result values are
7003 * @param {...Array} [values] The values to exclude.
7004 * @returns {Array} Returns the new array of filtered values.
7011 var difference = baseRest(function(array, values) {
7013 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
7019 * is invoked for each element of `array` and `values` to generate the criterion
7020 * by which they're compared. The order and references of result values are
7031 * @param {...Array} [values] The values to exclude.
7033 * @returns {Array} Returns the new array of filtered values.
7043 var differenceBy = baseRest(function(array, values) {
7044 var iteratee = last(values);
7049 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
7055 * which is invoked to compare elements of `array` to `values`. The order and
7056 * references of result values are determined by the first array. The comparator
7066 * @param {...Array} [values] The values to exclude.
7068 * @returns {Array} Returns the new array of filtered values.
7076 var differenceWith = baseRest(function(array, values) {
7077 var comparator = last(values);
7082 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
7087 * Creates a slice of `array` with `n` elements dropped from the beginning.
7094 * @param {number} [n=1] The number of elements to drop.
7111 function drop(array, n, guard) {
7116 n = (guard || n === undefined) ? 1 : toInteger(n);
7117 return baseSlice(array, n < 0 ? 0 : n, length);
7121 * Creates a slice of `array` with `n` elements dropped from the end.
7128 * @param {number} [n=1] The number of elements to drop.
7145 function dropRight(array, n, guard) {
7150 n = (guard || n === undefined) ? 1 : toInteger(n);
7151 n = length - n;
7152 return baseSlice(array, 0, n < 0 ? 0 : n);
7546 * Creates an array of unique values that are included in all given arrays
7548 * for equality comparisons. The order and references of result values are
7556 * @returns {Array} Returns the new array of intersecting values.
7572 * by which they're compared. The order and references of result values are
7582 * @returns {Array} Returns the new array of intersecting values.
7609 * of result values are determined by the first array. The comparator is
7618 * @returns {Array} Returns the new array of intersecting values.
7715 * Gets the element at index `n` of `array`. If `n` is negative, the nth
7723 * @param {number} [n=0] The index of the element to return.
7735 function nth(array, n) {
7736 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
7740 * Removes all given values from `array` using
7752 * @param {...*} [values] The values to remove.
7765 * This method is like `_.pull` except that it accepts an array of values to remove.
7774 * @param {Array} values The values to remove.
7784 function pullAll(array, values) {
7785 return (array && array.length && values && values.length)
7786 ? basePullAll(array, values)
7792 * invoked for each element of `array` and `values` to generate the criterion
7802 * @param {Array} values The values to remove.
7813 function pullAllBy(array, values, iteratee) {
7814 return (array && array.length && values && values.length)
7815 ? basePullAll(array, values, getIteratee(iteratee, 2))
7821 * is invoked to compare elements of `array` to `values`. The comparator is
7831 * @param {Array} values The values to remove.
7842 function pullAllWith(array, values, comparator) {
7843 return (array && array.length && values && values.length)
7844 ? basePullAll(array, values, undefined, comparator)
7901 * var evens = _.remove(array, function(n) {
7902 * return n % 2 == 0;
8209 * Creates a slice of `array` with `n` elements taken from the beginning.
8216 * @param {number} [n=1] The number of elements to take.
8233 function take(array, n, guard) {
8237 n = (guard || n === undefined) ? 1 : toInteger(n);
8238 return baseSlice(array, 0, n < 0 ? 0 : n);
8242 * Creates a slice of `array` with `n` elements taken from the end.
8249 * @param {number} [n=1] The number of elements to take.
8266 function takeRight(array, n, guard) {
8271 n = (guard || n === undefined) ? 1 : toInteger(n);
8272 n = length - n;
8273 return baseSlice(array, n < 0 ? 0 : n, length);
8359 * Creates an array of unique values, in order, from all given arrays using
8368 * @returns {Array} Returns the new array of combined values.
8381 * which uniqueness is computed. Result values are chosen from the first
8391 * @returns {Array} Returns the new array of combined values.
8411 * is invoked to compare elements of `arrays`. Result values are chosen from
8421 * @returns {Array} Returns the new array of combined values.
8440 * is kept. The order of result values is determined by the order they occur
8461 * uniqueness is computed. The order of result values is determined by the
8487 * is invoked to compare elements of `array`. The order of result values is
8547 * how regrouped values should be combined. The iteratee is invoked with the
8556 * regrouped values.
8580 * Creates an array excluding all given values using
8591 * @param {...*} [values] The values to exclude.
8592 * @returns {Array} Returns the new array of filtered values.
8599 var without = baseRest(function(array, values) {
8601 ? baseDifference(array, values)
8606 * Creates an array of unique values that is the
8608 * of the given arrays. The order of result values is determined by the order
8616 * @returns {Array} Returns the new array of filtered values.
8630 * which by which they're compared. The order of result values is determined
8640 * @returns {Array} Returns the new array of filtered values.
8660 * invoked to compare elements of `arrays`. The order of result values is
8670 * @returns {Array} Returns the new array of filtered values.
8705 * one of property identifiers and one of corresponding values.
8712 * @param {Array} [values=[]] The property values.
8719 function zipObject(props, values) {
8720 return baseZipObject(props || [], values || [], assignValue);
8731 * @param {Array} [values=[]] The property values.
8738 function zipObjectDeep(props, values) {
8739 return baseZipObject(props || [], values || [], baseSet);
8744 * how grouped values should be combined. The iteratee is invoked with the
8753 * grouped values.
8837 * The purpose of this method is to "pass thru" values replacing intermediate
9028 * function square(n) {
9029 * return n * n;
9296 * _.findLast([1, 2, 3, 4], function(n) {
9297 * return n % 2 == 1;
9304 * Creates a flattened array of values by running each element in `collection`
9317 * function duplicate(n) {
9318 * return [n, n];
9341 * function duplicate(n) {
9342 * return [[[n, n]]];
9366 * function duplicate(n) {
9367 * return [[[n, n]]];
9440 * each element of `collection` thru `iteratee`. The order of grouped values
9500 collection = isArrayLike(collection) ? collection : values(collection);
9579 * Creates an array of values by running each element in `collection` thru
9601 * function square(n) {
9602 * return n * n;
9627 * orders of the iteratees to sort by. If `orders` is unspecified, all values
9629 * descending or "asc" for ascending sort order of corresponding values.
9734 * _.reduce([1, 2], function(sum, n) {
9735 * return sum + n;
9840 * Gets `n` random elements at unique keys from `collection` up to the
9848 * @param {number} [n=1] The number of elements to sample.
9859 function sampleSize(collection, n, guard) {
9860 if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
9861 n = 1;
9863 n = toInteger(n);
9866 return func(collection, n);
9870 * Creates an array of shuffled values, using a version of the
9891 * values or the number of own enumerable string keyed properties for objects.
10036 * `func` once it's called `n` or more times.
10042 * @param {number} n The number of calls before `func` is invoked.
10058 function after(n, func) {
10062 n = toInteger(n);
10064 if (--n < 1) {
10071 * Creates a function that invokes `func`, with up to `n` arguments,
10079 * @param {number} [n=func.length] The arity cap.
10087 function ary(func, n, guard) {
10088 n = guard ? undefined : n;
10089 n = (func && n == null) ? func.length : n;
10090 return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
10095 * of the created function, while it's called less than `n` times. Subsequent
10102 * @param {number} n The number of calls at which `func` is no longer invoked.
10110 function before(n, func) {
10115 n = toInteger(n);
10117 if (--n > 0) {
10120 if (n <= 1) {
10589 * var values = _.memoize(_.values);
10590 * values(object);
10593 * values(other);
10597 * values(object);
10601 * values.cache.set(object, ['a', 'b']);
10602 * values(object);
10644 * function isEven(n) {
10645 * return n % 2 == 0;
10702 * function doubled(n) {
10703 * return n * 2;
10706 * function square(n) {
10707 * return n * n;
11079 * as plain objects. An empty object is returned for uncloneable values such
11194 * properties of `source` with the corresponding property values of `object`.
11210 * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
11213 * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
11223 * comparison between two values to determine if they are equivalent.
11231 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
11520 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
11572 * Performs a deep comparison between two values to determine if they are
11587 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
11605 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
11616 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
11865 * determine if `object` contains equivalent property values.
11871 * values against any array or object value, respectively. See `_.isEqual`
11879 * @param {Object} source The object of property values to match.
11897 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
11906 * @param {Object} source The object of property values to match.
11938 * `undefined` and other non-number values.
12398 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
12606 * and `undefined` values. The sign of `-0` is preserved.
12712 * which is invoked to produce the assigned values. If `customizer` returns
12725 * @param {Function} [customizer] The function to customize assigned values.
12745 * which is invoked to produce the assigned values. If `customizer` returns
12757 * @param {Function} [customizer] The function to customize assigned values.
12776 * Creates an array of values corresponding to `paths` of `object`.
12784 * @returns {Array} Returns the picked values.
12837 * Once a property is set, additional values of the same property are ignored.
13179 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
13261 * Creates an object composed of the inverted keys and values of `object`.
13262 * If `object` contains duplicate values, subsequent values overwrite
13263 * property assignments of previous values.
13349 * **Note:** Non-object values are coerced to objects. See the
13381 * **Note:** Non-object values are coerced to objects.
13407 * same values as `object` and keys generated by running each own enumerable
13437 * Creates an object with the same keys as `object` and values generated
13511 * is invoked to produce the merged values of the destination and source
13524 * @param {Function} customizer The function to customize assigned values.
13673 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
13760 * @param {Function} [customizer] The function to customize assigned values.
13845 * _.transform([2, 3, 4], function(result, n) {
13846 * result.push(n *= n);
13847 * return n % 2 == 0;
13929 * _.update(object, 'a[0].b.c', function(n) { return n * n; });
13933 * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
13956 * @param {Function} [customizer] The function to customize assigned values.
13971 * Creates an array of the own enumerable string keyed property values of `object`.
13973 * **Note:** Non-object values are coerced to objects.
13980 * @returns {Array} Returns the array of property values.
13990 * _.values(new Foo);
13993 * _.values('hi');
13996 function values(object) {
14002 * values of `object`.
14004 * **Note:** Non-object values are coerced to objects.
14011 * @returns {Array} Returns the array of property values.
14066 * Checks if `n` is between `start` and up to, but not including, `end`. If
14122 * floating-point values which can produce unexpected results.
14305 * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
14555 * Repeats the given string `n` times.
14562 * @param {number} [n=1] The number of times to repeat the string.
14576 function repeat(string, n, guard) {
14577 if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
14578 n = 1;
14580 n = toInteger(n);
14582 return baseRepeat(toString(string), n);
14739 * object is given, it takes precedence over `_.templateSettings` values.
14765 * @param {string} [options.sourceURL='lodash.templateSources[n]']
14778 * // Use the HTML "escape" delimiter to escape data property values.
14876 ) + '\n';
14887 source += "' +\n__e(" + escapeValue + ") +\n'";
14891 source += "';\n" + evaluateValue + ";\n__p += '";
14894 source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
14903 source += "';\n";
14909 source = 'with (obj) {\n' + source + '\n}\n';
14923 source = 'function(' + (variable || 'obj') + ') {\n' +
14926 : 'obj || (obj = {});\n'
14934 ? ', __j = Array.prototype.join;\n' +
14935 "function print() { __p += __j.call(arguments, '') }\n"
14936 : ';\n'
14939 'return __p\n}';
15419 * the corresponding property values of a given object, returning `true` if
15438 * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
15508 * function square(n) {
15509 * return n * n;
15531 * function square(n) {
15532 * return n * n;
15610 * property values, else `false`.
15616 * values against any array or object value, respectively. See `_.isEqual`
15619 * **Note:** Multiple values can be checked by combining several matchers
15626 * @param {Object} source The object of property values to match.
15638 * // Checking for several possible values
15652 * `srcValue` values against any array or object value, respectively. See
15655 * **Note:** Multiple values can be checked by combining several matchers
15675 * // Checking for several possible values
15851 * Creates a function that gets the argument at index `n`. If `n` is negative,
15858 * @param {number} [n=0] The index of the argument to return.
15870 function nthArg(n) {
15871 n = toInteger(n);
15873 return baseNth(args, n);
16020 * floating-point values which can produce unexpected results.
16057 * This method is like `_.range` except that it populates values in
16190 * Invokes the iteratee `n` times, returning an array of the results of
16197 * @param {number} n The number of times to invoke `iteratee`.
16208 function times(n, iteratee) {
16209 n = toInteger(n);
16210 if (n < 1 || n > MAX_SAFE_INTEGER) {
16214 length = nativeMin(n, MAX_ARRAY_LENGTH);
16217 n -= MAX_ARRAY_LENGTH;
16220 while (++index < n) {
16396 * var objects = [{ 'n': 1 }, { 'n': 2 }];
16398 * _.maxBy(objects, function(o) { return o.n; });
16399 * // => { 'n': 2 }
16402 * _.maxBy(objects, 'n');
16403 * // => { 'n': 2 }
16412 * Computes the mean of the values in `array`.
16443 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
16445 * _.meanBy(objects, function(o) { return o.n; });
16449 * _.meanBy(objects, 'n');
16494 * var objects = [{ 'n': 1 }, { 'n': 2 }];
16496 * _.minBy(objects, function(o) { return o.n; });
16497 * // => { 'n': 1 }
16500 * _.minBy(objects, 'n');
16501 * // => { 'n': 1 }
16571 * Computes the sum of the values in `array`.
16604 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
16606 * _.sumBy(objects, function(o) { return o.n; });
16610 * _.sumBy(objects, 'n');
16621 // Add methods that return wrapped values in chain sequences.
16759 lodash.values = values;
16783 // Add methods that return unwrapped values in chain sequences.
16967 LazyWrapper.prototype[methodName] = function(n) {
16968 n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
16975 result.__takeCount__ = nativeMin(n, result.__takeCount__);
16978 'size': nativeMin(n, MAX_ARRAY_LENGTH),
16985 LazyWrapper.prototype[methodName + 'Right'] = function(n) {
16986 return this.reverse()[methodName](n).reverse();