Add related function for each module. [closes #2932]

This commit is contained in:
Bert Verhelst
2017-01-16 01:27:42 +01:00
committed by John-David Dalton
parent b856263af6
commit 401016d260
85 changed files with 85 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ import createCompounder from './.internal/createCompounder.js';
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the camel cased string.
* @see upperCase, lowerCase, upperFirst, kebabCase, snakeCase, startCase
* @example
*
* camelCase('Foo Bar');

View File

@@ -15,7 +15,7 @@ import isArrayLikeObject from './isArrayLikeObject.js';
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see without, xor
* @see without, xor, xorBy, xorWith, union, unionBy, unionWith
* @example
*
* difference([2, 1], [2, 3]);

View File

@@ -13,6 +13,7 @@ import toString from './toString.js';
* @param {number} [position=string.length] The position to search up to.
* @returns {boolean} Returns `true` if `string` ends with `target`,
* else `false`.
* @see includes, startsWith
* @example
*
* endsWith('abc', 'c');

View File

@@ -34,6 +34,7 @@ const reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @see unescape, escapeRegExp
* @example
*
* escape('fred, barney, & pebbles');

View File

@@ -15,6 +15,7 @@ const reHasRegExpChar = RegExp(reRegExpChar.source);
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @see unescape, escape, escapeRegExp
* @example
*
* escapeRegExp('[lodash](https://lodash.com/)');

View File

@@ -13,7 +13,7 @@ import baseFilter from './.internal/baseFilter.js';
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see reject
* @see pull, pullAll, pullAllBy, pullAllWith, pullAt, remove, reject
* @example
*
* const users = [

View File

@@ -12,6 +12,7 @@ import findIndex from './findIndex.js';
* @param {Function} predicate The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @see findIndex, findKey, findLast, findLastIndex, findLastKey
* @example
*
* const users = [

View File

@@ -14,6 +14,7 @@ const nativeMax = Math.max;
* @param {Function} predicate The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @see find, findKey, findLast, findLastIndex, findLastKey
* @example
*
* const users = [

View File

@@ -11,6 +11,7 @@ import baseForOwn from './.internal/baseForOwn.js';
* @param {Function} predicate The function invoked per iteration.
* @returns {string|undefined} Returns the key of the matched element,
* else `undefined`.
* @see find, findIndex, findLast, findLastIndex, findLastKey
* @example
*
* const users = {

View File

@@ -11,6 +11,7 @@ import findLastIndex from './findLastIndex.js';
* @param {Function} predicate The function invoked per iteration.
* @param {number} [fromIndex=collection.length-1] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @see find, findIndex, findKey, findLastIndex, findLastKey
* @example
*
* findLast([1, 2, 3, 4], n => n % 2 == 1);

View File

@@ -15,6 +15,7 @@ const nativeMin = Math.min;
* @param {Function} predicate The function invoked per iteration.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @see find, findIndex, findKey, findLast, findLastKey
* @example
*
* const users = [

View File

@@ -11,6 +11,7 @@ import baseForOwnRight from './.internal/baseForOwnRight.js';
* @param {Function} predicate The function invoked per iteration.
* @returns {string|undefined} Returns the key of the matched element,
* else `undefined`.
* @see find, findIndex, findKey, findLast, findLastIndex
* @example
*
* const users = {

View File

@@ -11,6 +11,7 @@ import map from './map.js';
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new flattened array.
* @see map, mapKeys, mapValues, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth
* @example
*
* function duplicate(n) {

View File

@@ -13,6 +13,7 @@ const INFINITY = 1 / 0;
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new flattened array.
* @see map, mapKeys, mapValues, flatMap, flatMapDepth, flatten, flattenDeep, flattenDepth
* @example
*
* function duplicate(n) {

View File

@@ -12,6 +12,7 @@ import toInteger from './toInteger.js';
* @param {Function} iteratee The function invoked per iteration.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @see map, mapKeys, mapValues, flatMap, flatMapDeep, flatten, flattenDeep, flattenDepth
* @example
*
* function duplicate(n) {

View File

@@ -7,6 +7,7 @@ import baseFlatten from './.internal/baseFlatten.js';
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @see flatMap, flatMapDeep, flatMapDepth, flattenDeep, flattenDepth
* @example
*
* flatten([1, [2, [3, [4]], 5]]);

View File

@@ -10,6 +10,7 @@ const INFINITY = 1 / 0;
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @see flatMap, flatMapDeep, flatMapDepth, flatten, flattenDepth
* @example
*
* flattenDeep([1, [2, [3, [4]], 5]]);

View File

@@ -9,6 +9,7 @@ import toInteger from './toInteger.js';
* @param {Array} array The array to flatten.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @see flatMap, flatMapDeep, flatMapDepth, flattenDeep
* @example
*
* const array = [1, [2, [3, [4]], 5]];

View File

@@ -10,6 +10,7 @@ const WRAP_FLIP_FLAG = 512;
* @category Function
* @param {Function} func The function to flip arguments for.
* @returns {Function} Returns the new flipped function.
* @see reverse
* @example
*
* const flipped = flip((...args) => args);

View File

@@ -16,7 +16,7 @@ import baseEach from './.internal/baseEach.js';;
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see forEachRight
* @see forEachRight, forIn, forInRight, forOwn, forOwnRight
* @example
*
* forEach([1, 2], value => console.log(value));

View File

@@ -11,7 +11,7 @@ import baseEachRight from './.internal/baseEachRight.js';
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see forEach
* @see forEach, forIn, forInRight, forOwn, forOwnRight
* @example
*
* forEachRight([1, 2], value => console.log(value));

View File

@@ -12,7 +12,7 @@ import keysIn from './keysIn.js';
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see forInRight
* @see forEach, forEachRight, forInRight, forOwn, forOwnRight
* @example
*
* function Foo() {

View File

@@ -10,7 +10,7 @@ import keysIn from './keysIn.js';
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see forIn
* @see forEach, forEachRight, forIn, forOwn, forOwnRight
* @example
*
* function Foo() {

View File

@@ -11,7 +11,7 @@ import baseForOwn from './.internal/baseForOwn.js';
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see forOwnRight
* @see forEach, forEachRight, forIn, forInRight, forOwnRight
* @example
*
* function Foo() {

View File

@@ -9,7 +9,7 @@ import baseForOwnRight from './.internal/baseForOwnRight.js';
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see forOwn
* @see forEach, forEachRight, forIn, forInRight, forOwn
* @example
*
* function Foo() {

1
get.js
View File

@@ -10,6 +10,7 @@ import baseGet from './.internal/baseGet.js';
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @see has, hasIn, set, unset
* @example
*
* const object = { 'a': [{ 'b': { 'c': 3 } }] };

2
gt.js
View File

@@ -9,7 +9,7 @@ import toNumber from './toNumber.js';
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
* @see lt
* @see lt, gte, lte
* @example
*
* gt(3, 1);

2
gte.js
View File

@@ -9,7 +9,7 @@ import toNumber from './toNumber.js';
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than or equal to
* `other`, else `false`.
* @see lte
* @see gt, lt, lte
* @example
*
* gte(3, 1);

1
has.js
View File

@@ -9,6 +9,7 @@ import hasPath from './.internal/hasPath.js';
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @see hasIn, set, get
* @example
*
* const object = { 'a': { 'b': 2 } };

View File

@@ -9,6 +9,7 @@ import hasPath from './.internal/hasPath.js';
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @see has, set, get, unset
* @example
*
* const object = create({ 'a': create({ 'b': 2 }) });

View File

@@ -6,6 +6,7 @@
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the first element of `array`.
* @see last
* @example
*
* head([1, 2, 3]);

View File

@@ -21,6 +21,7 @@ const nativeMax = Math.max;
* @param {number} [fromIndex=0] The index to search from.
* @param- {Object} [guard] Enables use as an iteratee for methods like `reduce`.
* @returns {boolean} Returns `true` if `value` is found, else `false`.
* @see startsWith, endsWith
* @example
*
* includes([1, 2, 3], 1);

View File

@@ -10,6 +10,7 @@ import toInteger from './toInteger.js';
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
* @see toInteger, isNumber, toNumber
* @example
*
* isInteger(3);

View File

@@ -11,6 +11,7 @@ import isObjectLike from './isObjectLike.js';
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
* @see isInteger, toInteger, toNumber
* @example
*
* isNumber(3);

View File

@@ -8,6 +8,7 @@ import createCompounder from './.internal/createCompounder.js';
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the kebab cased string.
* @see upperCase, lowerCase, upperFirst, camelCase, snakeCase, startCase
* @example
*
* kebabCase('Foo Bar');

View File

@@ -12,6 +12,7 @@ import reduce from './reduce.js';
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @see groupBy, partition
* @example
*
* const array = [

View File

@@ -13,6 +13,7 @@ import isArrayLike from './isArrayLike.js';
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @see values, valuesIn
* @example
*
* function Foo() {

View File

@@ -7,6 +7,7 @@ import createCompounder from './.internal/createCompounder.js';
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @see upperCase, upperFirst, camelCase, kebabCase, snakeCase, startCase
* @example
*
* lowerCase('--Foo-Bar--');

2
lt.js
View File

@@ -9,7 +9,7 @@ import toNumber from './toNumber.js';
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than `other`,
* else `false`.
* @see gt
* @see gt, lte, gte
* @example
*
* lt(1, 3);

2
lte.js
View File

@@ -9,7 +9,7 @@ import toNumber from './toNumber.js';
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than or equal to
* `other`, else `false`.
* @see gte
* @see gt, lt, gte
* @example
*
* lte(1, 3);

View File

@@ -14,6 +14,7 @@ import baseOrderBy from './.internal/baseOrderBy.js';
* @param {string[]} [orders] The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `reduce`.
* @returns {Array} Returns the new sorted array.
* @see reverse
* @example
*
* const users = [

View File

@@ -11,6 +11,7 @@ import reduce from './reduce.js';
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the array of grouped elements.
* @see groupBy, keyBy
* @example
*
* const users = [

View File

@@ -13,6 +13,7 @@ import pullAll from './pullAll.js';
* @param {Array} array The array to modify.
* @param {...*} [values] The values to remove.
* @returns {Array} Returns `array`.
* @see pullAll, pullAllBy, pullAllWith, pullAt, remove, reject
* @example
*
* const array = ['a', 'b', 'c', 'a', 'b', 'c'];

View File

@@ -10,6 +10,7 @@ import basePullAll from './.internal/basePullAll.js';
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @returns {Array} Returns `array`.
* @see pull, pullAllBy, pullAllWith, pullAt, remove, reject
* @example
*
* const array = ['a', 'b', 'c', 'a', 'b', 'c'];

View File

@@ -13,6 +13,7 @@ import basePullAll from './.internal/basePullAll.js';
* @param {Array} values The values to remove.
* @param {Function} iteratee The iteratee invoked per element.
* @returns {Array} Returns `array`.
* @see pull, pullAll, pullAllWith, pullAt, remove, reject
* @example
*
* const array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];

View File

@@ -13,6 +13,7 @@ import basePullAll from './.internal/basePullAll.js';
* @param {Array} values The values to remove.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns `array`.
* @see pull, pullAll, pullAllBy, pullAt, remove, reject
* @example
*
* const array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];

View File

@@ -15,6 +15,7 @@ import isIndex from './.internal/isIndex.js';
* @param {Array} array The array to modify.
* @param {...(number|number[])} [indexes] The indexes of elements to remove.
* @returns {Array} Returns the new array of removed elements.
* @see pull, pullAll, pullAllBy, pullAllWith, remove, reject
* @example
*
* const array = ['a', 'b', 'c', 'd'];

View File

@@ -24,6 +24,7 @@ const nativeRandom = Math.random;
* @param {number} [upper=1] The upper bound.
* @param {boolean} [floating] Specify returning a floating-point number.
* @returns {number} Returns the random number.
* @see uniqueId
* @example
*
* random(0, 5);

View File

@@ -23,7 +23,7 @@ import baseReduce from './.internal/baseReduce.js';
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see reduceRight
* @see reduceRight, transform
* @example
*
* reduce([1, 2], (sum, n) => sum + n, 0);

View File

@@ -11,7 +11,7 @@ import negate from './negate.js';
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see filter
* @see pull, pullAll, pullAllBy, pullAllWith, pullAt, remove, filter
* @example
*
* const users = [

View File

@@ -13,6 +13,7 @@ import basePullAt from './.internal/basePullAt.js';
* @param {Array} array The array to modify.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new array of removed elements.
* @see pull, pullAll, pullAllBy, pullAllWith, pullAt, reject, filter
* @example
*
* const array = [1, 2, 3, 4];

View File

@@ -12,6 +12,7 @@ import toString from './toString.js';
* @param {RegExp|string} pattern The pattern to replace.
* @param {Function|string} replacement The match replacement.
* @returns {string} Returns the modified string.
* @see truncate, trim
* @example
*
* replace('Hi Fred', 'Fred', 'Barney');

View File

@@ -12,6 +12,7 @@ const nativeReverse = Array.prototype.reverse;
* @category Array
* @param {Array} array The array to modify.
* @returns {Array} Returns `array`.
* @see flip, sortBy
* @example
*
* const array = [1, 2, 3];

1
set.js
View File

@@ -14,6 +14,7 @@ import baseSet from './.internal/baseSet.js';
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @returns {Object} Returns `object`.
* @see has, hasIn, get, unset
* @example
*
* const object = { 'a': [{ 'b': { 'c': 3 } }] };

View File

@@ -8,6 +8,7 @@ import createCompounder from './.internal/createCompounder.js';
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the snake cased string.
* @see upperCase, lowerCase, upperFirst, camelCase, kebabCase, startCase
* @example
*
* snakeCase('Foo Bar');

View File

@@ -9,6 +9,7 @@ import upperFirst from './upperFirst.js';
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the start cased string.
* @see upperCase, lowerCase, upperFirst, camelCase, kebabCase, snakeCase
* @example
*
* startCase('--foo-bar--');

View File

@@ -13,6 +13,7 @@ import toString from './toString.js';
* @param {number} [position=0] The position to search from.
* @returns {boolean} Returns `true` if `string` starts with `target`,
* else `false`.
* @see includes, endsWith
* @example
*
* startsWith('abc', 'a');

View File

@@ -10,6 +10,7 @@ import toFinite from './toFinite.js';
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @see isInteger, isNumber, toNumber
* @example
*
* toInteger(3.2);

View File

@@ -26,6 +26,7 @@ const freeParseInt = parseInt;
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @see isInteger, toInteger, isNumber
* @example
*
* toNumber(3.2);

View File

@@ -21,6 +21,7 @@ import isTypedArray from './isTypedArray.js';
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The custom accumulator value.
* @returns {*} Returns the accumulated value.
* @see reduce, reduceRight
* @example
*
* transform([2, 3, 4], (result, n) => {

View File

@@ -17,6 +17,7 @@ const reTrim = /^\s+|\s+$/g;
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `map`.
* @returns {string} Returns the trimmed string.
* @see trimEnd, trimStart
* @example
*
* trim(' abc ');

View File

@@ -16,6 +16,7 @@ const reTrimEnd = /\s+$/;
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `map`.
* @returns {string} Returns the trimmed string.
* @see trim, trimStart
* @example
*
* trimEnd(' abc ');

View File

@@ -16,6 +16,7 @@ const reTrimStart = /^\s+/;
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `map`.
* @returns {string} Returns the trimmed string.
* @see trim, trimEnd
* @example
*
* trimStart(' abc ');

View File

@@ -28,6 +28,7 @@ const reFlags = /\w*$/;
* @param {string} [options.omission='...'] The string to indicate text is omitted.
* @param {RegExp|string} [options.separator] The separator pattern to truncate to.
* @returns {string} Returns the truncated string.
* @see replace
* @example
*
* truncate('hi-diddly-ho there, neighborino');

View File

@@ -25,6 +25,7 @@ const reHasEscapedHtml = RegExp(reEscapedHtml.source);
* @category String
* @param {string} [string=''] The string to unescape.
* @returns {string} Returns the unescaped string.
* @see escape, escapeRegExp
* @example
*
* unescape('fred, barney, & pebbles');

View File

@@ -11,6 +11,7 @@ import isArrayLikeObject from './isArrayLikeObject.js';
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of combined values.
* @see unionBy, unionWith, difference, without, xor, xorBy
* @example
*
* union([2], [1, 2]);

View File

@@ -15,6 +15,7 @@ import last from './last.js';
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} iteratee The iteratee invoked per element.
* @returns {Array} Returns the new array of combined values.
* @see union, unionWith, difference, without, xor, xorBy
* @example
*
* unionBy([2.1], [1.2, 2.3], Math.floor);

View File

@@ -14,6 +14,7 @@ import last from './last.js';
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of combined values.
* @see union, unionBy, difference, without, xor, xorBy
* @example
*
* const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];

View File

@@ -11,6 +11,7 @@ import baseUniq from './.internal/baseUniq.js';
* @category Array
* @param {Array} array The array to inspect.
* @returns {Array} Returns the new duplicate free array.
* @see uniqBy, uniqWith
* @example
*
* uniq([2, 1, 2]);

View File

@@ -12,6 +12,7 @@ import baseUniq from './.internal/baseUniq.js';
* @param {Array} array The array to inspect.
* @param {Function} iteratee The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @see uniq, uniqWith
* @example
*
* uniqBy([2.1, 1.2, 2.3], Math.floor);

View File

@@ -11,6 +11,7 @@ import baseUniq from './.internal/baseUniq.js';
* @param {Array} array The array to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @see uniq, uniqBy
* @example
*
* const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];

View File

@@ -10,6 +10,7 @@ let idCounter = 0;
* @category Util
* @param {string} [prefix=''] The value to prefix the ID with.
* @returns {string} Returns the unique ID.
* @see random
* @example
*
* uniqueId('contact_');

View File

@@ -10,6 +10,7 @@ import baseUnset from './.internal/baseUnset.js';
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
* @see has, set, get
* @example
*
* const object = { 'a': [{ 'b': { 'c': 7 } }] };

View File

@@ -16,6 +16,7 @@ const nativeMax = Math.max;
* @category Array
* @param {Array} array The array of grouped elements to process.
* @returns {Array} Returns the new array of regrouped elements.
* @see zip, zipObject, zipObjectDeep, zipWith, unzipWith
* @example
*
* const zipped = zip(['a', 'b'], [1, 2], [true, false]);

View File

@@ -7,6 +7,7 @@ import createCompounder from './.internal/createCompounder.js';
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the upper cased string.
* @see lowerCase, upperFirst, camelCase, kebabCase, snakeCase, startCase
* @example
*
* upperCase('--foo-bar');

View File

@@ -7,6 +7,7 @@ import createCaseFirst from './.internal/createCaseFirst.js';
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @see upperCase, lowerCase, camelCase, kebabCase, snakeCase, startCase
* @example
*
* upperFirst('fred');

View File

@@ -10,6 +10,7 @@ import keys from './keys.js';
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @see keys, valuesIn
* @example
*
* function Foo() {

View File

@@ -13,7 +13,7 @@ import isArrayLikeObject from './isArrayLikeObject.js';
* @param {Array} array The array to inspect.
* @param {...*} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see difference, xor
* @see difference, xor, xorBy, xorWith, union, unionBy, unionWith
* @example
*
* without([2, 1, 2, 3], 1, 2);

2
xor.js
View File

@@ -12,7 +12,7 @@ import isArrayLikeObject from './isArrayLikeObject.js';
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of filtered values.
* @see difference, without
* @see difference, without, xorBy, xorWith, union, unionBy, unionWith
* @example
*
* xor([2, 1], [2, 3]);

View File

@@ -15,6 +15,7 @@ import last from './last.js';
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} iteratee The iteratee invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @see difference, without, xor, xorWith, union, unionBy, unionWith
* @example
*
* xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);

View File

@@ -14,6 +14,7 @@ import last from './last.js';
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @see difference, without, xor, xorBy, union, unionBy, unionWith
* @example
*
* const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];

1
zip.js
View File

@@ -9,6 +9,7 @@ import unzip from './unzip.js';
* @category Array
* @param {...Array} [arrays] The arrays to process.
* @returns {Array} Returns the new array of grouped elements.
* @see zipObject, zipObjectDeep, zipWith, unzip, unzipWith
* @example
*
* zip(['a', 'b'], [1, 2], [true, false]);

View File

@@ -10,6 +10,7 @@ import baseZipObject from './.internal/baseZipObject.js';
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @see zip, zipObjectDeep, zipWith, unzip, unzipWith
* @example
*
* zipObject(['a', 'b'], [1, 2]);

View File

@@ -9,6 +9,7 @@ import baseZipObject from './.internal/baseZipObject.js';
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @see zip, zipObject, zipWith, unzip, unzipWith
* @example
*
* zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);

View File

@@ -11,6 +11,7 @@ import unzipWith from './unzipWith.js';
* @param {Function} iteratee The function to combine
* grouped values.
* @returns {Array} Returns the new array of grouped elements.
* @see zip, zipObject, zipObjectDeep, zipWith, unzip, unzipWith
* @example
*
* zipWith([1, 2], [10, 20], [100, 200], (a, b, c) => a + b + c);