diff --git a/build.js b/build.js index 17f8385ff..b49a54d7f 100644 --- a/build.js +++ b/build.js @@ -657,9 +657,9 @@ * Adds build `commands` to the copyright/license header of the `source`. * * @private - * @param {String} source The source to process. - * @param {Array} [commands=[]] An array of commands. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {array} [commands=[]] An array of commands. + * @returns {string} Returns the modified source. */ function addCommandsToHeader(source, commands) { return source.replace(/(\/\**\n)( \*)( *@license[\s*]+)( *Lo-Dash [\w.-]+)(.*)/, function() { @@ -698,9 +698,9 @@ * Adds support for Underscore style chaining to the `source`. * * @private - * @param {String} source The source to process. - * @param {Boolean} [isModularize=false] A flag to specify a modularize build - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {boolean} [isModularize=false] A flag to specify a modularize build + * @returns {string} Returns the modified source. */ function addUnderscoreChaining(source, isModularize) { // remove `lodash.prototype.toString` and `lodash.prototype.valueOf` assignments @@ -821,7 +821,7 @@ * Creates modules based on the provided build state. * * @private - * @param {Object} state The build state object. + * @param {object} state The build state object. */ function buildModule(state) { var buildFuncs = state.buildFuncs, @@ -1084,8 +1084,8 @@ * each template file's basename. * * @private - * @param {Object} state The build state object. - * @returns {String} Returns the compiled source. + * @param {object} state The build state object. + * @returns {string} Returns the compiled source. */ function buildTemplate(state) { var pattern = state.templatePattern, @@ -1164,8 +1164,8 @@ * Capitalizes a given string. * * @private - * @param {String} string The string to capitalize. - * @returns {String} Returns the capitalized string. + * @param {string} string The string to capitalize. + * @returns {string} Returns the capitalized string. */ function capitalize(string) { return string[0].toUpperCase() + string.slice(1); @@ -1175,8 +1175,8 @@ * Removes unnecessary semicolons and whitespace from compiled code. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function cleanupCompiled(source) { return source @@ -1188,8 +1188,8 @@ * Removes unnecessary comments, and whitespace. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function cleanupSource(source) { return source @@ -1217,7 +1217,7 @@ * The default callback used for `build` invocations. * * @private - * @param {Object} data The data for the given build. + * @param {object} data The data for the given build. * gzip - The gzipped output of the built source * outputPath - The path where the built source is to be written * source - The built source output @@ -1291,9 +1291,9 @@ * Gets the aliases associated with a given function name. * * @private - * @param {String} funcName The name of the function to get aliases for. - * @param {Object} [depMap] The dependency map used to validate aliases. - * @returns {Array} Returns an array of aliases. + * @param {string} funcName The name of the function to get aliases for. + * @param {object} [depMap] The dependency map used to validate aliases. + * @returns {array} Returns an array of aliases. */ function getAliases(funcName, depMap) { var aliases = hasOwnProperty.call(realToAliasMap, funcName) && realToAliasMap[funcName]; @@ -1307,9 +1307,9 @@ * Gets the category of the given `identifier`. * * @private - * @param {String} identifier The identifier to query. - * @param {Object} [depMap] The dependency map used to resolve the identifier. - * @returns {String} Returns the identifier's category. + * @param {string} identifier The identifier to query. + * @param {object} [depMap] The dependency map used to resolve the identifier. + * @returns {string} Returns the identifier's category. */ function getCategory(identifier, depMap) { identifier = getRealName(identifier, depMap); @@ -1322,8 +1322,8 @@ * Gets the `createObject` fork from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the fork. + * @param {string} source The source to inspect. + * @returns {string} Returns the fork. */ function getCreateObjectFork(source) { var result = source.match(/(?:\s*\/\/.*)*\n( *)if *\((?:!nativeCreate)[\s\S]+?\n *};\n\1}/); @@ -1334,8 +1334,8 @@ * Gets the `_.defer` fork from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the fork. + * @param {string} source The source to inspect. + * @returns {string} Returns the fork. */ function getDeferFork(source) { var result = source.match(/(?:\s*\/\/.*)*\n( *)if *\(isV8 *&& *freeModule[\s\S]+?\n\1}/); @@ -1346,10 +1346,10 @@ * Gets an array of depenants for the given function name(s). * * @private - * @param {String} funcName A function name or array of function names. - * @param {Object} [depMap] The dependency map used to look up dependants. - * @param- {Array} [stackA=[]] Internally used track queried function names. - * @returns {Array} Returns an array of function dependants. + * @param {string} funcName A function name or array of function names. + * @param {object} [depMap] The dependency map used to look up dependants. + * @param- {array} [stackA=[]] Internally used track queried function names. + * @returns {array} Returns an array of function dependants. */ function getDependants(funcName, depMap, stack) { var funcNames = _.isArray(funcName) ? funcName : [funcName]; @@ -1374,11 +1374,11 @@ * dependencies plus any additional detected sub-dependencies. * * @private - * @param {Array|String} funcName A function name or array of dependencies to query. - * @param {Object} [depMap] The dependency map used to look up dependants. - * @param {Boolean} [isShallow=false] A flag to indicate getting only the immediate dependencies. - * @param- {Array} [stackA=[]] Internally used track queried function names. - * @returns {Array} Returns an array of function dependencies. + * @param {(string|string[])} funcName A function name or array of dependencies to query. + * @param {object} [depMap] The dependency map used to look up dependants. + * @param {boolean} [isShallow=false] A flag to indicate getting only the immediate dependencies. + * @param- {array} [stackA=[]] Internally used track queried function names. + * @returns {array} Returns an array of function dependencies. */ function getDependencies(funcName, depMap, isShallow, stack) { // juggle arguments @@ -1419,9 +1419,9 @@ * Gets the formatted source of the given function. * * @private - * @param {Function} func The function to process. - * @param {Number|String} [indent=0] The level to indent. - * @returns {String} Returns the formatted source. + * @param {function} func The function to process. + * @param {(number|string)} [indent=0] The level to indent. + * @returns {string} Returns the formatted source. */ function getFunctionSource(func, indent) { var source = func.source || (func + ''); @@ -1444,8 +1444,8 @@ * Gets the indent of the given function. * * @private - * @param {Function} func The function to process. - * @returns {String} Returns the indent. + * @param {function} func The function to process. + * @returns {string} Returns the indent. */ function getIndent(func) { return /^ *(?=\S)/m.exec(func.source || func)[0]; @@ -1455,8 +1455,8 @@ * Gets the `_.isArguments` fork from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the fork. + * @param {string} source The source to inspect. + * @returns {string} Returns the fork. */ function getIsArgumentsFork(source) { var result = source.match(/(?:\s*\/\/.*)*\n( *)if *\((?:!support\.argsClass|!isArguments)[\s\S]+?\n *};\n\1}/); @@ -1467,8 +1467,8 @@ * Gets the `_.isArray` fork from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the fork. + * @param {string} source The source to inspect. + * @returns {string} Returns the fork. */ function getIsArrayFork(source) { return matchFunction(source, 'isArray') @@ -1480,8 +1480,8 @@ * Gets the `_.isFunction` fork from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the fork. + * @param {string} source The source to inspect. + * @returns {string} Returns the fork. */ function getIsFunctionFork(source) { var result = source.match(/(?:\s*\/\/.*)*\n( *)if *\(isFunction\(\/x\/[\s\S]+?\n *};\n\1}/); @@ -1492,8 +1492,8 @@ * Gets the Lo-Dash method assignments snippet from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the method assignments snippet. + * @param {string} source The source to inspect. + * @returns {string} Returns the method assignments snippet. */ function getMethodAssignments(source) { var result = source.match(/\n\n(?:\s*\/\/.*)*\s*lodash\.\w+\s*=[\s\S]+lodash\.\w+\s=.+/); @@ -1504,8 +1504,8 @@ * Gets the names of identifiers in `source` that belong to the given `category`. * * @private - * @param {String} category The category to filter by. - * @returns {Array} Returns a new array of names. + * @param {string} category The category to filter by. + * @returns {array} Returns a new array of names. */ function getNamesByCategory(category) { return categoryMap[category] || []; @@ -1515,9 +1515,9 @@ * Gets the real name, not alias, of a given function name. * * @private - * @param {String} funcName The name of the function to resolve. - * @param {Object} [depMap] The dependency map used to validate the real name. - * @returns {String} Returns the real function name. + * @param {string} funcName The name of the function to resolve. + * @param {object} [depMap] The dependency map used to validate the real name. + * @returns {string} Returns the real function name. */ function getRealName(funcName, depMap) { return ( @@ -1531,8 +1531,8 @@ * Gets the `setBindData` fork from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the fork. + * @param {string} source The source to inspect. + * @returns {string} Returns the fork. */ function getSetBindDataFork(source) { var result = matchFunction(source, 'setBindData').match(/!defineProperty[^:]+:\s*/); @@ -1543,9 +1543,9 @@ * Creates a sorted array of all variables defined outside of Lo-Dash functions. * * @private - * @param {String} source The source to process. - * @param {Boolean} [isShallow=false] A flag to indicate looking for varaibles one closure deep. - * @returns {Array} Returns a new array of variable names. + * @param {string} source The source to process. + * @param {boolean} [isShallow=false] A flag to indicate looking for varaibles one closure deep. + * @returns {array} Returns a new array of variable names. */ function getVars(source, isShallow) { var indentA = isShallow ? ' {2}' : ' {2,4}', @@ -1577,10 +1577,10 @@ * Determines if a variable, of the given `varName`, is used in `source`. * * @private - * @param {String} source The source to process. - * @param {String} varName The name of the variable. - * @param {Boolean} [isShallow=false] A flag to indicate looking for varaibles one closure deep. - * @returns {Boolean} Returns `true` if the variable is used, else `false`. + * @param {string} source The source to process. + * @param {string} varName The name of the variable. + * @param {boolean} [isShallow=false] A flag to indicate looking for varaibles one closure deep. + * @returns {boolean} Returns `true` if the variable is used, else `false`. */ function isVarUsed(source, varName, isShallow) { var match = matchVar(source, varName, isShallow); @@ -1597,10 +1597,10 @@ * assignment and returns the matched snippet. * * @private - * @param {String} source The source to inspect. - * @param {String} funcName The name of the function to match. - * @param {Boolean} [leadingComments] A flag to indicate including leading comments. - * @returns {String} Returns the matched function snippet. + * @param {string} source The source to inspect. + * @param {string} funcName The name of the function to match. + * @param {boolean} [leadingComments] A flag to indicate including leading comments. + * @returns {string} Returns the matched function snippet. */ function matchFunction(source, funcName, leadingComments) { var result = _.reduce([ @@ -1631,10 +1631,10 @@ * returns the matched snippet. * * @private - * @param {String} source The source to inspect. - * @param {String} propName The name of the property to match. - * @param {Boolean} [leadingComments] A flag to indicate including leading comments. - * @returns {String} Returns the matched property snippet. + * @param {string} source The source to inspect. + * @param {string} propName The name of the property to match. + * @param {boolean} [leadingComments] A flag to indicate including leading comments. + * @returns {string} Returns the matched property snippet. */ function matchProp(source, propName, leadingComments) { var result = source.match(RegExp( @@ -1652,10 +1652,10 @@ * the matched snippet. * * @private - * @param {String} source The source to inspect. - * @param {String} varName The name of the variable to match. - * @param {Boolean} [isShallow=false] A flag to indicate looking for varaibles one closure deep. - * @returns {String} Returns the matched variable snippet. + * @param {string} source The source to inspect. + * @param {string} varName The name of the variable to match. + * @param {boolean} [isShallow=false] A flag to indicate looking for varaibles one closure deep. + * @returns {string} Returns the matched variable snippet. */ function matchVar(source, varName, isShallow) { var indentA = isShallow ? ' {2}' : ' {2,4}', @@ -1689,8 +1689,8 @@ * Converts a comma separated options string into an array. * * @private - * @param {String} value The option to convert. - * @returns {Array} Returns the new converted array. + * @param {string} value The option to convert. + * @returns {array} Returns the new converted array. */ function optionToArray(value) { return _.compact(_.isArray(value) @@ -1703,9 +1703,9 @@ * Converts a comma separated options string into an array of function names. * * @private - * @param {String} value The option to convert. - * @param {Object} [depMap] The dependency map used to resolve real names. - * @returns {Array} Returns the new converted array. + * @param {string} value The option to convert. + * @param {object} [depMap] The dependency map used to resolve real names. + * @returns {array} Returns the new converted array. */ function optionToMethodsArray(value, depMap) { depMap || (depMap = funcDependencyMap); @@ -1719,8 +1719,8 @@ * Removes support for Lo-Dash wrapper chaining in `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeChaining(source) { source = removeSpliceObjectsFix(source); @@ -1753,8 +1753,8 @@ * Removes all comments from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeComments(source) { return source.replace(/^ *(?:\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/|\/\/.+)\n/gm, ''); @@ -1764,8 +1764,8 @@ * Removes the `createObject` fork from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeCreateObjectFork(source) { return source.replace(getCreateObjectFork(source), ''); @@ -1775,8 +1775,8 @@ * Removes the `_.defer` fork from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeDeferFork(source) { return source.replace(getDeferFork(source), ''); @@ -1786,8 +1786,8 @@ * Removes ES5 specific optimizations from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeEsOptimization(source) { // remove `__bindData__` logic and `setBindData` function calls from `createBound` @@ -1811,9 +1811,9 @@ * Removes all references to `identifier` from `createIterator` in `source`. * * @private - * @param {String} source The source to process. - * @param {String} identifier The name of the variable or property to remove. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} identifier The name of the variable or property to remove. + * @returns {string} Returns the modified source. */ function removeFromCreateIterator(source, identifier) { var snippet = matchFunction(source, 'createIterator'); @@ -1847,9 +1847,9 @@ * Removes all references to `identifier` from `getObject` in `source`. * * @private - * @param {String} source The source to process. - * @param {String} identifier The name of the property to remove. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} identifier The name of the property to remove. + * @returns {string} Returns the modified source. */ function removeFromGetObject(source, identifier) { return source.replace(matchFunction(source, 'getObject'), function(match) { @@ -1864,9 +1864,9 @@ * Removes all references to `identifier` from `releaseObject` in `source`. * * @private - * @param {String} source The source to process. - * @param {String} identifier The name of the property to remove. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} identifier The name of the property to remove. + * @returns {string} Returns the modified source. */ function removeFromReleaseObject(source, identifier) { return source.replace(matchFunction(source, 'releaseObject'), function(match) { @@ -1882,9 +1882,9 @@ * associated code from `source`. * * @private - * @param {String} source The source to process. - * @param {String} funcName The name of the function to remove. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} funcName The name of the function to remove. + * @returns {string} Returns the modified source. */ function removeFunction(source, funcName) { var snippet; @@ -1904,8 +1904,8 @@ * Removes all references to `getIndexOf` from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeGetIndexOf(source) { source = removeFunction(source, 'getIndexOf'); @@ -1931,8 +1931,8 @@ * Removes the `_.isArguments` fork from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeIsArgumentsFork(source) { return source.replace(getIsArgumentsFork(source), ''); @@ -1942,8 +1942,8 @@ * Removes the `_.isArray` fork from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeIsArrayFork(source) { return source.replace(getIsArrayFork(source), ''); @@ -1953,8 +1953,8 @@ * Removes the `_.isFunction` fork from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeIsFunctionFork(source) { return source.replace(getIsFunctionFork(source), ''); @@ -1964,8 +1964,8 @@ * Removes the `Object.keys` object iteration optimization from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeKeysOptimization(source) { source = removeFromCreateIterator(source, 'keys'); @@ -1992,8 +1992,8 @@ * Removes all Lo-Dash assignments from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the modified source. + * @param {string} source The source to inspect. + * @returns {string} Returns the modified source. */ function removeAssignments(source) { source = removeMethodAssignments(source); @@ -2007,8 +2007,8 @@ * Removes the Lo-Dash method assignments snippet from `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the modified source. + * @param {string} source The source to inspect. + * @returns {string} Returns the modified source. */ function removeMethodAssignments(source) { return source.replace(getMethodAssignments(source), ''); @@ -2018,9 +2018,9 @@ * Removes a Lo-Dash property, of the given `propName`, from `source`. * * @private - * @param {String} source The source to process. - * @param {String} propName The name of the property to remove. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} propName The name of the property to remove. + * @returns {string} Returns the modified source. */ function removeProp(source, propName) { return source.replace(matchProp(source, propName, true), ''); @@ -2030,8 +2030,8 @@ * Removes all pseudo private Lo-Dash properties from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removePseudoPrivates(source) { return source.replace(/^(?: *\/\/.*\s*)* *lodash\._\w+ *=[\s\S]+?;\n/gm, ''); @@ -2041,8 +2041,8 @@ * Removes all `runInContext` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeRunInContext(source) { // replace reference in `reThis` assignment @@ -2077,8 +2077,8 @@ * Removes the `setBindData` fork from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSetBindDataFork(source) { return source = source.replace(matchFunction(source, 'isArray'), function(match) { @@ -2091,8 +2091,8 @@ * snippet of `source`. * * @private - * @param {String} source The source to inspect. - * @returns {String} Returns the modified source. + * @param {string} source The source to inspect. + * @returns {string} Returns the modified source. */ function removeSpliceObjectsFix(source) { return source.replace(/(?:\s*\/\/.*)*\n( *)if *\(!support\.spliceObjects[\s\S]+?(?:\{\s*}|\n\1})/, ''); @@ -2102,8 +2102,8 @@ * Removes all strings from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeStrings(source) { return source.replace(/(["'])(?:(?!\1)[^\n\\]|\\.)*\1/g, ''); @@ -2113,8 +2113,8 @@ * Removes all `support.argsClass` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportArgsClass(source) { source = removeSupportProp(source, 'argsClass'); @@ -2143,8 +2143,8 @@ * Removes all `support.argsObject` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportArgsObject(source) { source = removeSupportProp(source, 'argsObject'); @@ -2161,8 +2161,8 @@ * Removes all `support.enumErrorProps` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportEnumErrorProps(source) { source = removeSupportProp(source, 'enumErrorProps'); @@ -2181,8 +2181,8 @@ * Removes all `support.enumPrototypes` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportEnumPrototypes(source) { source = removeSupportProp(source, 'enumPrototypes'); @@ -2208,8 +2208,8 @@ * Removes all `support.nodeClass` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportNodeClass(source) { source = removeSupportProp(source, 'nodeClass'); @@ -2233,8 +2233,8 @@ * Removes all `support.nonEnumArgs` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportNonEnumArgs(source) { source = removeSupportProp(source, 'nonEnumArgs'); @@ -2260,8 +2260,8 @@ * Removes all `support.nonEnumShadows` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportNonEnumShadows(source) { source = removeFromCreateIterator(source, 'nonEnumProps'); @@ -2280,8 +2280,8 @@ * Removes all `support.ownLast` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportOwnLast(source) { source = removeSupportProp(source, 'ownLast'); @@ -2298,8 +2298,8 @@ * Removes all `support.spliceObjects` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportSpliceObjects(source) { source = removeSupportProp(source, 'spliceObjects'); @@ -2311,8 +2311,8 @@ * Removes all `support.unindexedChars` references from `source`. * * @private - * @param {String} source The source to process. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @returns {string} Returns the modified source. */ function removeSupportUnindexedChars(source) { source = removeSupportProp(source, 'unindexedChars'); @@ -2341,9 +2341,9 @@ * Removes a given property from the `support` object in `source`. * * @private - * @param {String} source The source to process. - * @param {String} varName The name of the `support` property to remove. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} varName The name of the `support` property to remove. + * @returns {string} Returns the modified source. */ function removeSupportProp(source, propName) { return source.replace(matchProp(source, 'support'), function(match) { @@ -2363,9 +2363,9 @@ * Removes a variable, of the given `varName`, from `source`. * * @private - * @param {String} source The source to process. - * @param {String} varName The name of the variable to remove. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} varName The name of the variable to remove. + * @returns {string} Returns the modified source. */ function removeVar(source, varName) { // simplify complex variable assignments @@ -2413,9 +2413,9 @@ * Replaces the `funcName` function body in `source` with `funcValue`. * * @private - * @param {String} source The source to process. - * @param {String} varName The name of the function to replace. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} varName The name of the function to replace. + * @returns {string} Returns the modified source. */ function replaceFunction(source, funcName, funcValue) { var snippet = matchFunction(source, funcName); @@ -2435,9 +2435,9 @@ * Replaces the `support` object `propName` property value in `source` with `propValue`. * * @private - * @param {String} source The source to process. - * @param {String} varName The name of the `support` property to replace. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {string} varName The name of the `support` property to replace. + * @returns {string} Returns the modified source. */ function replaceSupportProp(source, propName, propValue) { return source.replace(RegExp( @@ -2456,9 +2456,9 @@ * Replaces the `varName` variable declaration value in `source` with `varValue`. * * @private - * @param {String} source The source to inspect. - * @param {String} varName The name of the variable to replace. - * @returns {String} Returns the modified source. + * @param {string} source The source to inspect. + * @param {string} varName The name of the variable to replace. + * @returns {string} Returns the modified source. */ function replaceVar(source, varName, varValue) { // replace a variable that's not part of a declaration list @@ -2488,9 +2488,9 @@ * Hard-codes the `strict` template option value for `iteratorTemplate`. * * @private - * @param {String} source The source to process. - * @param {Boolean} value The value to set. - * @returns {String} Returns the modified source. + * @param {string} source The source to process. + * @param {boolean} value The value to set. + * @returns {string} Returns the modified source. */ function setUseStrictOption(source, value) { // inject or remove the "use strict" directive @@ -2512,8 +2512,8 @@ * * Note: For a list of commands see `displayHelp()` or run `lodash --help`. * - * @param {Array|Object} [options=[]] An array of build commands or the state object. - * @param {Function} [callback=defaultBuildCallback] The function called or per build. + * @param {(array|object)} [options=[]] An array of build commands or the state object. + * @param {function} [callback=defaultBuildCallback] The function called or per build. */ function build(options, callback) { options || (options = []); @@ -3499,9 +3499,9 @@ ' * @static', ' * @memberOf _', ' * @category Collections', - ' * @param {Array|Object|String} collection The collection to iterate over.', - ' * @param {Object} properties The object of property values to filter by.', - ' * @returns {Mixed} Returns the found element, else `undefined`.', + ' * @param {(array|object|string)} collection The collection to iterate over.', + ' * @param {object} properties The object of property values to filter by.', + ' * @returns {*} Returns the found element, else `undefined`.', ' * @example', ' *', ' * var food = [', diff --git a/build/minify.js b/build/minify.js index fcd99fcb9..1f13d68ab 100755 --- a/build/minify.js +++ b/build/minify.js @@ -72,12 +72,12 @@ * callback when finished. The `onComplete` callback is invoked with one * argument; (outputSource). * - * @param {Array|String} [source=''] The source to minify or array of commands. + * @param {(string|string[])} [source=''] The source to minify or array of commands. * -o, --output - Write output to a given path/filename. * -s, --silent - Skip status updates normally logged to the console. * -t, --template - Applies template specific minifier options. * - * @param {Object} [options={}] The options object. + * @param {object} [options={}] The options object. * outputPath - Write output to a given path/filename. * isSilent - Skip status updates normally logged to the console. * isTemplate - Applies template specific minifier options. @@ -205,8 +205,8 @@ * * @private * @constructor - * @param {String} source The source to minify. - * @param {Object} options The options object. + * @param {string} source The source to minify. + * @param {object} options The options object. * outputPath - Write output to a given path/filename. * isSilent - Skip status updates normally logged to the console. * isTemplate - Applies template specific minifier options. @@ -260,7 +260,7 @@ * `git hash-object path/to/dependency.tar.gz`. * * @private - * @param {Object} options The options object. + * @param {object} options The options object. * id - The Git object ID of the `.tar.gz` file. * onComplete - The function called once the extraction has finished. * path - The path of the extraction directory. @@ -333,7 +333,7 @@ * See https://code.google.com/p/closure-compiler/wiki/FAQ#What_are_the_recommended_Java_VM_command-line_options?. * * @private - * @param {Function} callback The function called once the options have been retrieved. + * @param {function} callback The function called once the options have been retrieved. */ function getJavaOptions(callback) { var result = []; @@ -352,8 +352,8 @@ * Resolves the source map path from the given output path. * * @private - * @param {String} outputPath The output path. - * @returns {String} Returns the source map path. + * @param {string} outputPath The output path. + * @returns {string} Returns the source map path. */ function getMapPath(outputPath) { return path.join(path.dirname(outputPath), path.basename(outputPath, '.js') + '.map'); @@ -366,9 +366,9 @@ * minified result, and any exceptions encountered, to a `callback` function. * * @private - * @param {String} source The JavaScript source to minify. - * @param {String} mode The optimization mode. - * @param {Function} callback The function called once the process has completed. + * @param {string} source The JavaScript source to minify. + * @param {string} mode The optimization mode. + * @param {function} callback The function called once the process has completed. */ function closureCompile(source, mode, callback) { var filePath = this.filePath, @@ -466,9 +466,9 @@ * for symmetry. * * @private - * @param {String} source The JavaScript source to minify. - * @param {String} label The label to log. - * @param {Function} callback The function called once the process has completed. + * @param {string} source The JavaScript source to minify. + * @param {string} label The label to log. + * @param {function} callback The function called once the process has completed. */ function uglify(source, label, callback) { if (!this.isSilent) { @@ -520,9 +520,9 @@ * The Closure Compiler callback for simple optimizations. * * @private - * @param {Object|Undefined} exception The error object. - * @param {String} result The resulting minified source. - * @param {String} map The source map output. + * @param {object} [exception] The error object. + * @param {string} result The resulting minified source. + * @param {string} map The source map output. */ function onClosureSimpleCompile(exception, result, map) { if (exception) { @@ -540,7 +540,7 @@ * The Closure Compiler `gzip` callback for simple optimizations. * * @private - * @param {Object|Undefined} exception The error object. + * @param {object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onClosureSimpleGzip(exception, result) { @@ -565,9 +565,9 @@ * The Closure Compiler callback for advanced optimizations. * * @private - * @param {Object|Undefined} exception The error object. - * @param {String} result The resulting minified source. - * @param {String} map The source map output. + * @param {object} [exception] The error object. + * @param {string} result The resulting minified source. + * @param {string} map The source map output. */ function onClosureAdvancedCompile(exception, result, map) { if (exception) { @@ -585,7 +585,7 @@ * The Closure Compiler `gzip` callback for advanced optimizations. * * @private - * @param {Object|Undefined} exception The error object. + * @param {object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onClosureAdvancedGzip(exception, result) { @@ -610,8 +610,8 @@ * The UglifyJS callback. * * @private - * @param {Object|Undefined} exception The error object. - * @param {String} result The resulting minified source. + * @param {object} [exception] The error object. + * @param {string} result The resulting minified source. */ function onUglify(exception, result) { if (exception) { @@ -626,7 +626,7 @@ * The UglifyJS `gzip` callback. * * @private - * @param {Object|Undefined} exception The error object. + * @param {object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onUglifyGzip(exception, result) { @@ -656,8 +656,8 @@ * The hybrid callback for simple optimizations. * * @private - * @param {Object|Undefined} exception The error object. - * @param {String} result The resulting minified source. + * @param {object} [exception] The error object. + * @param {string} result The resulting minified source. */ function onSimpleHybrid(exception, result) { if (exception) { @@ -672,7 +672,7 @@ * The hybrid `gzip` callback for simple optimizations. * * @private - * @param {Object|Undefined} exception The error object. + * @param {object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onSimpleHybridGzip(exception, result) { @@ -697,8 +697,8 @@ * The hybrid callback for advanced optimizations. * * @private - * @param {Object|Undefined} exception The error object. - * @param {String} result The resulting minified source. + * @param {object} [exception] The error object. + * @param {string} result The resulting minified source. */ function onAdvancedHybrid(exception, result) { if (exception) { @@ -713,7 +713,7 @@ * The hybrid `gzip` callback for advanced optimizations. * * @private - * @param {Object|Undefined} exception The error object. + * @param {object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onAdvancedHybridGzip(exception, result) { diff --git a/build/post-compile.js b/build/post-compile.js index ce1df0058..b33fca174 100644 --- a/build/post-compile.js +++ b/build/post-compile.js @@ -20,8 +20,8 @@ * Post-process a given minified Lo-Dash `source`, preparing it for * deployment. * - * @param {String} source The source to process. - * @returns {String} Returns the processed source. + * @param {string} source The source to process. + * @returns {string} Returns the processed source. */ function postprocess(source) { // correct overly aggressive Closure Compiler advanced optimization diff --git a/build/pre-compile.js b/build/pre-compile.js index f01e3b3f0..a723632a1 100644 --- a/build/pre-compile.js +++ b/build/pre-compile.js @@ -273,9 +273,9 @@ /** * Pre-process a given Lo-Dash `source`, preparing it for minification. * - * @param {String} [source=''] The source to process. - * @param {Object} [options={}] The options object. - * @returns {String} Returns the processed source. + * @param {string} [source=''] The source to process. + * @param {object} [options={}] The options object. + * @returns {string} Returns the processed source. */ function preprocess(source, options) { source || (source = ''); diff --git a/build/util.js b/build/util.js index 0ea45c3cd..7b4974203 100755 --- a/build/util.js +++ b/build/util.js @@ -18,7 +18,7 @@ * The path separator. * * @memberOf util.path - * @type String + * @type string */ var sep = path.sep || (isWindows ? '\\' : '/'); @@ -26,7 +26,7 @@ * The escaped path separator used for inclusion in RegExp strings. * * @memberOf util.path - * @type String + * @type string */ var sepEscaped = sep.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); @@ -40,8 +40,8 @@ * directories and making parent directories as needed. * * @memberOf util.fs - * @param {String} dirname The path of the directory. - * @param {Number|String} [mode='0777'] The permission mode. + * @param {string} dirname The path of the directory. + * @param {(number|string)} [mode='0777'] The permission mode. */ function mkdirpSync(dirname, mode) { // ensure relative paths are prefixed with `./` @@ -64,7 +64,7 @@ /** * The utility object. * - * @type Object + * @type object */ var util = { @@ -72,7 +72,7 @@ * The file system object. * * @memberOf util - * @type Object + * @type object */ 'fs': _.defaults(_.cloneDeep(fs), { 'existsSync': fs.existsSync || path.existsSync, @@ -83,7 +83,7 @@ * The path object. * * @memberOf util - * @type Object + * @type object */ 'path': _.defaults(_.cloneDeep(path), { 'sep': sep, diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index adab74baa..4c2e3cac2 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -148,10 +148,10 @@ * or `fromIndex` constraints. * * @private - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. */ function baseIndexOf(array, value, fromIndex) { var index = (fromIndex || 0) - 1, @@ -170,9 +170,9 @@ * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. * * @private - * @param {Object} cache The cache object to inspect. - * @param {Mixed} value The value to search for. - * @returns {Number} Returns `0` if `value` is found, else `-1`. + * @param {object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. */ function cacheIndexOf(cache, value) { var type = typeof value; @@ -196,7 +196,7 @@ * Adds a given `value` to the corresponding cache object. * * @private - * @param {Mixed} value The value to add to the cache. + * @param {*} value The value to add to the cache. */ function cachePush(value) { var cache = this.cache, @@ -224,8 +224,8 @@ * collection is a string value. * * @private - * @param {String} value The character to inspect. - * @returns {Number} Returns the code unit of given character. + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. */ function charAtCallback(value) { return value.charCodeAt(0); @@ -236,9 +236,9 @@ * them in ascending order. * * @private - * @param {Object} a The object to compare to `b`. - * @param {Object} b The object to compare to `a`. - * @returns {Number} Returns the sort order indicator of `1` or `-1`. + * @param {object} a The object to compare to `b`. + * @param {object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. */ function compareAscending(a, b) { var ac = a.criteria, @@ -265,8 +265,8 @@ * Creates a cache object to optimize linear searches of large arrays. * * @private - * @param {Array} [array=[]] The array to search. - * @returns {Null|Object} Returns the cache object or `null` if caching should not be used. + * @param {array} [array=[]] The array to search. + * @returns {(null|object)} Returns the cache object or `null` if caching should not be used. */ function createCache(array) { var index = -1, @@ -296,8 +296,8 @@ * string literals. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeStringChar(match) { return '\\' + stringEscapes[match]; @@ -307,7 +307,7 @@ * Gets an array from the array pool or creates a new one if the pool is empty. * * @private - * @returns {Array} The array from the pool. + * @returns {array} The array from the pool. */ function getArray() { return arrayPool.pop() || []; @@ -317,7 +317,7 @@ * Gets an object from the object pool or creates a new one if the pool is empty. * * @private - * @returns {Object} The object from the pool. + * @returns {object} The object from the pool. */ function getObject() { return objectPool.pop() || { @@ -356,8 +356,8 @@ * Checks if `value` is a DOM node in IE < 9. * * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM node, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. */ function isNode(value) { // IE < 9 presents DOM nodes as `Object` objects except they have `toString` @@ -378,7 +378,7 @@ * Releases the given array back to the array pool. * * @private - * @param {Array} [array] The array to release. + * @param {array} [array] The array to release. */ function releaseArray(array) { array.length = 0; @@ -391,7 +391,7 @@ * Releases the given object back to the object pool. * * @private - * @param {Object} [object] The object to release. + * @param {object} [object] The object to release. */ function releaseObject(object) { var cache = object.cache; @@ -412,10 +412,10 @@ * in IE < 9 and to ensure dense arrays are returned. * * @private - * @param {Array|Object|String} collection The collection to slice. - * @param {Number} start The start index. - * @param {Number} end The end index. - * @returns {Array} Returns the new array. + * @param {(array|object|string)} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {array} Returns the new array. */ function slice(array, start, end) { start || (start = 0); @@ -440,8 +440,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} [context=root] The context object. - * @returns {Function} Returns the `lodash` function. + * @param {object} [context=root] The context object. + * @returns {function} Returns the `lodash` function. */ function runInContext(context) { // Avoid issues with some ES3 environments that attempt to use values, named @@ -589,8 +589,8 @@ * @name _ * @constructor * @category Chaining - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -623,9 +623,9 @@ * A fast path for creating `lodash` wrapper objects. * * @private - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @param {Boolean} chainAll A flag to enable chaining for all methods - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {object} Returns a `lodash` instance. */ function lodashWrapper(value, chainAll) { this.__chain__ = !!chainAll; @@ -639,7 +639,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ var support = lodash.support = {}; @@ -656,7 +656,7 @@ * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); @@ -664,7 +664,7 @@ * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.argsClass = toString.call(arguments) == argsClass; @@ -673,7 +673,7 @@ * enumerable by default. (IE < 9, Safari < 5.1) * * @memberOf _.support - * @type Boolean + * @type boolean */ support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); @@ -686,7 +686,7 @@ * value to `true`. * * @memberOf _.support - * @type Boolean + * @type boolean */ support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); @@ -694,7 +694,7 @@ * Detect if `Function#bind` exists and is inferred to be fast (all but V8). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.fastBind = nativeBind && !isV8; @@ -702,7 +702,7 @@ * Detect if own properties are iterated after inherited properties (all but IE < 9). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.ownLast = props[0] != 'x'; @@ -711,7 +711,7 @@ * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.nonEnumArgs = prop != 0; @@ -722,7 +722,7 @@ * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.nonEnumShadows = !/valueOf/.test(props); @@ -736,7 +736,7 @@ * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. * * @memberOf _.support - * @type Boolean + * @type boolean */ support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); @@ -747,7 +747,7 @@ * characters by index on string literals. * * @memberOf _.support - * @type Boolean + * @type boolean */ support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; @@ -757,7 +757,7 @@ * a string without a `toString` function. * * @memberOf _.support - * @type Boolean + * @type boolean */ try { support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); @@ -773,7 +773,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ lodash.templateSettings = { @@ -781,7 +781,7 @@ * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'escape': /<%-([\s\S]+?)%>/g, @@ -789,7 +789,7 @@ * Used to detect code to be evaluated. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'evaluate': /<%([\s\S]+?)%>/g, @@ -797,7 +797,7 @@ * Used to detect `data` property values to inject. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'interpolate': reInterpolate, @@ -805,7 +805,7 @@ * Used to reference the data object in the template text. * * @memberOf _.templateSettings - * @type String + * @type string */ 'variable': '', @@ -813,7 +813,7 @@ * Used to import variables into the compiled template. * * @memberOf _.templateSettings - * @type Object + * @type object */ 'imports': { @@ -821,7 +821,7 @@ * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports - * @type Function + * @type function */ '_': lodash } @@ -833,8 +833,8 @@ * The template used to create iterator functions. * * @private - * @param {Object} data The data object used to populate the text. - * @returns {String} Returns the interpolated text. + * @param {object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. */ var iteratorTemplate = function(obj) { @@ -934,12 +934,12 @@ * for `thisArg` binding. * * @private - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {Mixed} Returns the cloned `value`. + * @param {*} value The value to clone. + * @param {boolean} [deep=false] A flag to indicate a deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {array} [stackA=[]] Tracks traversed source objects. + * @param {array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned `value`. */ function baseClone(value, deep, callback, stackA, stackB) { var result = value; @@ -1024,10 +1024,10 @@ * "_.pluck" or "_.where" style callbacks. * * @private - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. */ function baseCreateCallback(func, thisArg, argCount) { if (typeof func != 'function') { @@ -1059,11 +1059,11 @@ * shorthands or `thisArg` binding. * * @private - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. - * @param {Number} [fromIndex=0] The index to start from. - * @returns {Array} Returns a new flattened array. + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -1087,13 +1087,13 @@ * that allows partial "_.where" style comparisons. * * @private - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `a` objects. - * @param {Array} [stackB=[]] Tracks traversed `b` objects. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {array} [stackA=[]] Tracks traversed `a` objects. + * @param {array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { // used to indicate that when comparing objects, `a` has at least the properties of `b` @@ -1256,11 +1256,11 @@ * for `thisArg` binding. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [callback] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. + * @param {object} object The destination object. + * @param {object} source The source object. + * @param {function} [callback] The function to customize merging properties. + * @param {array} [stackA=[]] Tracks traversed source objects. + * @param {array} [stackB=[]] Associates values with source counterparts. */ function baseMerge(object, source, callback, stackA, stackB) { (isArray(source) ? forEach : forOwn)(source, function(source, key) { @@ -1321,10 +1321,10 @@ * or `thisArg` binding. * * @private - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function} [callback] The function called per iteration. - * @returns {Array} Returns a duplicate-value-free array. + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {function} [callback] The function called per iteration. + * @returns {array} Returns a duplicate-value-free array. */ function baseUniq(array, isSorted, callback) { var index = -1, @@ -1375,8 +1375,8 @@ * of the composed object. * * @private - * @param {Function} setter The setter function. - * @returns {Function} Returns the new aggregator function. + * @param {function} setter The setter function. + * @returns {function} Returns the new aggregator function. */ function createAggregator(setter) { return function(collection, callback, thisArg) { @@ -1405,8 +1405,8 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {Function|String} func The function or method name to reference. - * @param {Number} bitmask The bitmask of method flags to compose. + * @param {(function|string)} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -1414,13 +1414,13 @@ * 8 - `_.curry` (bound) * 16 - `_.partial` * 32 - `_.partialRight` - * @param {Array} [partialArgs] An array of arguments to prepend to those + * @param {array} [partialArgs] An array of arguments to prepend to those * provided to the new function. - * @param {Array} [partialRightArgs] An array of arguments to append to those + * @param {array} [partialRightArgs] An array of arguments to append to those * provided to the new function. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Number} [arity] The arity of `func`. - * @returns {Function} Returns the new bound function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {function} Returns the new bound function. */ function createBound(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { var isBind = bitmask & 1, @@ -1493,7 +1493,7 @@ * Creates compiled iteration functions. * * @private - * @param {Object} [options1, options2, ...] The compile options object(s). + * @param {...object} [options] The compile options object(s). * array - A string of code to determine if the iterable is an array or array-like. * useHas - A boolean to specify using `hasOwnProperty` checks in the object loop. * keys - A reference to `_.keys` for use in own property iteration. @@ -1501,7 +1501,7 @@ * top - A string of code to execute before the iteration branches. * loop - A string of code to execute in the object loop. * bottom - A string of code to execute after the iteration branches. - * @returns {Function} Returns the compiled function. + * @returns {function} Returns the compiled function. */ function createIterator() { var data = getObject(); @@ -1545,8 +1545,8 @@ * Creates a new object with the specified `prototype`. * * @private - * @param {Object} prototype The prototype object. - * @returns {Object} Returns the new object. + * @param {object} prototype The prototype object. + * @returns {object} Returns the new object. */ function createObject(prototype) { return isObject(prototype) ? nativeCreate(prototype) : {}; @@ -1567,8 +1567,8 @@ * Used by `escape` to convert characters to HTML entities. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeHtmlChar(match) { return htmlEscapes[match]; @@ -1580,7 +1580,7 @@ * the `baseIndexOf` function. * * @private - * @returns {Function} Returns the "indexOf" function. + * @returns {function} Returns the "indexOf" function. */ function getIndexOf() { var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; @@ -1591,8 +1591,8 @@ * Sets `this` binding data on a given function. * * @private - * @param {Function} func The function to set data on. - * @param {Mixed} value The value to set. + * @param {function} func The function to set data on. + * @param {*} value The value to set. */ var setBindData = !defineProperty ? noop : function(func, value) { var descriptor = getObject(); @@ -1608,8 +1608,8 @@ * there are no `Object.prototype` extensions. * * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. */ function shimIsPlainObject(value) { var ctor, @@ -1645,8 +1645,8 @@ * Used by `unescape` to convert HTML entities to characters. * * @private - * @param {String} match The matched character to unescape. - * @returns {String} Returns the unescaped character. + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. */ function unescapeHtmlChar(match) { return htmlUnescapes[match]; @@ -1660,8 +1660,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. * @example * * (function() { return _.isArguments(arguments); })(1, 2, 3); @@ -1685,10 +1685,10 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an array, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. * @example * * (function() { return _.isArray(arguments); })(); @@ -1706,9 +1706,9 @@ * given object's own enumerable property names. * * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @type function + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. */ var shimKeys = createIterator({ 'args': 'object', @@ -1723,8 +1723,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. * @example * * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); @@ -1802,11 +1802,11 @@ * iteration early by explicitly returning `false`. * * @private - * @type Function - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @type function + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. */ var baseEach = createIterator(eachIteratorOptions); @@ -1821,14 +1821,14 @@ * * @static * @memberOf _ - * @type Function + * @type function * @alias extend * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize assigning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param {function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -1865,11 +1865,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the cloned `value`. + * @param {*} value The value to clone. + * @param {boolean} [deep=false] A flag to indicate a deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned `value`. * @example * * var stooges = [ @@ -1920,10 +1920,10 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the deep cloned `value`. + * @param {*} value The value to deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned `value`. * @example * * var stooges = [ @@ -1958,13 +1958,13 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param- {object} [guard] Allows working with `_.reduce` without using its * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. + * @returns {object} Returns the destination object. * @example * * var food = { 'name': 'apple' }; @@ -1980,12 +1980,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to search. - * @param {Function|Object|String} [callback=identity] The function called per + * @param {object} object The object to search. + * @param {(function|object|string)} [callback=identity] The function called per * iteration. If a property name or object is provided it will be used to * create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the key of the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the key of the found element, else `undefined`. * @example * * _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { @@ -2012,12 +2012,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to search. - * @param {Function|Object|String} [callback=identity] The function called per + * @param {object} object The object to search. + * @param {(function|object|string)} [callback=identity] The function called per * iteration. If a property name or object is provided it will be used to * create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the key of the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the key of the found element, else `undefined`. * @example * * _.findLastKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { @@ -2045,12 +2045,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * function Dog(name) { @@ -2077,10 +2077,10 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * function Dog(name) { @@ -2121,12 +2121,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2143,10 +2143,10 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2176,8 +2176,8 @@ * @memberOf _ * @alias methods * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names that have function values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names that have function values. * @example * * _.functions(_); @@ -2200,9 +2200,9 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to check. - * @param {String} property The property to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. + * @param {object} object The object to check. + * @param {string} property The property to check for. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. * @example * * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); @@ -2218,8 +2218,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to invert. - * @returns {Object} Returns the created inverted object. + * @param {object} object The object to invert. + * @returns {object} Returns the created inverted object. * @example * * _.invert({ 'first': 'moe', 'second': 'larry' }); @@ -2244,8 +2244,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. * @example * * _.isBoolean(null); @@ -2261,8 +2261,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a date, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. * @example * * _.isDate(new Date); @@ -2278,8 +2278,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -2297,8 +2297,8 @@ * @static * @memberOf _ * @category Objects - * @param {Array|Object|String} value The value to inspect. - * @returns {Boolean} Returns `true` if the `value` is empty, else `false`. + * @param {(array|object|string)} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * * _.isEmpty([1, 2, 3]); @@ -2339,11 +2339,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var moe = { 'name': 'moe', 'age': 40 }; @@ -2380,8 +2380,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is finite, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. * @example * * _.isFinite(-101); @@ -2409,8 +2409,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a function, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -2433,8 +2433,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an object, else `false`. * @example * * _.isObject({}); @@ -2463,8 +2463,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); @@ -2491,8 +2491,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `null`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. * @example * * _.isNull(null); @@ -2513,8 +2513,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a number, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. * @example * * _.isNumber(8.4 * 5); @@ -2530,8 +2530,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Stooge(name, age) { @@ -2566,8 +2566,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. * @example * * _.isRegExp(/moe/); @@ -2583,8 +2583,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a string, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. * @example * * _.isString('moe'); @@ -2600,8 +2600,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); @@ -2623,11 +2623,11 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize merging properties. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param {function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the destination object. * @example * * var names = { @@ -2703,11 +2703,11 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object without the omitted properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object without the omitted properties. * @example * * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); @@ -2746,8 +2746,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns new array of key-value pairs. + * @param {object} object The object to inspect. + * @returns {array} Returns new array of key-value pairs. * @example * * _.pairs({ 'moe': 30, 'larry': 40 }); @@ -2777,12 +2777,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Array|Function|String} callback|[prop1, prop2, ...] The function - * called per iteration or property names to pick, specified as individual - * property names or arrays of property names. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object composed of the picked properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object composed of the picked properties. * @example * * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); @@ -2828,11 +2828,11 @@ * @static * @memberOf _ * @category Objects - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] The custom accumulator value. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { @@ -2874,8 +2874,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property values. * @example * * _.values({ 'one': 1, 'two': 2, 'three': 3 }); @@ -2903,10 +2903,10 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Array|Number|String} [index1, index2, ...] The indexes of `collection` + * @param {(array|object|string)} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` * to retrieve, specified as individual indexes or arrays of indexes. - * @returns {Array} Returns a new array of elements corresponding to the + * @returns {array} Returns a new array of elements corresponding to the * provided indexes. * @example * @@ -2941,10 +2941,10 @@ * @memberOf _ * @alias include * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Mixed} target The value to check for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Boolean} Returns `true` if the `target` element is found, else `false`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. * @example * * _.contains([1, 2, 3], 1); @@ -2998,12 +2998,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3035,12 +3035,12 @@ * @memberOf _ * @alias all * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if all elements passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, * else `false`. * @example * @@ -3097,12 +3097,12 @@ * @memberOf _ * @alias select * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that passed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that passed the callback check. * @example * * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -3161,12 +3161,12 @@ * @memberOf _ * @alias detect, findWhere * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. * @example * * _.find([1, 2, 3, 4], function(num) { @@ -3220,12 +3220,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. * @example * * _.findLast([1, 2, 3, 4], function(num) { @@ -3255,10 +3255,10 @@ * @memberOf _ * @alias each * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); @@ -3291,10 +3291,10 @@ * @memberOf _ * @alias eachRight * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); @@ -3343,12 +3343,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3382,12 +3382,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * var keys = [ @@ -3417,11 +3417,11 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} methodName The name of the method to invoke or + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|string)} methodName The name of the method to invoke or * the function invoked per iteration. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} Returns a new array of the results of each invoked method. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {array} Returns a new array of the results of each invoked method. * @example * * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); @@ -3459,12 +3459,12 @@ * @memberOf _ * @alias collect * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of the results of each `callback` execution. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -3516,12 +3516,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the maximum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. * @example * * _.max([4, 2, 8, 6]); @@ -3585,12 +3585,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the minimum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. * @example * * _.min([4, 2, 8, 6]); @@ -3643,11 +3643,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {String} property The property to pluck. - * @returns {Array} Returns a new array of property values. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {string} property The property to pluck. + * @returns {array} Returns a new array of property values. * @example * * var stooges = [ @@ -3672,11 +3672,11 @@ * @memberOf _ * @alias foldl, inject * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var sum = _.reduce([1, 2, 3], function(sum, num) { @@ -3722,11 +3722,11 @@ * @memberOf _ * @alias foldr * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var list = [[0, 1], [2, 3], [4, 5]]; @@ -3758,12 +3758,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that failed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that failed the callback check. * @example * * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -3795,11 +3795,11 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to sample. - * @param {Number} [n] The number of elements to sample. - * @param- {Object} [guard] Allows working with functions, like `_.map`, + * @param {(array|object|string)} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {object} [guard] Allows working with functions, like `_.map`, * without using their `key` and `object` arguments as sources. - * @returns {Array} Returns the random sample(s) of `collection`. + * @returns {array} Returns the random sample(s) of `collection`. * @example * * _.sample([1, 2, 3, 4]); @@ -3827,8 +3827,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to shuffle. - * @returns {Array} Returns a new shuffled collection. + * @param {(array|object|string)} collection The collection to shuffle. + * @returns {array} Returns a new shuffled collection. * @example * * _.shuffle([1, 2, 3, 4, 5, 6]); @@ -3854,8 +3854,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to inspect. - * @returns {Number} Returns `collection.length` or number of own enumerable properties. + * @param {(array|object|string)} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * * _.size([1, 2]); @@ -3889,12 +3889,12 @@ * @memberOf _ * @alias any * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if any element passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, * else `false`. * @example * @@ -3952,12 +3952,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of sorted elements. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -3999,8 +3999,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to convert. - * @returns {Array} Returns the new converted array. + * @param {(array|object|string)} collection The collection to convert. + * @returns {array} Returns the new converted array. * @example * * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); @@ -4022,11 +4022,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Array} Returns a new array of elements that have the given `properties`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {object} properties The object of property values to filter by. + * @returns {array} Returns a new array of elements that have the given `properties`. * @example * * var stooges = [ @@ -4051,8 +4051,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to compact. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to compact. + * @returns {array} Returns a new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); @@ -4079,9 +4079,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to process. - * @param {Array} [array1, array2, ...] The arrays of values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to process. + * @param {...array} [array] The arrays of values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); @@ -4124,12 +4124,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to search. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the index of the found element, else `-1`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the index of the found element, else `-1`. * @example * * _.findIndex(['apple', 'banana', 'beet'], function(food) { @@ -4157,12 +4157,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to search. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the index of the found element, else `-1`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the index of the found element, else `-1`. * @example * * _.findLastIndex(['apple', 'banana', 'beet'], function(food) { @@ -4198,13 +4198,13 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the first element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. * @example * * _.first([1, 2, 3]); @@ -4275,13 +4275,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new flattened array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -4320,11 +4320,11 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {(boolean|number)} [fromIndex=0] The index to search from or `true` * to perform a binary search on a sorted array. - * @returns {Number} Returns the index of the matched value or `-1`. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.indexOf([1, 2, 3, 1, 2, 3], 2); @@ -4363,13 +4363,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -4428,8 +4428,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -4496,13 +4496,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the last element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. * @example * * _.last([1, 2, 3]); @@ -4564,10 +4564,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=array.length-1] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); @@ -4596,9 +4596,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to modify. - * @param {Mixed} [value1, value2, ...] The values to remove. - * @returns {Array} Returns `array`. + * @param {array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {array} Returns `array`. * @example * * var array = [1, 2, 3, 1, 2, 3]; @@ -4633,10 +4633,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Number} [start=0] The start of the range. - * @param {Number} end The end of the range. - * @param {Number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns a new range array. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {array} Returns a new range array. * @example * * _.range(10); @@ -4693,12 +4693,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to modify. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to modify. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of removed elements. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of removed elements. * @example * * var array = [1, 2, 3, 4, 5, 6]; @@ -4745,13 +4745,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -4817,13 +4817,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to inspect. - * @param {Mixed} value The value to evaluate. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Number} Returns the index at which `value` should be inserted + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * @@ -4872,8 +4872,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -4902,13 +4902,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a duplicate-value-free array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -4947,9 +4947,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to filter. - * @param {Mixed} [value1, value2, ...] The values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -4968,8 +4968,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of grouped elements. + * @param {...array} [array] Arrays to process. + * @returns {array} Returns a new array of grouped elements. * @example * * _.zip(['moe', 'larry'], [30, 40], [true, false]); @@ -4996,9 +4996,9 @@ * @memberOf _ * @alias object * @category Arrays - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. - * @returns {Object} Returns an object composed of the given keys and + * @param {array} keys The array of keys. + * @param {array} [values=[]] The array of values. + * @returns {object} Returns an object composed of the given keys and * corresponding values. * @example * @@ -5030,10 +5030,10 @@ * @static * @memberOf _ * @category Functions - * @param {Number} n The number of times the function must be called before + * @param {number} n The number of times the function must be called before * `func` is executed. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var renderNotes = _.after(notes.length, render); @@ -5061,10 +5061,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to bind. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @param {function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -5088,10 +5088,10 @@ * @static * @memberOf _ * @category Functions - * @param {Object} object The object to bind and assign the bound methods to. - * @param {String} [methodName1, methodName2, ...] The object method names to + * @param {object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to * bind, specified as individual method names or arrays of method names. - * @returns {Object} Returns `object`. + * @returns {object} Returns `object`. * @example * * var view = { @@ -5125,10 +5125,10 @@ * @static * @memberOf _ * @category Functions - * @param {Object} object The object the method belongs to. - * @param {String} key The key of the method. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @param {object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new bound function. * @example * * var object = { @@ -5162,8 +5162,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} [func1, func2, ...] Functions to compose. - * @returns {Function} Returns the new composed function. + * @param {...function} [func] Functions to compose. + * @returns {function} Returns the new composed function. * @example * * var realNameMap = { @@ -5212,10 +5212,10 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. * @example * * var stooges = [ @@ -5281,9 +5281,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to curry. - * @param {Number} [arity=func.length] The arity of `func`. - * @returns {Function} Returns the new curried function. + * @param {function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {function} Returns the new curried function. * @example * * var curried = _.curry(function(a, b, c) { @@ -5318,13 +5318,13 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to debounce. - * @param {Number} wait The number of milliseconds to delay. - * @param {Object} options The options object. + * @param {function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {object} options The options object. * [leading=false] A boolean to specify execution on the leading edge of the timeout. * [maxWait] The maximum time `func` is allowed to be delayed before it's called. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. + * @returns {function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -5438,9 +5438,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to defer. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * _.defer(function() { console.log('deferred'); }); @@ -5470,10 +5470,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to delay. - * @param {Number} wait The number of milliseconds to delay execution. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * var log = _.bind(console.log, console); @@ -5499,9 +5499,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] A function used to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @param {function} func The function to have its output memoized. + * @param {function} [resolver] A function used to resolve the cache key. + * @returns {function} Returns the new memoizing function. * @example * * var fibonacci = _.memoize(function(n) { @@ -5546,8 +5546,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var initialize = _.once(createApplication); @@ -5583,9 +5583,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @param {function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -5604,9 +5604,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @param {function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new partially applied function. * @example * * var defaultsDeep = _.partialRight(_.merge, _.defaults); @@ -5642,12 +5642,12 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to throttle. - * @param {Number} wait The number of milliseconds to throttle executions to. - * @param {Object} options The options object. + * @param {function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {object} options The options object. * [leading=true] A boolean to specify execution on the leading edge of the timeout. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. + * @returns {function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -5691,9 +5691,9 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. + * @param {*} value The value to wrap. + * @param {function} wrapper The wrapper function. + * @returns {function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -5723,8 +5723,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to escape. - * @returns {String} Returns the escaped string. + * @param {string} string The string to escape. + * @returns {string} Returns the escaped string. * @example * * _.escape('Moe, Larry & Curly'); @@ -5740,8 +5740,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Mixed} value Any value. - * @returns {Mixed} Returns `value`. + * @param {*} value Any value. + * @returns {*} Returns `value`. * @example * * var moe = { 'name': 'moe' }; @@ -5759,8 +5759,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object of function properties to add to `lodash`. - * @param {Object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. * @example * * _.mixin({ @@ -5808,7 +5808,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {Function} Returns the `lodash` function. + * @returns {function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -5829,9 +5829,9 @@ * @static * @memberOf _ * @category Utilities - * @param {String} value The value to parse. - * @param {Number} [radix] The radix used to interpret the value to parse. - * @returns {Number} Returns the new integer value. + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. * @example * * _.parseInt('08'); @@ -5850,9 +5850,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} [min=0] The minimum possible value. - * @param {Number} [max=1] The maximum possible value. - * @returns {Number} Returns a random number. + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @returns {number} Returns a random number. * @example * * _.random(0, 5); @@ -5887,9 +5887,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object to inspect. - * @param {String} property The property to get the value of. - * @returns {Mixed} Returns the resolved value. + * @param {object} object The object to inspect. + * @param {string} property The property to get the value of. + * @returns {*} Returns the resolved value. * @example * * var object = { @@ -5926,16 +5926,16 @@ * @static * @memberOf _ * @category Utilities - * @param {String} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} options The options object. + * @param {string} text The template text. + * @param {object} data The data object used to populate the text. + * @param {object} options The options object. * escape - The "escape" delimiter regexp. * evaluate - The "evaluate" delimiter regexp. * imports - An object of properties to import into the compiled template as local variables. * interpolate - The "interpolate" delimiter regexp. * sourceURL - The sourceURL of the template's compiled source. * variable - The data object variable name. - * @returns {Function|String} Returns a compiled function when no `data` object + * @returns {(function|string)} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -6106,10 +6106,10 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} n The number of times to execute the callback. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns an array of the results of each `callback` execution. + * @param {number} n The number of times to execute the callback. + * @param {function} callback The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -6141,8 +6141,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to unescape. - * @returns {String} Returns the unescaped string. + * @param {string} string The string to unescape. + * @returns {string} Returns the unescaped string. * @example * * _.unescape('Moe, Larry & Curly'); @@ -6158,8 +6158,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} [prefix] The value to prefix the ID with. - * @returns {String} Returns the unique ID. + * @param {string} [prefix] The value to prefix the ID with. + * @returns {string} Returns the unique ID. * @example * * _.uniqueId('contact_'); @@ -6181,8 +6181,8 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to wrap. - * @returns {Object} Returns the wrapper object. + * @param {*} value The value to wrap. + * @returns {object} Returns the wrapper object. * @example * * var stooges = [ @@ -6212,9 +6212,9 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {Mixed} Returns `value`. + * @param {*} value The value to provide to `interceptor`. + * @param {function} interceptor The function to invoke. + * @returns {*} Returns `value`. * @example * * _([1, 2, 3, 4]) @@ -6236,7 +6236,7 @@ * @name chain * @memberOf _ * @category Chaining - * @returns {Mixed} Returns the wrapper object. + * @returns {*} Returns the wrapper object. * @example * * var sum = _([1, 2, 3]) @@ -6256,7 +6256,7 @@ * @name toString * @memberOf _ * @category Chaining - * @returns {String} Returns the string result. + * @returns {string} Returns the string result. * @example * * _([1, 2, 3]).toString(); @@ -6273,7 +6273,7 @@ * @memberOf _ * @alias value * @category Chaining - * @returns {Mixed} Returns the wrapped value. + * @returns {*} Returns the wrapped value. * @example * * _([1, 2, 3]).valueOf(); @@ -6475,7 +6475,7 @@ * * @static * @memberOf _ - * @type String + * @type string */ lodash.VERSION = '1.3.1'; diff --git a/dist/lodash.js b/dist/lodash.js index 5f3333966..e128e1ae5 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -141,10 +141,10 @@ * or `fromIndex` constraints. * * @private - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. */ function baseIndexOf(array, value, fromIndex) { var index = (fromIndex || 0) - 1, @@ -163,9 +163,9 @@ * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. * * @private - * @param {Object} cache The cache object to inspect. - * @param {Mixed} value The value to search for. - * @returns {Number} Returns `0` if `value` is found, else `-1`. + * @param {object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. */ function cacheIndexOf(cache, value) { var type = typeof value; @@ -189,7 +189,7 @@ * Adds a given `value` to the corresponding cache object. * * @private - * @param {Mixed} value The value to add to the cache. + * @param {*} value The value to add to the cache. */ function cachePush(value) { var cache = this.cache, @@ -217,8 +217,8 @@ * collection is a string value. * * @private - * @param {String} value The character to inspect. - * @returns {Number} Returns the code unit of given character. + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. */ function charAtCallback(value) { return value.charCodeAt(0); @@ -229,9 +229,9 @@ * them in ascending order. * * @private - * @param {Object} a The object to compare to `b`. - * @param {Object} b The object to compare to `a`. - * @returns {Number} Returns the sort order indicator of `1` or `-1`. + * @param {object} a The object to compare to `b`. + * @param {object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. */ function compareAscending(a, b) { var ac = a.criteria, @@ -258,8 +258,8 @@ * Creates a cache object to optimize linear searches of large arrays. * * @private - * @param {Array} [array=[]] The array to search. - * @returns {Null|Object} Returns the cache object or `null` if caching should not be used. + * @param {array} [array=[]] The array to search. + * @returns {(null|object)} Returns the cache object or `null` if caching should not be used. */ function createCache(array) { var index = -1, @@ -289,8 +289,8 @@ * string literals. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeStringChar(match) { return '\\' + stringEscapes[match]; @@ -300,7 +300,7 @@ * Gets an array from the array pool or creates a new one if the pool is empty. * * @private - * @returns {Array} The array from the pool. + * @returns {array} The array from the pool. */ function getArray() { return arrayPool.pop() || []; @@ -310,7 +310,7 @@ * Gets an object from the object pool or creates a new one if the pool is empty. * * @private - * @returns {Object} The object from the pool. + * @returns {object} The object from the pool. */ function getObject() { return objectPool.pop() || { @@ -349,7 +349,7 @@ * Releases the given array back to the array pool. * * @private - * @param {Array} [array] The array to release. + * @param {array} [array] The array to release. */ function releaseArray(array) { array.length = 0; @@ -362,7 +362,7 @@ * Releases the given object back to the object pool. * * @private - * @param {Object} [object] The object to release. + * @param {object} [object] The object to release. */ function releaseObject(object) { var cache = object.cache; @@ -383,10 +383,10 @@ * in IE < 9 and to ensure dense arrays are returned. * * @private - * @param {Array|Object|String} collection The collection to slice. - * @param {Number} start The start index. - * @param {Number} end The end index. - * @returns {Array} Returns the new array. + * @param {(array|object|string)} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {array} Returns the new array. */ function slice(array, start, end) { start || (start = 0); @@ -411,8 +411,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} [context=root] The context object. - * @returns {Function} Returns the `lodash` function. + * @param {object} [context=root] The context object. + * @returns {function} Returns the `lodash` function. */ function runInContext(context) { // Avoid issues with some ES3 environments that attempt to use values, named @@ -539,8 +539,8 @@ * @name _ * @constructor * @category Chaining - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -573,9 +573,9 @@ * A fast path for creating `lodash` wrapper objects. * * @private - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @param {Boolean} chainAll A flag to enable chaining for all methods - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {object} Returns a `lodash` instance. */ function lodashWrapper(value, chainAll) { this.__chain__ = !!chainAll; @@ -589,7 +589,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ var support = lodash.support = {}; @@ -597,7 +597,7 @@ * Detect if `Function#bind` exists and is inferred to be fast (all but V8). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.fastBind = nativeBind && !isV8; @@ -608,7 +608,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ lodash.templateSettings = { @@ -616,7 +616,7 @@ * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'escape': /<%-([\s\S]+?)%>/g, @@ -624,7 +624,7 @@ * Used to detect code to be evaluated. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'evaluate': /<%([\s\S]+?)%>/g, @@ -632,7 +632,7 @@ * Used to detect `data` property values to inject. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'interpolate': reInterpolate, @@ -640,7 +640,7 @@ * Used to reference the data object in the template text. * * @memberOf _.templateSettings - * @type String + * @type string */ 'variable': '', @@ -648,7 +648,7 @@ * Used to import variables into the compiled template. * * @memberOf _.templateSettings - * @type Object + * @type object */ 'imports': { @@ -656,7 +656,7 @@ * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports - * @type Function + * @type function */ '_': lodash } @@ -669,12 +669,12 @@ * for `thisArg` binding. * * @private - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {Mixed} Returns the cloned `value`. + * @param {*} value The value to clone. + * @param {boolean} [deep=false] A flag to indicate a deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {array} [stackA=[]] Tracks traversed source objects. + * @param {array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned `value`. */ function baseClone(value, deep, callback, stackA, stackB) { var result = value; @@ -759,10 +759,10 @@ * "_.pluck" or "_.where" style callbacks. * * @private - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. */ function baseCreateCallback(func, thisArg, argCount) { if (typeof func != 'function') { @@ -804,11 +804,11 @@ * shorthands or `thisArg` binding. * * @private - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. - * @param {Number} [fromIndex=0] The index to start from. - * @returns {Array} Returns a new flattened array. + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -832,13 +832,13 @@ * that allows partial "_.where" style comparisons. * * @private - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `a` objects. - * @param {Array} [stackB=[]] Tracks traversed `b` objects. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {array} [stackA=[]] Tracks traversed `a` objects. + * @param {array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { // used to indicate that when comparing objects, `a` has at least the properties of `b` @@ -1001,11 +1001,11 @@ * for `thisArg` binding. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [callback] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. + * @param {object} object The destination object. + * @param {object} source The source object. + * @param {function} [callback] The function to customize merging properties. + * @param {array} [stackA=[]] Tracks traversed source objects. + * @param {array} [stackB=[]] Associates values with source counterparts. */ function baseMerge(object, source, callback, stackA, stackB) { (isArray(source) ? forEach : forOwn)(source, function(source, key) { @@ -1066,10 +1066,10 @@ * or `thisArg` binding. * * @private - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function} [callback] The function called per iteration. - * @returns {Array} Returns a duplicate-value-free array. + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {function} [callback] The function called per iteration. + * @returns {array} Returns a duplicate-value-free array. */ function baseUniq(array, isSorted, callback) { var index = -1, @@ -1120,8 +1120,8 @@ * of the composed object. * * @private - * @param {Function} setter The setter function. - * @returns {Function} Returns the new aggregator function. + * @param {function} setter The setter function. + * @returns {function} Returns the new aggregator function. */ function createAggregator(setter) { return function(collection, callback, thisArg) { @@ -1150,8 +1150,8 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {Function|String} func The function or method name to reference. - * @param {Number} bitmask The bitmask of method flags to compose. + * @param {(function|string)} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -1159,13 +1159,13 @@ * 8 - `_.curry` (bound) * 16 - `_.partial` * 32 - `_.partialRight` - * @param {Array} [partialArgs] An array of arguments to prepend to those + * @param {array} [partialArgs] An array of arguments to prepend to those * provided to the new function. - * @param {Array} [partialRightArgs] An array of arguments to append to those + * @param {array} [partialRightArgs] An array of arguments to append to those * provided to the new function. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Number} [arity] The arity of `func`. - * @returns {Function} Returns the new bound function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {function} Returns the new bound function. */ function createBound(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { var isBind = bitmask & 1, @@ -1259,8 +1259,8 @@ * Creates a new object with the specified `prototype`. * * @private - * @param {Object} prototype The prototype object. - * @returns {Object} Returns the new object. + * @param {object} prototype The prototype object. + * @returns {object} Returns the new object. */ function createObject(prototype) { return isObject(prototype) ? nativeCreate(prototype) : {}; @@ -1270,8 +1270,8 @@ * Used by `escape` to convert characters to HTML entities. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeHtmlChar(match) { return htmlEscapes[match]; @@ -1283,7 +1283,7 @@ * the `baseIndexOf` function. * * @private - * @returns {Function} Returns the "indexOf" function. + * @returns {function} Returns the "indexOf" function. */ function getIndexOf() { var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; @@ -1294,8 +1294,8 @@ * Sets `this` binding data on a given function. * * @private - * @param {Function} func The function to set data on. - * @param {Mixed} value The value to set. + * @param {function} func The function to set data on. + * @param {*} value The value to set. */ var setBindData = !defineProperty ? noop : function(func, value) { var descriptor = getObject(); @@ -1311,8 +1311,8 @@ * there are no `Object.prototype` extensions. * * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. */ function shimIsPlainObject(value) { var ctor, @@ -1336,8 +1336,8 @@ * Used by `unescape` to convert HTML entities to characters. * * @private - * @param {String} match The matched character to unescape. - * @returns {String} Returns the unescaped character. + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. */ function unescapeHtmlChar(match) { return htmlUnescapes[match]; @@ -1351,8 +1351,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. * @example * * (function() { return _.isArguments(arguments); })(1, 2, 3); @@ -1370,10 +1370,10 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an array, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. * @example * * (function() { return _.isArray(arguments); })(); @@ -1391,9 +1391,9 @@ * given object's own enumerable property names. * * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @type function + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. */ var shimKeys = function(object) { var index, iterable = object, result = []; @@ -1413,8 +1413,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. * @example * * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); @@ -1461,14 +1461,14 @@ * * @static * @memberOf _ - * @type Function + * @type function * @alias extend * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize assigning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param {function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -1519,11 +1519,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the cloned `value`. + * @param {*} value The value to clone. + * @param {boolean} [deep=false] A flag to indicate a deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned `value`. * @example * * var stooges = [ @@ -1574,10 +1574,10 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the deep cloned `value`. + * @param {*} value The value to deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned `value`. * @example * * var stooges = [ @@ -1612,13 +1612,13 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param- {object} [guard] Allows working with `_.reduce` without using its * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. + * @returns {object} Returns the destination object. * @example * * var food = { 'name': 'apple' }; @@ -1654,12 +1654,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to search. - * @param {Function|Object|String} [callback=identity] The function called per + * @param {object} object The object to search. + * @param {(function|object|string)} [callback=identity] The function called per * iteration. If a property name or object is provided it will be used to * create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the key of the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the key of the found element, else `undefined`. * @example * * _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { @@ -1686,12 +1686,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to search. - * @param {Function|Object|String} [callback=identity] The function called per + * @param {object} object The object to search. + * @param {(function|object|string)} [callback=identity] The function called per * iteration. If a property name or object is provided it will be used to * create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the key of the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the key of the found element, else `undefined`. * @example * * _.findLastKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { @@ -1719,12 +1719,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * function Dog(name) { @@ -1758,10 +1758,10 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * function Dog(name) { @@ -1802,12 +1802,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -1838,10 +1838,10 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -1871,8 +1871,8 @@ * @memberOf _ * @alias methods * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names that have function values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names that have function values. * @example * * _.functions(_); @@ -1895,9 +1895,9 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to check. - * @param {String} property The property to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. + * @param {object} object The object to check. + * @param {string} property The property to check for. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. * @example * * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); @@ -1913,8 +1913,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to invert. - * @returns {Object} Returns the created inverted object. + * @param {object} object The object to invert. + * @returns {object} Returns the created inverted object. * @example * * _.invert({ 'first': 'moe', 'second': 'larry' }); @@ -1939,8 +1939,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. * @example * * _.isBoolean(null); @@ -1956,8 +1956,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a date, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. * @example * * _.isDate(new Date); @@ -1973,8 +1973,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -1992,8 +1992,8 @@ * @static * @memberOf _ * @category Objects - * @param {Array|Object|String} value The value to inspect. - * @returns {Boolean} Returns `true` if the `value` is empty, else `false`. + * @param {(array|object|string)} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * * _.isEmpty([1, 2, 3]); @@ -2033,11 +2033,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var moe = { 'name': 'moe', 'age': 40 }; @@ -2074,8 +2074,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is finite, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. * @example * * _.isFinite(-101); @@ -2103,8 +2103,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a function, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -2121,8 +2121,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an object, else `false`. * @example * * _.isObject({}); @@ -2151,8 +2151,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); @@ -2179,8 +2179,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `null`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. * @example * * _.isNull(null); @@ -2201,8 +2201,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a number, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. * @example * * _.isNumber(8.4 * 5); @@ -2218,8 +2218,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Stooge(name, age) { @@ -2254,8 +2254,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. * @example * * _.isRegExp(/moe/); @@ -2271,8 +2271,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a string, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. * @example * * _.isString('moe'); @@ -2288,8 +2288,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); @@ -2311,11 +2311,11 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize merging properties. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param {function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the destination object. * @example * * var names = { @@ -2391,11 +2391,11 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object without the omitted properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object without the omitted properties. * @example * * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); @@ -2434,8 +2434,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns new array of key-value pairs. + * @param {object} object The object to inspect. + * @returns {array} Returns new array of key-value pairs. * @example * * _.pairs({ 'moe': 30, 'larry': 40 }); @@ -2465,12 +2465,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Array|Function|String} callback|[prop1, prop2, ...] The function - * called per iteration or property names to pick, specified as individual - * property names or arrays of property names. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object composed of the picked properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object composed of the picked properties. * @example * * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); @@ -2516,11 +2516,11 @@ * @static * @memberOf _ * @category Objects - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] The custom accumulator value. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { @@ -2562,8 +2562,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property values. * @example * * _.values({ 'one': 1, 'two': 2, 'three': 3 }); @@ -2591,10 +2591,10 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Array|Number|String} [index1, index2, ...] The indexes of `collection` + * @param {(array|object|string)} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` * to retrieve, specified as individual indexes or arrays of indexes. - * @returns {Array} Returns a new array of elements corresponding to the + * @returns {array} Returns a new array of elements corresponding to the * provided indexes. * @example * @@ -2626,10 +2626,10 @@ * @memberOf _ * @alias include * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Mixed} target The value to check for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Boolean} Returns `true` if the `target` element is found, else `false`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. * @example * * _.contains([1, 2, 3], 1); @@ -2683,12 +2683,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -2720,12 +2720,12 @@ * @memberOf _ * @alias all * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if all elements passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, * else `false`. * @example * @@ -2782,12 +2782,12 @@ * @memberOf _ * @alias select * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that passed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that passed the callback check. * @example * * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -2846,12 +2846,12 @@ * @memberOf _ * @alias detect, findWhere * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. * @example * * _.find([1, 2, 3, 4], function(num) { @@ -2905,12 +2905,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. * @example * * _.findLast([1, 2, 3, 4], function(num) { @@ -2940,10 +2940,10 @@ * @memberOf _ * @alias each * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); @@ -2977,10 +2977,10 @@ * @memberOf _ * @alias eachRight * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); @@ -3023,12 +3023,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3062,12 +3062,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * var keys = [ @@ -3097,11 +3097,11 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} methodName The name of the method to invoke or + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|string)} methodName The name of the method to invoke or * the function invoked per iteration. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} Returns a new array of the results of each invoked method. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {array} Returns a new array of the results of each invoked method. * @example * * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); @@ -3139,12 +3139,12 @@ * @memberOf _ * @alias collect * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of the results of each `callback` execution. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -3197,12 +3197,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the maximum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. * @example * * _.max([4, 2, 8, 6]); @@ -3266,12 +3266,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the minimum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. * @example * * _.min([4, 2, 8, 6]); @@ -3324,11 +3324,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {String} property The property to pluck. - * @returns {Array} Returns a new array of property values. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {string} property The property to pluck. + * @returns {array} Returns a new array of property values. * @example * * var stooges = [ @@ -3339,18 +3339,7 @@ * _.pluck(stooges, 'name'); * // => ['moe', 'larry'] */ - function pluck(collection, property) { - var index = -1, - length = collection ? collection.length : 0; - - if (typeof length == 'number') { - var result = Array(length); - while (++index < length) { - result[index] = collection[index][property]; - } - } - return result || map(collection, property); - } + var pluck = map; /** * Reduces a collection to a value which is the accumulated result of running @@ -3364,11 +3353,11 @@ * @memberOf _ * @alias foldl, inject * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var sum = _.reduce([1, 2, 3], function(sum, num) { @@ -3415,11 +3404,11 @@ * @memberOf _ * @alias foldr * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var list = [[0, 1], [2, 3], [4, 5]]; @@ -3451,12 +3440,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that failed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that failed the callback check. * @example * * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -3488,11 +3477,11 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to sample. - * @param {Number} [n] The number of elements to sample. - * @param- {Object} [guard] Allows working with functions, like `_.map`, + * @param {(array|object|string)} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {object} [guard] Allows working with functions, like `_.map`, * without using their `key` and `object` arguments as sources. - * @returns {Array} Returns the random sample(s) of `collection`. + * @returns {array} Returns the random sample(s) of `collection`. * @example * * _.sample([1, 2, 3, 4]); @@ -3520,8 +3509,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to shuffle. - * @returns {Array} Returns a new shuffled collection. + * @param {(array|object|string)} collection The collection to shuffle. + * @returns {array} Returns a new shuffled collection. * @example * * _.shuffle([1, 2, 3, 4, 5, 6]); @@ -3547,8 +3536,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to inspect. - * @returns {Number} Returns `collection.length` or number of own enumerable properties. + * @param {(array|object|string)} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * * _.size([1, 2]); @@ -3582,12 +3571,12 @@ * @memberOf _ * @alias any * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if any element passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, * else `false`. * @example * @@ -3645,12 +3634,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of sorted elements. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -3692,8 +3681,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to convert. - * @returns {Array} Returns the new converted array. + * @param {(array|object|string)} collection The collection to convert. + * @returns {array} Returns the new converted array. * @example * * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); @@ -3713,11 +3702,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Array} Returns a new array of elements that have the given `properties`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {object} properties The object of property values to filter by. + * @returns {array} Returns a new array of elements that have the given `properties`. * @example * * var stooges = [ @@ -3742,8 +3731,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to compact. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to compact. + * @returns {array} Returns a new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); @@ -3770,9 +3759,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to process. - * @param {Array} [array1, array2, ...] The arrays of values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to process. + * @param {...array} [array] The arrays of values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); @@ -3815,12 +3804,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to search. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the index of the found element, else `-1`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the index of the found element, else `-1`. * @example * * _.findIndex(['apple', 'banana', 'beet'], function(food) { @@ -3848,12 +3837,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to search. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the index of the found element, else `-1`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the index of the found element, else `-1`. * @example * * _.findLastIndex(['apple', 'banana', 'beet'], function(food) { @@ -3889,13 +3878,13 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the first element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. * @example * * _.first([1, 2, 3]); @@ -3966,13 +3955,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new flattened array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -4011,11 +4000,11 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {(boolean|number)} [fromIndex=0] The index to search from or `true` * to perform a binary search on a sorted array. - * @returns {Number} Returns the index of the matched value or `-1`. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.indexOf([1, 2, 3, 1, 2, 3], 2); @@ -4054,13 +4043,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -4119,8 +4108,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -4187,13 +4176,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the last element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. * @example * * _.last([1, 2, 3]); @@ -4255,10 +4244,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=array.length-1] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); @@ -4287,9 +4276,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to modify. - * @param {Mixed} [value1, value2, ...] The values to remove. - * @returns {Array} Returns `array`. + * @param {array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {array} Returns `array`. * @example * * var array = [1, 2, 3, 1, 2, 3]; @@ -4324,10 +4313,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Number} [start=0] The start of the range. - * @param {Number} end The end of the range. - * @param {Number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns a new range array. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {array} Returns a new range array. * @example * * _.range(10); @@ -4384,12 +4373,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to modify. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to modify. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of removed elements. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of removed elements. * @example * * var array = [1, 2, 3, 4, 5, 6]; @@ -4436,13 +4425,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -4508,13 +4497,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to inspect. - * @param {Mixed} value The value to evaluate. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Number} Returns the index at which `value` should be inserted + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * @@ -4563,8 +4552,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -4593,13 +4582,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a duplicate-value-free array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -4638,9 +4627,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to filter. - * @param {Mixed} [value1, value2, ...] The values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -4659,8 +4648,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of grouped elements. + * @param {...array} [array] Arrays to process. + * @returns {array} Returns a new array of grouped elements. * @example * * _.zip(['moe', 'larry'], [30, 40], [true, false]); @@ -4687,9 +4676,9 @@ * @memberOf _ * @alias object * @category Arrays - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. - * @returns {Object} Returns an object composed of the given keys and + * @param {array} keys The array of keys. + * @param {array} [values=[]] The array of values. + * @returns {object} Returns an object composed of the given keys and * corresponding values. * @example * @@ -4721,10 +4710,10 @@ * @static * @memberOf _ * @category Functions - * @param {Number} n The number of times the function must be called before + * @param {number} n The number of times the function must be called before * `func` is executed. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var renderNotes = _.after(notes.length, render); @@ -4752,10 +4741,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to bind. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @param {function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -4779,10 +4768,10 @@ * @static * @memberOf _ * @category Functions - * @param {Object} object The object to bind and assign the bound methods to. - * @param {String} [methodName1, methodName2, ...] The object method names to + * @param {object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to * bind, specified as individual method names or arrays of method names. - * @returns {Object} Returns `object`. + * @returns {object} Returns `object`. * @example * * var view = { @@ -4816,10 +4805,10 @@ * @static * @memberOf _ * @category Functions - * @param {Object} object The object the method belongs to. - * @param {String} key The key of the method. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @param {object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new bound function. * @example * * var object = { @@ -4853,8 +4842,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} [func1, func2, ...] Functions to compose. - * @returns {Function} Returns the new composed function. + * @param {...function} [func] Functions to compose. + * @returns {function} Returns the new composed function. * @example * * var realNameMap = { @@ -4903,10 +4892,10 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. * @example * * var stooges = [ @@ -4972,9 +4961,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to curry. - * @param {Number} [arity=func.length] The arity of `func`. - * @returns {Function} Returns the new curried function. + * @param {function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {function} Returns the new curried function. * @example * * var curried = _.curry(function(a, b, c) { @@ -5009,13 +4998,13 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to debounce. - * @param {Number} wait The number of milliseconds to delay. - * @param {Object} options The options object. + * @param {function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {object} options The options object. * [leading=false] A boolean to specify execution on the leading edge of the timeout. * [maxWait] The maximum time `func` is allowed to be delayed before it's called. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. + * @returns {function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -5129,9 +5118,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to defer. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * _.defer(function() { console.log('deferred'); }); @@ -5161,10 +5150,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to delay. - * @param {Number} wait The number of milliseconds to delay execution. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * var log = _.bind(console.log, console); @@ -5190,9 +5179,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] A function used to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @param {function} func The function to have its output memoized. + * @param {function} [resolver] A function used to resolve the cache key. + * @returns {function} Returns the new memoizing function. * @example * * var fibonacci = _.memoize(function(n) { @@ -5237,8 +5226,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var initialize = _.once(createApplication); @@ -5274,9 +5263,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @param {function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -5295,9 +5284,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @param {function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new partially applied function. * @example * * var defaultsDeep = _.partialRight(_.merge, _.defaults); @@ -5333,12 +5322,12 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to throttle. - * @param {Number} wait The number of milliseconds to throttle executions to. - * @param {Object} options The options object. + * @param {function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {object} options The options object. * [leading=true] A boolean to specify execution on the leading edge of the timeout. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. + * @returns {function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -5382,9 +5371,9 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. + * @param {*} value The value to wrap. + * @param {function} wrapper The wrapper function. + * @returns {function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -5414,8 +5403,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to escape. - * @returns {String} Returns the escaped string. + * @param {string} string The string to escape. + * @returns {string} Returns the escaped string. * @example * * _.escape('Moe, Larry & Curly'); @@ -5431,8 +5420,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Mixed} value Any value. - * @returns {Mixed} Returns `value`. + * @param {*} value Any value. + * @returns {*} Returns `value`. * @example * * var moe = { 'name': 'moe' }; @@ -5450,8 +5439,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object of function properties to add to `lodash`. - * @param {Object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. * @example * * _.mixin({ @@ -5499,7 +5488,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {Function} Returns the `lodash` function. + * @returns {function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -5520,9 +5509,9 @@ * @static * @memberOf _ * @category Utilities - * @param {String} value The value to parse. - * @param {Number} [radix] The radix used to interpret the value to parse. - * @returns {Number} Returns the new integer value. + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. * @example * * _.parseInt('08'); @@ -5541,9 +5530,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} [min=0] The minimum possible value. - * @param {Number} [max=1] The maximum possible value. - * @returns {Number} Returns a random number. + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @returns {number} Returns a random number. * @example * * _.random(0, 5); @@ -5578,9 +5567,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object to inspect. - * @param {String} property The property to get the value of. - * @returns {Mixed} Returns the resolved value. + * @param {object} object The object to inspect. + * @param {string} property The property to get the value of. + * @returns {*} Returns the resolved value. * @example * * var object = { @@ -5617,16 +5606,16 @@ * @static * @memberOf _ * @category Utilities - * @param {String} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} options The options object. + * @param {string} text The template text. + * @param {object} data The data object used to populate the text. + * @param {object} options The options object. * escape - The "escape" delimiter regexp. * evaluate - The "evaluate" delimiter regexp. * imports - An object of properties to import into the compiled template as local variables. * interpolate - The "interpolate" delimiter regexp. * sourceURL - The sourceURL of the template's compiled source. * variable - The data object variable name. - * @returns {Function|String} Returns a compiled function when no `data` object + * @returns {(function|string)} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -5797,10 +5786,10 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} n The number of times to execute the callback. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns an array of the results of each `callback` execution. + * @param {number} n The number of times to execute the callback. + * @param {function} callback The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -5832,8 +5821,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to unescape. - * @returns {String} Returns the unescaped string. + * @param {string} string The string to unescape. + * @returns {string} Returns the unescaped string. * @example * * _.unescape('Moe, Larry & Curly'); @@ -5849,8 +5838,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} [prefix] The value to prefix the ID with. - * @returns {String} Returns the unique ID. + * @param {string} [prefix] The value to prefix the ID with. + * @returns {string} Returns the unique ID. * @example * * _.uniqueId('contact_'); @@ -5872,8 +5861,8 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to wrap. - * @returns {Object} Returns the wrapper object. + * @param {*} value The value to wrap. + * @returns {object} Returns the wrapper object. * @example * * var stooges = [ @@ -5903,9 +5892,9 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {Mixed} Returns `value`. + * @param {*} value The value to provide to `interceptor`. + * @param {function} interceptor The function to invoke. + * @returns {*} Returns `value`. * @example * * _([1, 2, 3, 4]) @@ -5927,7 +5916,7 @@ * @name chain * @memberOf _ * @category Chaining - * @returns {Mixed} Returns the wrapper object. + * @returns {*} Returns the wrapper object. * @example * * var sum = _([1, 2, 3]) @@ -5947,7 +5936,7 @@ * @name toString * @memberOf _ * @category Chaining - * @returns {String} Returns the string result. + * @returns {string} Returns the string result. * @example * * _([1, 2, 3]).toString(); @@ -5964,7 +5953,7 @@ * @memberOf _ * @alias value * @category Chaining - * @returns {Mixed} Returns the wrapped value. + * @returns {*} Returns the wrapped value. * @example * * _([1, 2, 3]).valueOf(); @@ -6166,7 +6155,7 @@ * * @static * @memberOf _ - * @type String + * @type string */ lodash.VERSION = '1.3.1'; diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 1ecada6ed..490229647 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -5,48 +5,48 @@ */ ;!function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++er||typeof e=="undefined")return 1;if(ee?0:e);++r=j&&f===n,h=u||v?a():s;if(v){var g=o(h);g?(f=t,h=g):(v=m,h=u?h:(c(h),s)) -}for(;++if(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(c(h.b),p(h)):u&&c(h),s}function at(n){return function(t,e,r){var u={};e=Z.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++re?Ne(0,o+e):e)||0,o&&typeof o=="number"?i=-1<(dt(n)?n.indexOf(t,e):u(n,t,e)):b(n,function(n){return++re?0:e);++r=j&&f===n,h=u||v?a():s;if(v){var g=o(h);g?(f=t,h=g):(v=m,h=u?h:(c(h),s)) +}for(;++if(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(c(h.b),p(h)):u&&c(h),s}function at(n){return function(t,e,r){var u={};e=Z.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++re?Ae(0,o+e):e)||0,o&&typeof o=="number"?i=-1<(dt(n)?n.indexOf(t,e):u(n,t,e)):b(n,function(n){return++ro&&(o=a)}}else t=!t&&dt(n)?r:Z.createCallback(t,e,3),Ot(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function At(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Xt(r);++earguments.length;t=et(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++oarguments.length;return t=et(t,r,4),Et(n,function(n,r,o){e=u?(u=m,n):t(e,n,r,o)}),e}function Bt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e=="number"?e:0);return Ot(n,function(n){var e=Jt(++t);r[t]=r[e],r[e]=n}),r}function $t(n,t,e){var r;t=Z.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e=j&&u===n;if(l){var c=o(a);c?(u=t,a=c):l=m}for(;++ru(a,c)&&f.push(c);return l&&p(a),f}function Tt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&t!=y){var o=-1;for(t=Z.createCallback(t,e,3);++or?Ne(0,u+r):r||0}else if(r)return r=Wt(t,e),t[r]===e?r:-1;return n(t,e,r) -}function qt(n,t,e){if(typeof t!="number"&&t!=y){var r=0,u=-1,o=n?n.length:0;for(t=Z.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++tl&&(i=n.apply(f,o));else{!s&&!_&&(c=a);var e=p-(a-c);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:Z}}; -var We=ve?function(n,t){var e=f();e.value=t,ve(n,"__bindData__",e),p(e)}:l,Pe=Ee||function(n){return n&&typeof n=="object"?ke.call(n)==T:m},Ke=Ae?function(n){return _t(n)?Ae(n):[]}:X,Le={"&":"&","<":"<",">":">",'"':""","'":"'"},Me=yt(Le),Ue=ue("("+Ke(Me).join("|")+")","g"),Ve=ue("["+Ke(Le).join("")+"]","g"),Ge=at(function(n,t,e){me.call(n,e)?n[e]++:n[e]=1}),He=at(function(n,t,e){(me.call(n,e)?n[e]:n[e]=[]).push(t)}),Je=at(function(n,t,e){n[e]=t});Te&&Q&&typeof de=="function"&&(Vt=function(n){if(!mt(n))throw new ie; -return de.apply(e,arguments)});var Qe=8==Be(x+"08")?Be:function(n,t){return Be(dt(n)?n.replace(N,""):n,t||0)};return Z.after=function(n,t){if(!mt(t))throw new ie;return function(){return 1>--n?t.apply(this,arguments):void 0}},Z.assign=J,Z.at=function(n){for(var t=arguments,e=-1,r=rt(t,g,m,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);++e=j&&o(i?r[i]:g)}n:for(;++l(m?t(m,y):s(g,y))){for(i=u,(m||g).push(y);--i;)if(m=f[i],0>(m?t(m,y):s(r[i],y)))continue n;h.push(y)}}for(;u--;)(m=f[u])&&p(m);return c(f),c(g),h},Z.invert=yt,Z.invoke=function(n,t){var e=De.call(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=Xt(typeof o=="number"?o:0);return Ot(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},Z.keys=Ke,Z.map=It,Z.max=St,Z.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):w+arguments[0]; -return me.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!mt(n))throw new ie;return e.cache={},e},Z.merge=function(n){var t=arguments,e=2;if(!_t(n))return n;if("number"!=typeof t[2]&&(e=t.length),3r(i,e))&&(o[e]=n)}),o},Z.once=function(n){var t,e;if(!mt(n))throw new ie;return function(){return t?e:(t=g,e=n.apply(this,arguments),n=y,e)}},Z.pairs=function(n){for(var t=-1,e=Ke(n),r=e.length,u=Xt(r);++te?Ne(0,r+e):Re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},Z.mixin=Ht,Z.noConflict=function(){return e._=le,this},Z.parseInt=Qe,Z.random=Jt,Z.reduce=Nt,Z.reduceRight=Rt,Z.result=function(n,t){var e=n?n[t]:h;return mt(e)?n[t]():e},Z.runInContext=v,Z.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Ke(n).length},Z.some=$t,Z.sortedIndex=Wt,Z.template=function(n,t,e){var r=Z.templateSettings; -n||(n=""),e=G({},e,r);var u,o=G({},e.imports,r.imports),r=Ke(o),o=wt(o),a=0,f=e.interpolate||R,l="__p+='",f=ue((e.escape||R).source+"|"+f.source+"|"+(f===A?I:R).source+"|"+(e.evaluate||R).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace($,i),e&&(l+="'+__e("+e+")+'"),f&&(u=g,l+="';"+f+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t}),l+="';\n",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(C,""):l).replace(O,"$1").replace(E,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}"; -try{var c=ne(r,"return "+l).apply(h,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},Z.unescape=function(n){return n==y?"":oe(n).replace(Ue,st)},Z.uniqueId=function(n){var t=++d;return oe(n==y?"":n)+t},Z.all=kt,Z.any=$t,Z.detect=Ct,Z.findWhere=Ct,Z.foldl=Nt,Z.foldr=Rt,Z.include=jt,Z.inject=Nt,b(Z,function(n,t){Z.prototype[t]||(Z.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return be.apply(t,arguments),t=n.apply(Z,t),e?new nt(t,e):t})}),Z.first=Tt,Z.last=function(n,t,e){if(n){var r=0,u=n.length; -if(typeof t!="number"&&t!=y){var o=u;for(t=Z.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,r==y||e)return n[u-1];return s(n,Ne(0,u-r))}},Z.sample=function(n,t,e){return Pe(n)||(n=Dt(n)),t==y||e?n[Jt(n.length-1)]:(n=Bt(n),n.length=Re(Ne(0,t),n.length),n)},Z.take=Tt,Z.head=Tt,b(Z,function(n,t){var e="sample"!==t;Z.prototype[t]||(Z.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||t!=y&&(!r||e&&typeof t=="function")?new nt(o,u):o})}),Z.VERSION="1.3.1",Z.prototype.chain=function(){return this.__chain__=g,this -},Z.prototype.toString=function(){return oe(this.__wrapped__)},Z.prototype.value=Qt,Z.prototype.valueOf=Qt,Ot(["join","pop","shift"],function(n){var t=ae[n];Z.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new nt(e,n):e}}),Ot(["push","reverse","sort","unshift"],function(n){var t=ae[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ot(["concat","slice","splice"],function(n){var t=ae[n];Z.prototype[n]=function(){return new nt(t.apply(this.__wrapped__,arguments),this.__chain__) +}),u}for(;++eo&&(o=a)}}else t=!t&&dt(n)?r:Z.createCallback(t,e,3),Ot(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function At(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=et(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++oarguments.length; +return t=et(t,r,4),Et(n,function(n,r,o){e=u?(u=m,n):t(e,n,r,o)}),e}function Rt(n){var t=-1,e=n?n.length:0,r=Qt(typeof e=="number"?e:0);return Ot(n,function(n){var e=Ht(++t);r[t]=r[e],r[e]=n}),r}function Bt(n,t,e){var r;t=Z.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e=j&&u===n; +if(l){var c=o(a);c?(u=t,a=c):l=m}for(;++ru(a,c)&&f.push(c);return l&&p(a),f}function Ft(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&t!=y){var o=-1;for(t=Z.createCallback(t,e,3);++or?Ae(0,u+r):r||0}else if(r)return r=qt(t,e),t[r]===e?r:-1;return n(t,e,r)}function zt(n,t,e){if(typeof t!="number"&&t!=y){var r=0,u=-1,o=n?n.length:0; +for(t=Z.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++tl&&(i=n.apply(f,o)); +else{!s&&!_&&(c=a);var e=p-(a-c);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:Z}}; +var qe=se?function(n,t){var e=f();e.value=t,se(n,"__bindData__",e),p(e)}:l,We=Oe||function(n){return n&&typeof n=="object"?je.call(n)==T:m},Pe=Se?function(n){return _t(n)?Se(n):[]}:X,Ke={"&":"&","<":"<",">":">",'"':""","'":"'"},Le=yt(Ke),Me=re("("+Pe(Le).join("|")+")","g"),Ue=re("["+Pe(Ke).join("")+"]","g"),Ve=at(function(n,t,e){ye.call(n,e)?n[e]++:n[e]=1}),Ge=at(function(n,t,e){(ye.call(n,e)?n[e]:n[e]=[]).push(t)}),He=at(function(n,t,e){n[e]=t}),Je=It;Fe&&Q&&typeof be=="function"&&(Ut=function(n){if(!mt(n))throw new oe; +return be.apply(e,arguments)});var Qe=8==Re(x+"08")?Re:function(n,t){return Re(dt(n)?n.replace(N,""):n,t||0)};return Z.after=function(n,t){if(!mt(t))throw new oe;return function(){return 1>--n?t.apply(this,arguments):void 0}},Z.assign=J,Z.at=function(n){for(var t=arguments,e=-1,r=rt(t,g,m,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Qt(t);++e=j&&o(i?r[i]:g)}n:for(;++l(m?t(m,y):s(g,y))){for(i=u,(m||g).push(y);--i;)if(m=f[i],0>(m?t(m,y):s(r[i],y)))continue n;h.push(y)}}for(;u--;)(m=f[u])&&p(m);return c(f),c(g),h},Z.invert=yt,Z.invoke=function(n,t){var e=$e.call(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=Qt(typeof o=="number"?o:0);return Ot(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},Z.keys=Pe,Z.map=It,Z.max=St,Z.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):w+arguments[0]; +return ye.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!mt(n))throw new oe;return e.cache={},e},Z.merge=function(n){var t=arguments,e=2;if(!_t(n))return n;if("number"!=typeof t[2]&&(e=t.length),3r(i,e))&&(o[e]=n)}),o},Z.once=function(n){var t,e;if(!mt(n))throw new oe;return function(){return t?e:(t=g,e=n.apply(this,arguments),n=y,e)}},Z.pairs=function(n){for(var t=-1,e=Pe(n),r=e.length,u=Qt(r);++te?Ae(0,r+e):Ne(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},Z.mixin=Gt,Z.noConflict=function(){return e._=fe,this},Z.parseInt=Qe,Z.random=Ht,Z.reduce=At,Z.reduceRight=Nt,Z.result=function(n,t){var e=n?n[t]:h;return mt(e)?n[t]():e},Z.runInContext=v,Z.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Pe(n).length},Z.some=Bt,Z.sortedIndex=qt,Z.template=function(n,t,e){var r=Z.templateSettings; +n||(n=""),e=G({},e,r);var u,o=G({},e.imports,r.imports),r=Pe(o),o=wt(o),a=0,f=e.interpolate||R,l="__p+='",f=re((e.escape||R).source+"|"+f.source+"|"+(f===A?I:R).source+"|"+(e.evaluate||R).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace($,i),e&&(l+="'+__e("+e+")+'"),f&&(u=g,l+="';"+f+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t}),l+="';\n",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(C,""):l).replace(O,"$1").replace(E,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}"; +try{var c=Zt(r,"return "+l).apply(h,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},Z.unescape=function(n){return n==y?"":ue(n).replace(Me,st)},Z.uniqueId=function(n){var t=++d;return ue(n==y?"":n)+t},Z.all=kt,Z.any=Bt,Z.detect=Ct,Z.findWhere=Ct,Z.foldl=At,Z.foldr=Nt,Z.include=jt,Z.inject=At,b(Z,function(n,t){Z.prototype[t]||(Z.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return _e.apply(t,arguments),t=n.apply(Z,t),e?new nt(t,e):t})}),Z.first=Ft,Z.last=function(n,t,e){if(n){var r=0,u=n.length; +if(typeof t!="number"&&t!=y){var o=u;for(t=Z.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,r==y||e)return n[u-1];return s(n,Ae(0,u-r))}},Z.sample=function(n,t,e){return We(n)||(n=$t(n)),t==y||e?n[Ht(n.length-1)]:(n=Rt(n),n.length=Ne(Ae(0,t),n.length),n)},Z.take=Ft,Z.head=Ft,b(Z,function(n,t){var e="sample"!==t;Z.prototype[t]||(Z.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||t!=y&&(!r||e&&typeof t=="function")?new nt(o,u):o})}),Z.VERSION="1.3.1",Z.prototype.chain=function(){return this.__chain__=g,this +},Z.prototype.toString=function(){return ue(this.__wrapped__)},Z.prototype.value=Jt,Z.prototype.valueOf=Jt,Ot(["join","pop","shift"],function(n){var t=ie[n];Z.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new nt(e,n):e}}),Ot(["push","reverse","sort","unshift"],function(n){var t=ie[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ot(["concat","slice","splice"],function(n){var t=ie[n];Z.prototype[n]=function(){return new nt(t.apply(this.__wrapped__,arguments),this.__chain__) }}),Z}var h,g=!0,y=null,m=!1,_=[],b=[],d=0,w=+new Date+"",j=75,k=40,x=" \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",C=/\b__p\+='';/g,O=/\b(__p\+=)''\+/g,E=/(__e\(.*?\)|\b__t\))\+'';/g,I=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,A=/<%=([\s\S]+?)%>/g,N=RegExp("^["+x+"]*0+(?=.$)"),R=/($^)/,B=(B=/\bthis\b/)&&B.test(v)&&B,$=/['\n\r\t\u2028\u2029\\]/g,D="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),F="[object Arguments]",T="[object Array]",z="[object Boolean]",q="[object Date]",W="[object Function]",P="[object Number]",K="[object Object]",L="[object RegExp]",M="[object String]",U={}; U[W]=m,U[F]=U[T]=U[z]=U[q]=U[P]=U[K]=U[L]=U[M]=g;var V={"boolean":m,"function":g,object:g,number:m,string:m,undefined:m},G={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},H=V[typeof window]&&window||this,J=V[typeof exports]&&exports,Q=V[typeof module]&&module&&module.exports==J&&module,X=V[typeof global]&&global;!X||X.global!==X&&X.window!==X||(H=X);var Y=v();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(H._=Y, define(function(){return Y})):J&&!J.nodeType?Q?(Q.exports=Y)._=Y:J._=Y:H._=Y }.call(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index ffa54499e..f458439ab 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -84,10 +84,10 @@ * or `fromIndex` constraints. * * @private - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. */ function baseIndexOf(array, value, fromIndex) { var index = (fromIndex || 0) - 1, @@ -106,9 +106,9 @@ * them in ascending order. * * @private - * @param {Object} a The object to compare to `b`. - * @param {Object} b The object to compare to `a`. - * @returns {Number} Returns the sort order indicator of `1` or `-1`. + * @param {object} a The object to compare to `b`. + * @param {object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. */ function compareAscending(a, b) { var ac = a.criteria, @@ -136,8 +136,8 @@ * string literals. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeStringChar(match) { return '\\' + stringEscapes[match]; @@ -240,8 +240,8 @@ * @name _ * @constructor * @category Chaining - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -273,9 +273,9 @@ * A fast path for creating `lodash` wrapper objects. * * @private - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @param {Boolean} chainAll A flag to enable chaining for all methods - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {object} Returns a `lodash` instance. */ function lodashWrapper(value, chainAll) { this.__chain__ = !!chainAll; @@ -289,7 +289,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ var support = {}; @@ -300,7 +300,7 @@ * Detect if `Function#bind` exists and is inferred to be fast (all but V8). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.fastBind = nativeBind && !isV8; @@ -314,7 +314,7 @@ * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. * * @memberOf _.support - * @type Boolean + * @type boolean */ support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); }(1)); @@ -326,7 +326,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ lodash.templateSettings = { @@ -334,7 +334,7 @@ * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'escape': /<%-([\s\S]+?)%>/g, @@ -342,7 +342,7 @@ * Used to detect code to be evaluated. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'evaluate': /<%([\s\S]+?)%>/g, @@ -350,7 +350,7 @@ * Used to detect `data` property values to inject. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'interpolate': reInterpolate, @@ -358,7 +358,7 @@ * Used to reference the data object in the template text. * * @memberOf _.templateSettings - * @type String + * @type string */ 'variable': '' }; @@ -370,10 +370,10 @@ * "_.pluck" or "_.where" style callbacks. * * @private - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. */ function baseCreateCallback(func, thisArg, argCount) { if (typeof func != 'function') { @@ -405,11 +405,11 @@ * shorthands or `thisArg` binding. * * @private - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. - * @param {Number} [fromIndex=0] The index to start from. - * @returns {Array} Returns a new flattened array. + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -433,13 +433,13 @@ * that allows partial "_.where" style comparisons. * * @private - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `a` objects. - * @param {Array} [stackB=[]] Tracks traversed `b` objects. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {array} [stackA=[]] Tracks traversed `a` objects. + * @param {array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(a, b, stackA, stackB) { if (a === b) { @@ -544,10 +544,10 @@ * or `thisArg` binding. * * @private - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function} [callback] The function called per iteration. - * @returns {Array} Returns a duplicate-value-free array. + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {function} [callback] The function called per iteration. + * @returns {array} Returns a duplicate-value-free array. */ function baseUniq(array, isSorted, callback) { var index = -1, @@ -580,8 +580,8 @@ * of the composed object. * * @private - * @param {Function} setter The setter function. - * @returns {Function} Returns the new aggregator function. + * @param {function} setter The setter function. + * @returns {function} Returns the new aggregator function. */ function createAggregator(setter) { return function(collection, callback, thisArg) { @@ -610,8 +610,8 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {Function|String} func The function or method name to reference. - * @param {Number} bitmask The bitmask of method flags to compose. + * @param {(function|string)} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -619,13 +619,13 @@ * 8 - `_.curry` (bound) * 16 - `_.partial` * 32 - `_.partialRight` - * @param {Array} [partialArgs] An array of arguments to prepend to those + * @param {array} [partialArgs] An array of arguments to prepend to those * provided to the new function. - * @param {Array} [partialRightArgs] An array of arguments to append to those + * @param {array} [partialRightArgs] An array of arguments to append to those * provided to the new function. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Number} [arity] The arity of `func`. - * @returns {Function} Returns the new bound function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {function} Returns the new bound function. */ function createBound(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { var isBind = bitmask & 1, @@ -698,8 +698,8 @@ * Creates a new object with the specified `prototype`. * * @private - * @param {Object} prototype The prototype object. - * @returns {Object} Returns the new object. + * @param {object} prototype The prototype object. + * @returns {object} Returns the new object. */ function createObject(prototype) { return isObject(prototype) ? nativeCreate(prototype) : {}; @@ -720,8 +720,8 @@ * Used by `escape` to convert characters to HTML entities. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeHtmlChar(match) { return htmlEscapes[match]; @@ -733,7 +733,7 @@ * the `baseIndexOf` function. * * @private - * @returns {Function} Returns the "indexOf" function. + * @returns {function} Returns the "indexOf" function. */ function getIndexOf() { var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; @@ -744,8 +744,8 @@ * Used by `unescape` to convert HTML entities to characters. * * @private - * @param {String} match The matched character to unescape. - * @returns {String} Returns the unescaped character. + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. */ function unescapeHtmlChar(match) { return htmlUnescapes[match]; @@ -759,8 +759,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. * @example * * (function() { return _.isArguments(arguments); })(1, 2, 3); @@ -784,10 +784,10 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an array, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. * @example * * (function() { return _.isArray(arguments); })(); @@ -805,9 +805,9 @@ * given object's own enumerable property names. * * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @type function + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. */ var shimKeys = function(object) { var index, iterable = object, result = []; @@ -827,8 +827,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. * @example * * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); @@ -876,14 +876,14 @@ * * @static * @memberOf _ - * @type Function + * @type function * @alias extend * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize assigning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param {function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -922,11 +922,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the cloned `value`. + * @param {*} value The value to clone. + * @param {boolean} [deep=false] A flag to indicate a deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned `value`. * @example * * var stooges = [ @@ -965,13 +965,13 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param- {object} [guard] Allows working with `_.reduce` without using its * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. + * @returns {object} Returns the destination object. * @example * * var food = { 'name': 'apple' }; @@ -1003,12 +1003,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * function Dog(name) { @@ -1042,12 +1042,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -1075,8 +1075,8 @@ * @memberOf _ * @alias methods * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names that have function values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names that have function values. * @example * * _.functions(_); @@ -1099,9 +1099,9 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to check. - * @param {String} property The property to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. + * @param {object} object The object to check. + * @param {string} property The property to check for. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. * @example * * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); @@ -1117,8 +1117,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to invert. - * @returns {Object} Returns the created inverted object. + * @param {object} object The object to invert. + * @returns {object} Returns the created inverted object. * @example * * _.invert({ 'first': 'moe', 'second': 'larry' }); @@ -1143,8 +1143,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. * @example * * _.isBoolean(null); @@ -1160,8 +1160,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a date, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. * @example * * _.isDate(new Date); @@ -1177,8 +1177,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -1196,8 +1196,8 @@ * @static * @memberOf _ * @category Objects - * @param {Array|Object|String} value The value to inspect. - * @returns {Boolean} Returns `true` if the `value` is empty, else `false`. + * @param {(array|object|string)} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * * _.isEmpty([1, 2, 3]); @@ -1234,11 +1234,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var moe = { 'name': 'moe', 'age': 40 }; @@ -1275,8 +1275,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is finite, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. * @example * * _.isFinite(-101); @@ -1304,8 +1304,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a function, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -1328,8 +1328,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an object, else `false`. * @example * * _.isObject({}); @@ -1358,8 +1358,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); @@ -1386,8 +1386,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `null`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. * @example * * _.isNull(null); @@ -1408,8 +1408,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a number, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. * @example * * _.isNumber(8.4 * 5); @@ -1425,8 +1425,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. * @example * * _.isRegExp(/moe/); @@ -1442,8 +1442,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a string, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. * @example * * _.isString('moe'); @@ -1459,8 +1459,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); @@ -1481,11 +1481,11 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object without the omitted properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object without the omitted properties. * @example * * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); @@ -1516,8 +1516,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns new array of key-value pairs. + * @param {object} object The object to inspect. + * @returns {array} Returns new array of key-value pairs. * @example * * _.pairs({ 'moe': 30, 'larry': 40 }); @@ -1547,12 +1547,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Array|Function|String} callback|[prop1, prop2, ...] The function - * called per iteration or property names to pick, specified as individual - * property names or arrays of property names. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object composed of the picked properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object composed of the picked properties. * @example * * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); @@ -1584,8 +1584,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property values. * @example * * _.values({ 'one': 1, 'two': 2, 'three': 3 }); @@ -1614,10 +1614,10 @@ * @memberOf _ * @alias include * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Mixed} target The value to check for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Boolean} Returns `true` if the `target` element is found, else `false`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. * @example * * _.contains([1, 2, 3], 1); @@ -1663,12 +1663,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -1700,12 +1700,12 @@ * @memberOf _ * @alias all * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if all elements passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, * else `false`. * @example * @@ -1762,12 +1762,12 @@ * @memberOf _ * @alias select * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that passed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that passed the callback check. * @example * * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -1826,12 +1826,12 @@ * @memberOf _ * @alias detect, findWhere * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. * @example * * _.find([1, 2, 3, 4], function(num) { @@ -1887,9 +1887,9 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {object} properties The object of property values to filter by. + * @returns {*} Returns the found element, else `undefined`. * @example * * var food = [ @@ -1915,10 +1915,10 @@ * @memberOf _ * @alias each * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); @@ -1951,10 +1951,10 @@ * @memberOf _ * @alias eachRight * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); @@ -1995,12 +1995,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -2026,11 +2026,11 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} methodName The name of the method to invoke or + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|string)} methodName The name of the method to invoke or * the function invoked per iteration. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} Returns a new array of the results of each invoked method. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {array} Returns a new array of the results of each invoked method. * @example * * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); @@ -2068,12 +2068,12 @@ * @memberOf _ * @alias collect * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of the results of each `callback` execution. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -2126,12 +2126,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the maximum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. * @example * * _.max([4, 2, 8, 6]); @@ -2193,12 +2193,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the minimum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. * @example * * _.min([4, 2, 8, 6]); @@ -2249,11 +2249,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {String} property The property to pluck. - * @returns {Array} Returns a new array of property values. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {string} property The property to pluck. + * @returns {array} Returns a new array of property values. * @example * * var stooges = [ @@ -2264,18 +2264,7 @@ * _.pluck(stooges, 'name'); * // => ['moe', 'larry'] */ - function pluck(collection, property) { - var index = -1, - length = collection ? collection.length : 0; - - if (typeof length == 'number') { - var result = Array(length); - while (++index < length) { - result[index] = collection[index][property]; - } - } - return result || map(collection, property); - } + var pluck = map; /** * Reduces a collection to a value which is the accumulated result of running @@ -2289,11 +2278,11 @@ * @memberOf _ * @alias foldl, inject * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var sum = _.reduce([1, 2, 3], function(sum, num) { @@ -2340,11 +2329,11 @@ * @memberOf _ * @alias foldr * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var list = [[0, 1], [2, 3], [4, 5]]; @@ -2376,12 +2365,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that failed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that failed the callback check. * @example * * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -2414,8 +2403,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to shuffle. - * @returns {Array} Returns a new shuffled collection. + * @param {(array|object|string)} collection The collection to shuffle. + * @returns {array} Returns a new shuffled collection. * @example * * _.shuffle([1, 2, 3, 4, 5, 6]); @@ -2441,8 +2430,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to inspect. - * @returns {Number} Returns `collection.length` or number of own enumerable properties. + * @param {(array|object|string)} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * * _.size([1, 2]); @@ -2476,12 +2465,12 @@ * @memberOf _ * @alias any * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if any element passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, * else `false`. * @example * @@ -2539,12 +2528,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of sorted elements. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -2585,8 +2574,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to convert. - * @returns {Array} Returns the new converted array. + * @param {(array|object|string)} collection The collection to convert. + * @returns {array} Returns the new converted array. * @example * * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); @@ -2609,11 +2598,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Array} Returns a new array of elements that have the given `properties`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {object} properties The object of property values to filter by. + * @returns {array} Returns a new array of elements that have the given `properties`. * @example * * var stooges = [ @@ -2627,11 +2616,7 @@ * _.where(stooges, { 'quotes': ['Poifect!'] }); * // => [{ 'name': 'curly', 'age': 30, 'quotes': ['Oh, a wise guy, eh?', 'Poifect!'] }] */ - function where(collection, properties, first) { - return (first && isEmpty(properties)) - ? undefined - : (first ? find : filter)(collection, properties); - } + var where = filter; /*--------------------------------------------------------------------------*/ @@ -2642,8 +2627,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to compact. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to compact. + * @returns {array} Returns a new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); @@ -2670,9 +2655,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to process. - * @param {Array} [array1, array2, ...] The arrays of values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to process. + * @param {...array} [array] The arrays of values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); @@ -2711,13 +2696,13 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the first element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. * @example * * _.first([1, 2, 3]); @@ -2788,13 +2773,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new flattened array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -2824,11 +2809,11 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {(boolean|number)} [fromIndex=0] The index to search from or `true` * to perform a binary search on a sorted array. - * @returns {Number} Returns the index of the matched value or `-1`. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.indexOf([1, 2, 3, 1, 2, 3], 2); @@ -2867,13 +2852,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -2932,8 +2917,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -2979,13 +2964,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the last element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. * @example * * _.last([1, 2, 3]); @@ -3047,10 +3032,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=array.length-1] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); @@ -3080,10 +3065,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Number} [start=0] The start of the range. - * @param {Number} end The end of the range. - * @param {Number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns a new range array. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {array} Returns a new range array. * @example * * _.range(10); @@ -3143,13 +3128,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -3215,13 +3200,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to inspect. - * @param {Mixed} value The value to evaluate. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Number} Returns the index at which `value` should be inserted + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * @@ -3270,8 +3255,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -3300,13 +3285,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a duplicate-value-free array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -3345,9 +3330,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to filter. - * @param {Mixed} [value1, value2, ...] The values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -3366,8 +3351,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of grouped elements. + * @param {...array} [array] Arrays to process. + * @returns {array} Returns a new array of grouped elements. * @example * * _.zip(['moe', 'larry'], [30, 40], [true, false]); @@ -3393,9 +3378,9 @@ * @memberOf _ * @alias object * @category Arrays - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. - * @returns {Object} Returns an object composed of the given keys and + * @param {array} keys The array of keys. + * @param {array} [values=[]] The array of values. + * @returns {object} Returns an object composed of the given keys and * corresponding values. * @example * @@ -3427,10 +3412,10 @@ * @static * @memberOf _ * @category Functions - * @param {Number} n The number of times the function must be called before + * @param {number} n The number of times the function must be called before * `func` is executed. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var renderNotes = _.after(notes.length, render); @@ -3458,10 +3443,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to bind. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @param {function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -3485,10 +3470,10 @@ * @static * @memberOf _ * @category Functions - * @param {Object} object The object to bind and assign the bound methods to. - * @param {String} [methodName1, methodName2, ...] The object method names to + * @param {object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to * bind, specified as individual method names or arrays of method names. - * @returns {Object} Returns `object`. + * @returns {object} Returns `object`. * @example * * var view = { @@ -3521,8 +3506,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} [func1, func2, ...] Functions to compose. - * @returns {Function} Returns the new composed function. + * @param {...function} [func] Functions to compose. + * @returns {function} Returns the new composed function. * @example * * var realNameMap = { @@ -3571,10 +3556,10 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. * @example * * var stooges = [ @@ -3632,13 +3617,13 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to debounce. - * @param {Number} wait The number of milliseconds to delay. - * @param {Object} options The options object. + * @param {function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {object} options The options object. * [leading=false] A boolean to specify execution on the leading edge of the timeout. * [maxWait] The maximum time `func` is allowed to be delayed before it's called. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. + * @returns {function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -3752,9 +3737,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to defer. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * _.defer(function() { console.log('deferred'); }); @@ -3775,10 +3760,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to delay. - * @param {Number} wait The number of milliseconds to delay execution. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * var log = _.bind(console.log, console); @@ -3804,9 +3789,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] A function used to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @param {function} func The function to have its output memoized. + * @param {function} [resolver] A function used to resolve the cache key. + * @returns {function} Returns the new memoizing function. * @example * * var fibonacci = _.memoize(function(n) { @@ -3845,8 +3830,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var initialize = _.once(createApplication); @@ -3882,9 +3867,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @param {function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -3910,12 +3895,12 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to throttle. - * @param {Number} wait The number of milliseconds to throttle executions to. - * @param {Object} options The options object. + * @param {function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {object} options The options object. * [leading=true] A boolean to specify execution on the leading edge of the timeout. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. + * @returns {function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -3954,9 +3939,9 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. + * @param {*} value The value to wrap. + * @param {function} wrapper The wrapper function. + * @returns {function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -3986,8 +3971,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to escape. - * @returns {String} Returns the escaped string. + * @param {string} string The string to escape. + * @returns {string} Returns the escaped string. * @example * * _.escape('Moe, Larry & Curly'); @@ -4003,8 +3988,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Mixed} value Any value. - * @returns {Mixed} Returns `value`. + * @param {*} value Any value. + * @returns {*} Returns `value`. * @example * * var moe = { 'name': 'moe' }; @@ -4022,8 +4007,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object of function properties to add to `lodash`. - * @param {Object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. * @example * * _.mixin({ @@ -4063,7 +4048,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {Function} Returns the `lodash` function. + * @returns {function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -4081,9 +4066,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} [min=0] The minimum possible value. - * @param {Number} [max=1] The maximum possible value. - * @returns {Number} Returns a random number. + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @returns {number} Returns a random number. * @example * * _.random(0, 5); @@ -4118,9 +4103,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object to inspect. - * @param {String} property The property to get the value of. - * @returns {Mixed} Returns the resolved value. + * @param {object} object The object to inspect. + * @param {string} property The property to get the value of. + * @returns {*} Returns the resolved value. * @example * * var object = { @@ -4157,16 +4142,16 @@ * @static * @memberOf _ * @category Utilities - * @param {String} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} options The options object. + * @param {string} text The template text. + * @param {object} data The data object used to populate the text. + * @param {object} options The options object. * escape - The "escape" delimiter regexp. * evaluate - The "evaluate" delimiter regexp. * imports - An object of properties to import into the compiled template as local variables. * interpolate - The "interpolate" delimiter regexp. * sourceURL - The sourceURL of the template's compiled source. * variable - The data object variable name. - * @returns {Function|String} Returns a compiled function when no `data` object + * @returns {(function|string)} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -4291,10 +4276,10 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} n The number of times to execute the callback. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns an array of the results of each `callback` execution. + * @param {number} n The number of times to execute the callback. + * @param {function} callback The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -4324,8 +4309,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to unescape. - * @returns {String} Returns the unescaped string. + * @param {string} string The string to unescape. + * @returns {string} Returns the unescaped string. * @example * * _.unescape('Moe, Larry & Curly'); @@ -4341,8 +4326,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} [prefix] The value to prefix the ID with. - * @returns {String} Returns the unique ID. + * @param {string} [prefix] The value to prefix the ID with. + * @returns {string} Returns the unique ID. * @example * * _.uniqueId('contact_'); @@ -4364,8 +4349,8 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to wrap. - * @returns {Object} Returns the wrapper object. + * @param {*} value The value to wrap. + * @returns {object} Returns the wrapper object. * @example * * var stooges = [ @@ -4395,9 +4380,9 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {Mixed} Returns `value`. + * @param {*} value The value to provide to `interceptor`. + * @param {function} interceptor The function to invoke. + * @returns {*} Returns `value`. * @example * * _([1, 2, 3, 4]) @@ -4419,7 +4404,7 @@ * @name chain * @memberOf _ * @category Chaining - * @returns {Mixed} Returns the wrapper object. + * @returns {*} Returns the wrapper object. * @example * * var sum = _([1, 2, 3]) @@ -4440,7 +4425,7 @@ * @memberOf _ * @alias value * @category Chaining - * @returns {Mixed} Returns the wrapped value. + * @returns {*} Returns the wrapped value. * @example * * _([1, 2, 3]).valueOf(); @@ -4584,7 +4569,7 @@ * * @static * @memberOf _ - * @type String + * @type string */ lodash.VERSION = '1.3.1'; diff --git a/dist/lodash.underscore.min.js b/dist/lodash.underscore.min.js index 2df2e1beb..2c0da652a 100644 --- a/dist/lodash.underscore.min.js +++ b/dist/lodash.underscore.min.js @@ -3,36 +3,35 @@ * Lo-Dash 1.3.1 (Custom Build) lodash.com/license | Underscore.js 1.5.1 underscorejs.org/LICENSE * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js` */ -;!function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++te||typeof t=="undefined")return 1;if(tu(f,l))&&(t&&f.push(l),o.push(a))}return o}function c(n){return function(r,t,e){var u={};t=J(t,e,3),e=-1;var i=r?r.length:0;if(typeof i=="number")for(;++ee&&(e=t,u=n)});else for(;++iu&&(u=t);return u}function q(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++targuments.length;r=o(r,e,4); -var i=-1,f=n.length;if(typeof f=="number")for(u&&(t=n[++i]);++iarguments.length;return r=o(r,e,4),B(n,function(n,e,i){t=u?(u=!1,n):r(t,n,e,i)}),t}function I(n,r,t){var e;r=J(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++tt(u,o)&&i.push(o)}return i}function C(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var i=-1;for(r=J(r,t,3);++ie?kr(0,u+e):e||0}else if(e)return e=V(r,t),r[e]===t?e:-1;return n(r,t,e)}function U(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,i=n?n.length:0;for(r=J(r,t,3);++u>>1,t(n[e])f&&(u=n.apply(o,e)); -else{!c&&!v&&(a=i);var t=l-(i-a);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Fr||(s=function(n){if(x(n)){e.prototype=n;var r=new e;e.prototype=null}return r||{}}),y(arguments)||(y=function(n){return n&&typeof n=="object"?Er.call(n,"callee"):!1});var Cr=Nr||function(n){return n&&typeof n=="object"?Tr.call(n)==ir:!1},Pr=function(n){var r,t=[]; -if(!n||!sr[typeof n])return t;for(r in n)Er.call(n,r)&&t.push(r);return t},Ur=Dr?function(n){return x(n)?Dr(n):[]}:Pr,Vr={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Gr=b(Vr),Hr=RegExp("("+Ur(Gr).join("|")+")","g"),Jr=RegExp("["+Ur(Vr).join("")+"]","g"),Kr=function(n,r){var t;if(!n||!sr[typeof n])return n;for(t in n)if(r(n[t],t,n)===nr)break;return n},Lr=function(n,r){var t;if(!n||!sr[typeof n])return n;for(t in n)if(Er.call(n,t)&&r(n[t],t,n)===nr)break;return n};j(/x/)&&(j=function(n){return typeof n=="function"&&"[object Function]"==Tr.call(n) -});var Qr=c(function(n,r,t){Er.call(n,t)?n[t]++:n[t]=1}),Xr=c(function(n,r,t){(Er.call(n,t)?n[t]:n[t]=[]).push(r)});u.after=function(n,r){if(!j(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=H,u.bindAll=function(n){for(var r=1u(o,f)){for(var a=t;--a;)if(0>u(r[a],f))continue n;o.push(f)}}return o},u.invert=b,u.invoke=function(n,r){var t=$r.call(arguments,2),e=-1,u=typeof r=="function",i=n?n.length:0,o=Array(typeof i=="number"?i:0); -return R(n,function(n){o[++e]=(u?r:n[r]).apply(n,t)}),o},u.keys=Ur,u.map=D,u.max=k,u.memoize=function(n,r){var t={};return function(){var e=rr+(r?r.apply(this,arguments):arguments[0]);return Er.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},u.min=function(n,r,t){var e=1/0,u=e,i=-1,o=n?n.length:0;if(r||typeof o!="number")r=J(r,t,3),R(n,function(n,t,i){t=r(n,t,i),tr(t,u)&&(e[u]=n) -}),e},u.once=function(n){var r,t;if(!j(n))throw new TypeError;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},u.pairs=function(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++rr?0:r);++nt?kr(0,e+t):qr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},u.mixin=Q,u.noConflict=function(){return hr._=br,this},u.random=X,u.reduce=M,u.reduceRight=$,u.result=function(n,r){var t=n?n[r]:Y;return j(t)?n[r]():t},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Ur(n).length -},u.some=I,u.sortedIndex=V,u.template=function(n,r,e){var i=u,o=i.templateSettings;n||(n=""),e=_({},e,o);var f=0,a="__p+='",o=e.variable;n.replace(RegExp((e.escape||tr).source+"|"+(e.interpolate||tr).source+"|"+(e.evaluate||tr).source+"|$","g"),function(r,e,u,i,o){return a+=n.slice(f,o).replace(er,t),e&&(a+="'+_.escape("+e+")+'"),i&&(a+="';"+i+";__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=o+r.length,r}),a+="';\n",o||(o="obj",a="with("+o+"||{}){"+a+"}"),a="function("+o+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}"; -try{var l=Function("_","return "+a)(i)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Hr,g)},u.uniqueId=function(n){var r=++Z+"";return n?n+r:r},u.all=S,u.any=I,u.detect=N,u.findWhere=function(n,r){return W(n,r,!0)},u.foldl=M,u.foldr=$,u.include=O,u.inject=M,u.first=C,u.last=function(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var i=u;for(r=J(r,t,3);i--&&r(n[i],i,n);)e++}else if(e=r,null==e||t)return n[u-1];return $r.call(n,kr(0,u-e)) -}},u.take=C,u.head=C,Q(u),u.VERSION="1.3.1",u.prototype.chain=function(){return this.__chain__=!0,this},u.prototype.value=function(){return this.__wrapped__},R("pop push reverse shift sort splice unshift".split(" "),function(n){var r=_r[n];u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),!zr.spliceObjects&&0===n.length&&delete n[0],this}}),R(["concat","join","slice"],function(n){var r=_r[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=!0),n -}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(hr._=u, define(function(){return u})):gr&&!gr.nodeType?yr?(yr.exports=u)._=u:gr._=u:hr._=u}.call(this); \ No newline at end of file +;!function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++te||typeof t=="undefined")return 1;if(tu(f,l))&&(t&&f.push(l),o.push(a))}return o}function c(n){return function(r,t,e){var u={};t=V(t,e,3),e=-1;var i=r?r.length:0;if(typeof i=="number")for(;++ee&&(e=t,u=n)});else for(;++iu&&(u=t);return u}function k(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=o(r,e,4);var i=-1,f=n.length;if(typeof f=="number")for(u&&(t=n[++i]);++iarguments.length;return r=o(r,e,4),R(n,function(n,e,i){t=u?(u=!1,n):r(t,n,e,i) +}),t}function M(n,r,t){var e;r=V(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++tt(u,o)&&i.push(o)}return i}function I(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var i=-1;for(r=V(r,t,3);++ie?Rr(0,u+e):e||0}else if(e)return e=C(r,t),r[e]===t?e:-1;return n(r,t,e)}function z(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,i=n?n.length:0;for(r=V(r,t,3);++u>>1,t(n[e])f&&(u=n.apply(o,e));else{!c&&!v&&(a=i);var t=l-(i-a);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Tr||(s=function(n){if(j(n)){e.prototype=n;var r=new e;e.prototype=null}return r||{}}),y(arguments)||(y=function(n){return n&&typeof n=="object"?wr.call(n,"callee"):!1});var Ir=Or||function(n){return n&&typeof n=="object"?xr.call(n)==tr:!1},Wr=function(n){var r,t=[]; +if(!n||!lr[typeof n])return t;for(r in n)wr.call(n,r)&&t.push(r);return t},zr=Nr?function(n){return j(n)?Nr(n):[]}:Wr,Cr={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Pr=b(Cr),Ur=RegExp("("+zr(Pr).join("|")+")","g"),Vr=RegExp("["+zr(Cr).join("")+"]","g"),Gr=function(n,r){var t;if(!n||!lr[typeof n])return n;for(t in n)if(r(n[t],t,n)===X)break;return n},Hr=function(n,r){var t;if(!n||!lr[typeof n])return n;for(t in n)if(wr.call(n,t)&&r(n[t],t,n)===X)break;return n};w(/x/)&&(w=function(n){return typeof n=="function"&&"[object Function]"==xr.call(n) +});var Jr=c(function(n,r,t){wr.call(n,t)?n[t]++:n[t]=1}),Kr=c(function(n,r,t){(wr.call(n,t)?n[t]:n[t]=[]).push(r)}),Lr=B,Qr=S;u.after=function(n,r){if(!w(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=U,u.bindAll=function(n){for(var r=1u(o,f)){for(var a=t;--a;)if(0>u(r[a],f))continue n;o.push(f)}}return o},u.invert=b,u.invoke=function(n,r){var t=kr.call(arguments,2),e=-1,u=typeof r=="function",i=n?n.length:0,o=Array(typeof i=="number"?i:0); +return N(n,function(n){o[++e]=(u?r:n[r]).apply(n,t)}),o},u.keys=zr,u.map=B,u.max=D,u.memoize=function(n,r){var t={};return function(){var e=Y+(r?r.apply(this,arguments):arguments[0]);return wr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},u.min=function(n,r,t){var e=1/0,u=e,i=-1,o=n?n.length:0;if(r||typeof o!="number")r=V(r,t,3),N(n,function(n,t,i){t=r(n,t,i),tr(t,u)&&(e[u]=n) +}),e},u.once=function(n){var r,t;if(!w(n))throw new TypeError;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},u.pairs=function(n){for(var r=-1,t=zr(n),e=t.length,u=Array(e);++rr?0:r);++nt?Rr(0,e+t):Br(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},u.mixin=J,u.noConflict=function(){return pr._=mr,this},u.random=K,u.reduce=k,u.reduceRight=q,u.result=function(n,r){var t=n?n[r]:L; +return w(t)?n[r]():t},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:zr(n).length},u.some=M,u.sortedIndex=C,u.template=function(n,r,e){var i=u,o=i.templateSettings;n||(n=""),e=_({},e,o);var f=0,a="__p+='",o=e.variable;n.replace(RegExp((e.escape||Z).source+"|"+(e.interpolate||Z).source+"|"+(e.evaluate||Z).source+"|$","g"),function(r,e,u,i,o){return a+=n.slice(f,o).replace(nr,t),e&&(a+="'+_.escape("+e+")+'"),i&&(a+="';"+i+";__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=o+r.length,r +}),a+="';\n",o||(o="obj",a="with("+o+"||{}){"+a+"}"),a="function("+o+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(i)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Ur,g)},u.uniqueId=function(n){var r=++Q+"";return n?n+r:r},u.all=O,u.any=M,u.detect=F,u.findWhere=function(n,r){return Qr(n,r,!0)},u.foldl=k,u.foldr=q,u.include=T,u.inject=k,u.first=I,u.last=function(n,r,t){if(n){var e=0,u=n.length; +if(typeof r!="number"&&null!=r){var i=u;for(r=V(r,t,3);i--&&r(n[i],i,n);)e++}else if(e=r,null==e||t)return n[u-1];return kr.call(n,Rr(0,u-e))}},u.take=I,u.head=I,J(u),u.VERSION="1.3.1",u.prototype.chain=function(){return this.__chain__=!0,this},u.prototype.value=function(){return this.__wrapped__},N("pop push reverse shift sort splice unshift".split(" "),function(n){var r=gr[n];u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),!$r.spliceObjects&&0===n.length&&delete n[0],this +}}),N(["concat","join","slice"],function(n){var r=gr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(pr._=u, define(function(){return u})):sr&&!sr.nodeType?vr?(vr.exports=u)._=u:sr._=u:pr._=u}.call(this); \ No newline at end of file diff --git a/lodash.js b/lodash.js index 872e82d9f..558e0b33a 100644 --- a/lodash.js +++ b/lodash.js @@ -150,10 +150,10 @@ * or `fromIndex` constraints. * * @private - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. */ function baseIndexOf(array, value, fromIndex) { var index = (fromIndex || 0) - 1, @@ -172,9 +172,9 @@ * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. * * @private - * @param {Object} cache The cache object to inspect. - * @param {Mixed} value The value to search for. - * @returns {Number} Returns `0` if `value` is found, else `-1`. + * @param {object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. */ function cacheIndexOf(cache, value) { var type = typeof value; @@ -198,7 +198,7 @@ * Adds a given `value` to the corresponding cache object. * * @private - * @param {Mixed} value The value to add to the cache. + * @param {*} value The value to add to the cache. */ function cachePush(value) { var cache = this.cache, @@ -226,8 +226,8 @@ * collection is a string value. * * @private - * @param {String} value The character to inspect. - * @returns {Number} Returns the code unit of given character. + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. */ function charAtCallback(value) { return value.charCodeAt(0); @@ -238,9 +238,9 @@ * them in ascending order. * * @private - * @param {Object} a The object to compare to `b`. - * @param {Object} b The object to compare to `a`. - * @returns {Number} Returns the sort order indicator of `1` or `-1`. + * @param {object} a The object to compare to `b`. + * @param {object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. */ function compareAscending(a, b) { var ac = a.criteria, @@ -267,8 +267,8 @@ * Creates a cache object to optimize linear searches of large arrays. * * @private - * @param {Array} [array=[]] The array to search. - * @returns {Null|Object} Returns the cache object or `null` if caching should not be used. + * @param {array} [array=[]] The array to search. + * @returns {(null|object)} Returns the cache object or `null` if caching should not be used. */ function createCache(array) { var index = -1, @@ -298,8 +298,8 @@ * string literals. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeStringChar(match) { return '\\' + stringEscapes[match]; @@ -309,7 +309,7 @@ * Gets an array from the array pool or creates a new one if the pool is empty. * * @private - * @returns {Array} The array from the pool. + * @returns {array} The array from the pool. */ function getArray() { return arrayPool.pop() || []; @@ -319,7 +319,7 @@ * Gets an object from the object pool or creates a new one if the pool is empty. * * @private - * @returns {Object} The object from the pool. + * @returns {object} The object from the pool. */ function getObject() { return objectPool.pop() || { @@ -359,8 +359,8 @@ * Checks if `value` is a DOM node in IE < 9. * * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM node, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. */ function isNode(value) { // IE < 9 presents DOM nodes as `Object` objects except they have `toString` @@ -381,7 +381,7 @@ * Releases the given array back to the array pool. * * @private - * @param {Array} [array] The array to release. + * @param {array} [array] The array to release. */ function releaseArray(array) { array.length = 0; @@ -394,7 +394,7 @@ * Releases the given object back to the object pool. * * @private - * @param {Object} [object] The object to release. + * @param {object} [object] The object to release. */ function releaseObject(object) { var cache = object.cache; @@ -415,10 +415,10 @@ * in IE < 9 and to ensure dense arrays are returned. * * @private - * @param {Array|Object|String} collection The collection to slice. - * @param {Number} start The start index. - * @param {Number} end The end index. - * @returns {Array} Returns the new array. + * @param {(array|object|string)} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {array} Returns the new array. */ function slice(array, start, end) { start || (start = 0); @@ -443,8 +443,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} [context=root] The context object. - * @returns {Function} Returns the `lodash` function. + * @param {object} [context=root] The context object. + * @returns {function} Returns the `lodash` function. */ function runInContext(context) { // Avoid issues with some ES3 environments that attempt to use values, named @@ -594,8 +594,8 @@ * @name _ * @constructor * @category Chaining - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -628,9 +628,9 @@ * A fast path for creating `lodash` wrapper objects. * * @private - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @param {Boolean} chainAll A flag to enable chaining for all methods - * @returns {Object} Returns a `lodash` instance. + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {object} Returns a `lodash` instance. */ function lodashWrapper(value, chainAll) { this.__chain__ = !!chainAll; @@ -644,7 +644,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ var support = lodash.support = {}; @@ -661,7 +661,7 @@ * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); @@ -669,7 +669,7 @@ * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.argsClass = toString.call(arguments) == argsClass; @@ -678,7 +678,7 @@ * enumerable by default. (IE < 9, Safari < 5.1) * * @memberOf _.support - * @type Boolean + * @type boolean */ support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); @@ -691,7 +691,7 @@ * value to `true`. * * @memberOf _.support - * @type Boolean + * @type boolean */ support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); @@ -699,7 +699,7 @@ * Detect if `Function#bind` exists and is inferred to be fast (all but V8). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.fastBind = nativeBind && !isV8; @@ -707,7 +707,7 @@ * Detect if own properties are iterated after inherited properties (all but IE < 9). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.ownLast = props[0] != 'x'; @@ -716,7 +716,7 @@ * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.nonEnumArgs = prop != 0; @@ -727,7 +727,7 @@ * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). * * @memberOf _.support - * @type Boolean + * @type boolean */ support.nonEnumShadows = !/valueOf/.test(props); @@ -741,7 +741,7 @@ * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. * * @memberOf _.support - * @type Boolean + * @type boolean */ support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); @@ -752,7 +752,7 @@ * characters by index on string literals. * * @memberOf _.support - * @type Boolean + * @type boolean */ support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; @@ -762,7 +762,7 @@ * a string without a `toString` function. * * @memberOf _.support - * @type Boolean + * @type boolean */ try { support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); @@ -778,7 +778,7 @@ * * @static * @memberOf _ - * @type Object + * @type object */ lodash.templateSettings = { @@ -786,7 +786,7 @@ * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'escape': /<%-([\s\S]+?)%>/g, @@ -794,7 +794,7 @@ * Used to detect code to be evaluated. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'evaluate': /<%([\s\S]+?)%>/g, @@ -802,7 +802,7 @@ * Used to detect `data` property values to inject. * * @memberOf _.templateSettings - * @type RegExp + * @type regexp */ 'interpolate': reInterpolate, @@ -810,7 +810,7 @@ * Used to reference the data object in the template text. * * @memberOf _.templateSettings - * @type String + * @type string */ 'variable': '', @@ -818,7 +818,7 @@ * Used to import variables into the compiled template. * * @memberOf _.templateSettings - * @type Object + * @type object */ 'imports': { @@ -826,7 +826,7 @@ * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports - * @type Function + * @type function */ '_': lodash } @@ -838,8 +838,8 @@ * The template used to create iterator functions. * * @private - * @param {Object} data The data object used to populate the text. - * @returns {String} Returns the interpolated text. + * @param {object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. */ var iteratorTemplate = template( // the `iterable` may be reassigned by the `top` snippet @@ -956,12 +956,12 @@ * for `thisArg` binding. * * @private - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {Mixed} Returns the cloned `value`. + * @param {*} value The value to clone. + * @param {boolean} [deep=false] A flag to indicate a deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {array} [stackA=[]] Tracks traversed source objects. + * @param {array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned `value`. */ function baseClone(value, deep, callback, stackA, stackB) { var result = value; @@ -1046,10 +1046,10 @@ * "_.pluck" or "_.where" style callbacks. * * @private - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. */ function baseCreateCallback(func, thisArg, argCount) { if (typeof func != 'function') { @@ -1091,11 +1091,11 @@ * shorthands or `thisArg` binding. * * @private - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. - * @param {Number} [fromIndex=0] The index to start from. - * @returns {Array} Returns a new flattened array. + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isArgArrays=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -1119,13 +1119,13 @@ * that allows partial "_.where" style comparisons. * * @private - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `a` objects. - * @param {Array} [stackB=[]] Tracks traversed `b` objects. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {array} [stackA=[]] Tracks traversed `a` objects. + * @param {array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { // used to indicate that when comparing objects, `a` has at least the properties of `b` @@ -1288,11 +1288,11 @@ * for `thisArg` binding. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [callback] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. + * @param {object} object The destination object. + * @param {object} source The source object. + * @param {function} [callback] The function to customize merging properties. + * @param {array} [stackA=[]] Tracks traversed source objects. + * @param {array} [stackB=[]] Associates values with source counterparts. */ function baseMerge(object, source, callback, stackA, stackB) { (isArray(source) ? forEach : forOwn)(source, function(source, key) { @@ -1353,10 +1353,10 @@ * or `thisArg` binding. * * @private - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function} [callback] The function called per iteration. - * @returns {Array} Returns a duplicate-value-free array. + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {function} [callback] The function called per iteration. + * @returns {array} Returns a duplicate-value-free array. */ function baseUniq(array, isSorted, callback) { var index = -1, @@ -1407,8 +1407,8 @@ * of the composed object. * * @private - * @param {Function} setter The setter function. - * @returns {Function} Returns the new aggregator function. + * @param {function} setter The setter function. + * @returns {function} Returns the new aggregator function. */ function createAggregator(setter) { return function(collection, callback, thisArg) { @@ -1437,8 +1437,8 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {Function|String} func The function or method name to reference. - * @param {Number} bitmask The bitmask of method flags to compose. + * @param {(function|string)} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -1446,13 +1446,13 @@ * 8 - `_.curry` (bound) * 16 - `_.partial` * 32 - `_.partialRight` - * @param {Array} [partialArgs] An array of arguments to prepend to those + * @param {array} [partialArgs] An array of arguments to prepend to those * provided to the new function. - * @param {Array} [partialRightArgs] An array of arguments to append to those + * @param {array} [partialRightArgs] An array of arguments to append to those * provided to the new function. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Number} [arity] The arity of `func`. - * @returns {Function} Returns the new bound function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {function} Returns the new bound function. */ function createBound(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { var isBind = bitmask & 1, @@ -1546,7 +1546,7 @@ * Creates compiled iteration functions. * * @private - * @param {Object} [options1, options2, ...] The compile options object(s). + * @param {...object} [options] The compile options object(s). * array - A string of code to determine if the iterable is an array or array-like. * useHas - A boolean to specify using `hasOwnProperty` checks in the object loop. * keys - A reference to `_.keys` for use in own property iteration. @@ -1554,7 +1554,7 @@ * top - A string of code to execute before the iteration branches. * loop - A string of code to execute in the object loop. * bottom - A string of code to execute after the iteration branches. - * @returns {Function} Returns the compiled function. + * @returns {function} Returns the compiled function. */ function createIterator() { var data = getObject(); @@ -1599,8 +1599,8 @@ * Creates a new object with the specified `prototype`. * * @private - * @param {Object} prototype The prototype object. - * @returns {Object} Returns the new object. + * @param {object} prototype The prototype object. + * @returns {object} Returns the new object. */ function createObject(prototype) { return isObject(prototype) ? nativeCreate(prototype) : {}; @@ -1621,8 +1621,8 @@ * Used by `escape` to convert characters to HTML entities. * * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. */ function escapeHtmlChar(match) { return htmlEscapes[match]; @@ -1634,7 +1634,7 @@ * the `baseIndexOf` function. * * @private - * @returns {Function} Returns the "indexOf" function. + * @returns {function} Returns the "indexOf" function. */ function getIndexOf() { var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; @@ -1645,8 +1645,8 @@ * Sets `this` binding data on a given function. * * @private - * @param {Function} func The function to set data on. - * @param {Mixed} value The value to set. + * @param {function} func The function to set data on. + * @param {*} value The value to set. */ var setBindData = !defineProperty ? noop : function(func, value) { var descriptor = getObject(); @@ -1662,8 +1662,8 @@ * there are no `Object.prototype` extensions. * * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. */ function shimIsPlainObject(value) { var ctor, @@ -1699,8 +1699,8 @@ * Used by `unescape` to convert HTML entities to characters. * * @private - * @param {String} match The matched character to unescape. - * @returns {String} Returns the unescaped character. + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. */ function unescapeHtmlChar(match) { return htmlUnescapes[match]; @@ -1714,8 +1714,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. * @example * * (function() { return _.isArguments(arguments); })(1, 2, 3); @@ -1739,10 +1739,10 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an array, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. * @example * * (function() { return _.isArray(arguments); })(); @@ -1760,9 +1760,9 @@ * given object's own enumerable property names. * * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @type function + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. */ var shimKeys = createIterator({ 'args': 'object', @@ -1777,8 +1777,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names. * @example * * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); @@ -1856,11 +1856,11 @@ * iteration early by explicitly returning `false`. * * @private - * @type Function - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @type function + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. */ var baseEach = createIterator(eachIteratorOptions); @@ -1875,14 +1875,14 @@ * * @static * @memberOf _ - * @type Function + * @type function * @alias extend * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize assigning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param {function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -1919,11 +1919,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the cloned `value`. + * @param {*} value The value to clone. + * @param {boolean} [deep=false] A flag to indicate a deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned `value`. * @example * * var stooges = [ @@ -1974,10 +1974,10 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the deep cloned `value`. + * @param {*} value The value to deep clone. + * @param {function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned `value`. * @example * * var stooges = [ @@ -2012,13 +2012,13 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param- {object} [guard] Allows working with `_.reduce` without using its * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. + * @returns {object} Returns the destination object. * @example * * var food = { 'name': 'apple' }; @@ -2034,12 +2034,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to search. - * @param {Function|Object|String} [callback=identity] The function called per + * @param {object} object The object to search. + * @param {(function|object|string)} [callback=identity] The function called per * iteration. If a property name or object is provided it will be used to * create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the key of the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the key of the found element, else `undefined`. * @example * * _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { @@ -2066,12 +2066,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to search. - * @param {Function|Object|String} [callback=identity] The function called per + * @param {object} object The object to search. + * @param {(function|object|string)} [callback=identity] The function called per * iteration. If a property name or object is provided it will be used to * create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the key of the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the key of the found element, else `undefined`. * @example * * _.findLastKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { @@ -2099,12 +2099,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * function Dog(name) { @@ -2131,10 +2131,10 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * function Dog(name) { @@ -2175,12 +2175,12 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2197,10 +2197,10 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. + * @param {object} object The object to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns `object`. * @example * * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2230,8 +2230,8 @@ * @memberOf _ * @alias methods * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names that have function values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property names that have function values. * @example * * _.functions(_); @@ -2254,9 +2254,9 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to check. - * @param {String} property The property to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. + * @param {object} object The object to check. + * @param {string} property The property to check for. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. * @example * * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); @@ -2272,8 +2272,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to invert. - * @returns {Object} Returns the created inverted object. + * @param {object} object The object to invert. + * @returns {object} Returns the created inverted object. * @example * * _.invert({ 'first': 'moe', 'second': 'larry' }); @@ -2298,8 +2298,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. * @example * * _.isBoolean(null); @@ -2315,8 +2315,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a date, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. * @example * * _.isDate(new Date); @@ -2332,8 +2332,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -2351,8 +2351,8 @@ * @static * @memberOf _ * @category Objects - * @param {Array|Object|String} value The value to inspect. - * @returns {Boolean} Returns `true` if the `value` is empty, else `false`. + * @param {(array|object|string)} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * * _.isEmpty([1, 2, 3]); @@ -2393,11 +2393,11 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if the values are equivalent, else `false`. + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var moe = { 'name': 'moe', 'age': 40 }; @@ -2434,8 +2434,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is finite, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. * @example * * _.isFinite(-101); @@ -2463,8 +2463,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a function, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -2487,8 +2487,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an object, else `false`. * @example * * _.isObject({}); @@ -2517,8 +2517,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); @@ -2545,8 +2545,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `null`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. * @example * * _.isNull(null); @@ -2567,8 +2567,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a number, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. * @example * * _.isNumber(8.4 * 5); @@ -2584,8 +2584,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Stooge(name, age) { @@ -2620,8 +2620,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. * @example * * _.isRegExp(/moe/); @@ -2637,8 +2637,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a string, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. * @example * * _.isString('moe'); @@ -2654,8 +2654,8 @@ * @static * @memberOf _ * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); @@ -2677,11 +2677,11 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize merging properties. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. + * @param {object} object The destination object. + * @param {...object} [source] The source objects. + * @param {function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the destination object. * @example * * var names = { @@ -2757,11 +2757,11 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object without the omitted properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object without the omitted properties. * @example * * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); @@ -2800,8 +2800,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns new array of key-value pairs. + * @param {object} object The object to inspect. + * @returns {array} Returns new array of key-value pairs. * @example * * _.pairs({ 'moe': 30, 'larry': 40 }); @@ -2831,12 +2831,12 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The source object. - * @param {Array|Function|String} callback|[prop1, prop2, ...] The function - * called per iteration or property names to pick, specified as individual - * property names or arrays of property names. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object composed of the picked properties. + * @param {object} object The source object. + * @param {(function|...string|string[])} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns an object composed of the picked properties. * @example * * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); @@ -2882,11 +2882,11 @@ * @static * @memberOf _ * @category Objects - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] The custom accumulator value. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { @@ -2928,8 +2928,8 @@ * @static * @memberOf _ * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. + * @param {object} object The object to inspect. + * @returns {array} Returns an array of property values. * @example * * _.values({ 'one': 1, 'two': 2, 'three': 3 }); @@ -2957,10 +2957,10 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Array|Number|String} [index1, index2, ...] The indexes of `collection` + * @param {(array|object|string)} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` * to retrieve, specified as individual indexes or arrays of indexes. - * @returns {Array} Returns a new array of elements corresponding to the + * @returns {array} Returns a new array of elements corresponding to the * provided indexes. * @example * @@ -2995,10 +2995,10 @@ * @memberOf _ * @alias include * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Mixed} target The value to check for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Boolean} Returns `true` if the `target` element is found, else `false`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. * @example * * _.contains([1, 2, 3], 1); @@ -3052,12 +3052,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3089,12 +3089,12 @@ * @memberOf _ * @alias all * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if all elements passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, * else `false`. * @example * @@ -3151,12 +3151,12 @@ * @memberOf _ * @alias select * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that passed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that passed the callback check. * @example * * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -3215,12 +3215,12 @@ * @memberOf _ * @alias detect, findWhere * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. * @example * * _.find([1, 2, 3, 4], function(num) { @@ -3274,12 +3274,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. * @example * * _.findLast([1, 2, 3, 4], function(num) { @@ -3309,10 +3309,10 @@ * @memberOf _ * @alias each * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); @@ -3345,10 +3345,10 @@ * @memberOf _ * @alias eachRight * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {(array|object|string)} Returns `collection`. * @example * * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); @@ -3397,12 +3397,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3436,12 +3436,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {object} Returns the composed aggregate object. * @example * * var keys = [ @@ -3471,11 +3471,11 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} methodName The name of the method to invoke or + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|string)} methodName The name of the method to invoke or * the function invoked per iteration. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} Returns a new array of the results of each invoked method. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {array} Returns a new array of the results of each invoked method. * @example * * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); @@ -3513,12 +3513,12 @@ * @memberOf _ * @alias collect * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of the results of each `callback` execution. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -3570,12 +3570,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the maximum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. * @example * * _.max([4, 2, 8, 6]); @@ -3639,12 +3639,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the minimum value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. * @example * * _.min([4, 2, 8, 6]); @@ -3697,11 +3697,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {String} property The property to pluck. - * @returns {Array} Returns a new array of property values. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {string} property The property to pluck. + * @returns {array} Returns a new array of property values. * @example * * var stooges = [ @@ -3726,11 +3726,11 @@ * @memberOf _ * @alias foldl, inject * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var sum = _.reduce([1, 2, 3], function(sum, num) { @@ -3776,11 +3776,11 @@ * @memberOf _ * @alias foldr * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. * @example * * var list = [[0, 1], [2, 3], [4, 5]]; @@ -3812,12 +3812,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that failed the callback check. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of elements that failed the callback check. * @example * * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); @@ -3849,11 +3849,11 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to sample. - * @param {Number} [n] The number of elements to sample. - * @param- {Object} [guard] Allows working with functions, like `_.map`, + * @param {(array|object|string)} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {object} [guard] Allows working with functions, like `_.map`, * without using their `key` and `object` arguments as sources. - * @returns {Array} Returns the random sample(s) of `collection`. + * @returns {array} Returns the random sample(s) of `collection`. * @example * * _.sample([1, 2, 3, 4]); @@ -3881,8 +3881,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to shuffle. - * @returns {Array} Returns a new shuffled collection. + * @param {(array|object|string)} collection The collection to shuffle. + * @returns {array} Returns a new shuffled collection. * @example * * _.shuffle([1, 2, 3, 4, 5, 6]); @@ -3908,8 +3908,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to inspect. - * @returns {Number} Returns `collection.length` or number of own enumerable properties. + * @param {(array|object|string)} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * * _.size([1, 2]); @@ -3943,12 +3943,12 @@ * @memberOf _ * @alias any * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if any element passed the callback check, + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, * else `false`. * @example * @@ -4006,12 +4006,12 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called + * @param {(array|object|string)} collection The collection to iterate over. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of sorted elements. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -4053,8 +4053,8 @@ * @static * @memberOf _ * @category Collections - * @param {Array|Object|String} collection The collection to convert. - * @returns {Array} Returns the new converted array. + * @param {(array|object|string)} collection The collection to convert. + * @returns {array} Returns the new converted array. * @example * * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); @@ -4076,11 +4076,11 @@ * * @static * @memberOf _ - * @type Function + * @type function * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Array} Returns a new array of elements that have the given `properties`. + * @param {(array|object|string)} collection The collection to iterate over. + * @param {object} properties The object of property values to filter by. + * @returns {array} Returns a new array of elements that have the given `properties`. * @example * * var stooges = [ @@ -4105,8 +4105,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to compact. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to compact. + * @returns {array} Returns a new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); @@ -4133,9 +4133,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to process. - * @param {Array} [array1, array2, ...] The arrays of values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to process. + * @param {...array} [array] The arrays of values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); @@ -4178,12 +4178,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to search. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the index of the found element, else `-1`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the index of the found element, else `-1`. * @example * * _.findIndex(['apple', 'banana', 'beet'], function(food) { @@ -4211,12 +4211,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to search. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the index of the found element, else `-1`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the index of the found element, else `-1`. * @example * * _.findLastIndex(['apple', 'banana', 'beet'], function(food) { @@ -4252,13 +4252,13 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the first element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. * @example * * _.first([1, 2, 3]); @@ -4329,13 +4329,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to flatten. - * @param {Boolean} [isShallow=false] A flag to restrict flattening to a single level. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new flattened array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -4374,11 +4374,11 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {(boolean|number)} [fromIndex=0] The index to search from or `true` * to perform a binary search on a sorted array. - * @returns {Number} Returns the index of the matched value or `-1`. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.indexOf([1, 2, 3, 1, 2, 3], 2); @@ -4417,13 +4417,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -4482,8 +4482,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -4550,13 +4550,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback] The function called * per element or the number of elements to return. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the last element(s) of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. * @example * * _.last([1, 2, 3]); @@ -4618,10 +4618,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=array.length-1] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. + * @param {array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. * @example * * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); @@ -4650,9 +4650,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to modify. - * @param {Mixed} [value1, value2, ...] The values to remove. - * @returns {Array} Returns `array`. + * @param {array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {array} Returns `array`. * @example * * var array = [1, 2, 3, 1, 2, 3]; @@ -4687,10 +4687,10 @@ * @static * @memberOf _ * @category Arrays - * @param {Number} [start=0] The start of the range. - * @param {Number} end The end of the range. - * @param {Number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns a new range array. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {array} Returns a new range array. * @example * * _.range(10); @@ -4747,12 +4747,12 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to modify. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to modify. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of removed elements. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a new array of removed elements. * @example * * var array = [1, 2, 3, 4, 5, 6]; @@ -4799,13 +4799,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called + * @param {array} array The array to query. + * @param {(function|object|number|string)} [callback=1] The function called * per element or the number of elements to exclude. If a property name or * object is provided it will be used to create a "_.pluck" or "_.where" * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -4871,13 +4871,13 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to inspect. - * @param {Mixed} value The value to evaluate. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Number} Returns the index at which `value` should be inserted + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * @@ -4926,8 +4926,8 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} [array1, array2, ...] The arrays to inspect. - * @returns {Array} Returns an array of composite values. + * @param {...array} [array] The arrays to inspect. + * @returns {array} Returns an array of composite values. * @example * * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); @@ -4956,13 +4956,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that `array` is sorted. - * @param {Function|Object|String} [callback=identity] The function called + * @param {array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {(function|object|string)} [callback=identity] The function called * per iteration. If a property name or object is provided it will be used * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a duplicate-value-free array. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -5001,9 +5001,9 @@ * @static * @memberOf _ * @category Arrays - * @param {Array} array The array to filter. - * @param {Mixed} [value1, value2, ...] The values to exclude. - * @returns {Array} Returns a new array of filtered values. + * @param {array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -5022,8 +5022,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of grouped elements. + * @param {...array} [array] Arrays to process. + * @returns {array} Returns a new array of grouped elements. * @example * * _.zip(['moe', 'larry'], [30, 40], [true, false]); @@ -5050,9 +5050,9 @@ * @memberOf _ * @alias object * @category Arrays - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. - * @returns {Object} Returns an object composed of the given keys and + * @param {array} keys The array of keys. + * @param {array} [values=[]] The array of values. + * @returns {object} Returns an object composed of the given keys and * corresponding values. * @example * @@ -5084,10 +5084,10 @@ * @static * @memberOf _ * @category Functions - * @param {Number} n The number of times the function must be called before + * @param {number} n The number of times the function must be called before * `func` is executed. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var renderNotes = _.after(notes.length, render); @@ -5115,10 +5115,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to bind. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @param {function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -5142,10 +5142,10 @@ * @static * @memberOf _ * @category Functions - * @param {Object} object The object to bind and assign the bound methods to. - * @param {String} [methodName1, methodName2, ...] The object method names to + * @param {object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to * bind, specified as individual method names or arrays of method names. - * @returns {Object} Returns `object`. + * @returns {object} Returns `object`. * @example * * var view = { @@ -5179,10 +5179,10 @@ * @static * @memberOf _ * @category Functions - * @param {Object} object The object the method belongs to. - * @param {String} key The key of the method. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @param {object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new bound function. * @example * * var object = { @@ -5216,8 +5216,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} [func1, func2, ...] Functions to compose. - * @returns {Function} Returns the new composed function. + * @param {...function} [func] Functions to compose. + * @returns {function} Returns the new composed function. * @example * * var realNameMap = { @@ -5266,10 +5266,10 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {function} Returns a callback function. * @example * * var stooges = [ @@ -5335,9 +5335,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to curry. - * @param {Number} [arity=func.length] The arity of `func`. - * @returns {Function} Returns the new curried function. + * @param {function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {function} Returns the new curried function. * @example * * var curried = _.curry(function(a, b, c) { @@ -5372,13 +5372,13 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to debounce. - * @param {Number} wait The number of milliseconds to delay. - * @param {Object} options The options object. + * @param {function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {object} options The options object. * [leading=false] A boolean to specify execution on the leading edge of the timeout. * [maxWait] The maximum time `func` is allowed to be delayed before it's called. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. + * @returns {function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -5492,9 +5492,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to defer. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * _.defer(function() { console.log('deferred'); }); @@ -5524,10 +5524,10 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to delay. - * @param {Number} wait The number of milliseconds to delay execution. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. + * @param {function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. * @example * * var log = _.bind(console.log, console); @@ -5553,9 +5553,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] A function used to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @param {function} func The function to have its output memoized. + * @param {function} [resolver] A function used to resolve the cache key. + * @returns {function} Returns the new memoizing function. * @example * * var fibonacci = _.memoize(function(n) { @@ -5600,8 +5600,8 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @param {function} func The function to restrict. + * @returns {function} Returns the new restricted function. * @example * * var initialize = _.once(createApplication); @@ -5637,9 +5637,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @param {function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -5658,9 +5658,9 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @param {function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {function} Returns the new partially applied function. * @example * * var defaultsDeep = _.partialRight(_.merge, _.defaults); @@ -5696,12 +5696,12 @@ * @static * @memberOf _ * @category Functions - * @param {Function} func The function to throttle. - * @param {Number} wait The number of milliseconds to throttle executions to. - * @param {Object} options The options object. + * @param {function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {object} options The options object. * [leading=true] A boolean to specify execution on the leading edge of the timeout. * [trailing=true] A boolean to specify execution on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. + * @returns {function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -5745,9 +5745,9 @@ * @static * @memberOf _ * @category Functions - * @param {Mixed} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. + * @param {*} value The value to wrap. + * @param {function} wrapper The wrapper function. + * @returns {function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -5777,8 +5777,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to escape. - * @returns {String} Returns the escaped string. + * @param {string} string The string to escape. + * @returns {string} Returns the escaped string. * @example * * _.escape('Moe, Larry & Curly'); @@ -5794,8 +5794,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Mixed} value Any value. - * @returns {Mixed} Returns `value`. + * @param {*} value Any value. + * @returns {*} Returns `value`. * @example * * var moe = { 'name': 'moe' }; @@ -5813,8 +5813,8 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object of function properties to add to `lodash`. - * @param {Object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. + * @param {object} object The object of function properties to add to `lodash`. * @example * * _.mixin({ @@ -5862,7 +5862,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {Function} Returns the `lodash` function. + * @returns {function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -5883,9 +5883,9 @@ * @static * @memberOf _ * @category Utilities - * @param {String} value The value to parse. - * @param {Number} [radix] The radix used to interpret the value to parse. - * @returns {Number} Returns the new integer value. + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. * @example * * _.parseInt('08'); @@ -5904,9 +5904,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} [min=0] The minimum possible value. - * @param {Number} [max=1] The maximum possible value. - * @returns {Number} Returns a random number. + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @returns {number} Returns a random number. * @example * * _.random(0, 5); @@ -5941,9 +5941,9 @@ * @static * @memberOf _ * @category Utilities - * @param {Object} object The object to inspect. - * @param {String} property The property to get the value of. - * @returns {Mixed} Returns the resolved value. + * @param {object} object The object to inspect. + * @param {string} property The property to get the value of. + * @returns {*} Returns the resolved value. * @example * * var object = { @@ -5980,16 +5980,16 @@ * @static * @memberOf _ * @category Utilities - * @param {String} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} options The options object. + * @param {string} text The template text. + * @param {object} data The data object used to populate the text. + * @param {object} options The options object. * escape - The "escape" delimiter regexp. * evaluate - The "evaluate" delimiter regexp. * imports - An object of properties to import into the compiled template as local variables. * interpolate - The "interpolate" delimiter regexp. * sourceURL - The sourceURL of the template's compiled source. * variable - The data object variable name. - * @returns {Function|String} Returns a compiled function when no `data` object + * @returns {(function|string)} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -6160,10 +6160,10 @@ * @static * @memberOf _ * @category Utilities - * @param {Number} n The number of times to execute the callback. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns an array of the results of each `callback` execution. + * @param {number} n The number of times to execute the callback. + * @param {function} callback The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -6195,8 +6195,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} string The string to unescape. - * @returns {String} Returns the unescaped string. + * @param {string} string The string to unescape. + * @returns {string} Returns the unescaped string. * @example * * _.unescape('Moe, Larry & Curly'); @@ -6212,8 +6212,8 @@ * @static * @memberOf _ * @category Utilities - * @param {String} [prefix] The value to prefix the ID with. - * @returns {String} Returns the unique ID. + * @param {string} [prefix] The value to prefix the ID with. + * @returns {string} Returns the unique ID. * @example * * _.uniqueId('contact_'); @@ -6235,8 +6235,8 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to wrap. - * @returns {Object} Returns the wrapper object. + * @param {*} value The value to wrap. + * @returns {object} Returns the wrapper object. * @example * * var stooges = [ @@ -6266,9 +6266,9 @@ * @static * @memberOf _ * @category Chaining - * @param {Mixed} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {Mixed} Returns `value`. + * @param {*} value The value to provide to `interceptor`. + * @param {function} interceptor The function to invoke. + * @returns {*} Returns `value`. * @example * * _([1, 2, 3, 4]) @@ -6290,7 +6290,7 @@ * @name chain * @memberOf _ * @category Chaining - * @returns {Mixed} Returns the wrapper object. + * @returns {*} Returns the wrapper object. * @example * * var sum = _([1, 2, 3]) @@ -6310,7 +6310,7 @@ * @name toString * @memberOf _ * @category Chaining - * @returns {String} Returns the string result. + * @returns {string} Returns the string result. * @example * * _([1, 2, 3]).toString(); @@ -6327,7 +6327,7 @@ * @memberOf _ * @alias value * @category Chaining - * @returns {Mixed} Returns the wrapped value. + * @returns {*} Returns the wrapped value. * @example * * _([1, 2, 3]).valueOf(); @@ -6529,7 +6529,7 @@ * * @static * @memberOf _ - * @type String + * @type string */ lodash.VERSION = '1.3.1'; diff --git a/perf/perf-ui.js b/perf/perf-ui.js index add0f896b..1282e28ce 100644 --- a/perf/perf-ui.js +++ b/perf/perf-ui.js @@ -20,8 +20,8 @@ * * @private * @param {Element} element The element. - * @param {String} eventName The name of the event. - * @param {Function} handler The event handler. + * @param {string} eventName The name of the event. + * @param {function} handler The event handler. * @returns {Element} The element. */ function addListener(element, eventName, handler) { diff --git a/perf/perf.js b/perf/perf.js index 5c96325cb..c54896143 100644 --- a/perf/perf.js +++ b/perf/perf.js @@ -97,9 +97,9 @@ * it will be removed from the basename. * * @private - * @param {String} path The file path to inspect. - * @param {String} extension The extension to remove. - * @returns {String} Returns the basename. + * @param {string} path The file path to inspect. + * @param {string} extension The extension to remove. + * @returns {string} Returns the basename. */ function basename(filePath, extension) { var result = (filePath || '').split(rePathSeparator).pop(); @@ -113,8 +113,8 @@ * See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms. * * @private - * @param {Array} array The array of values. - * @returns {Number} The geometric mean. + * @param {array} array The array of values. + * @returns {number} The geometric mean. */ function getGeometricMean(array) { return Math.pow(Math.E, lodash.reduce(array, function(sum, x) { @@ -127,8 +127,8 @@ * margin of error. * * @private - * @param {Object} bench The benchmark object. - * @returns {Number} Returns the adjusted Hz. + * @param {object} bench The benchmark object. + * @returns {number} Returns the adjusted Hz. */ function getHz(bench) { var result = 1 / (bench.stats.mean + bench.stats.moe); @@ -141,9 +141,9 @@ * types of "object", "function", or "unknown". * * @private - * @param {Mixed} object The owner of the property. - * @param {String} property The property to check. - * @returns {Boolean} Returns `true` if the property value is a non-primitive, else `false`. + * @param {*} object The owner of the property. + * @param {string} property The property to check. + * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`. */ function isHostType(object, property) { if (object == null) { @@ -157,7 +157,7 @@ * Logs text to the console. * * @private - * @param {String} text The text to log. + * @param {string} text The text to log. */ function log(text) { console.log(text + ''); diff --git a/test/test-build.js b/test/test-build.js index 9b2d1d9bf..73d43c548 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -331,8 +331,8 @@ * Capitalizes a given string. * * @private - * @param {String} string The string to capitalize. - * @returns {String} Returns the capitalized string. + * @param {string} string The string to capitalize. + * @returns {string} Returns the capitalized string. */ function capitalize(string) { return string[0].toUpperCase() + string.slice(1); @@ -342,7 +342,7 @@ * Creates a context object to use with `vm.runInContext`. * * @private - * @returns {Object} Returns a new context object. + * @returns {object} Returns a new context object. */ function createContext() { return vm.createContext({ @@ -356,8 +356,8 @@ * Expands a list of function names to include real and alias names. * * @private - * @param {Array} funcNames The array of function names to expand. - * @returns {Array} Returns a new array of expanded function names. + * @param {array} funcNames The array of function names to expand. + * @returns {array} Returns a new array of expanded function names. */ function expandFuncNames(funcNames) { return funcNames.reduce(function(result, funcName) { @@ -371,8 +371,8 @@ * Gets the aliases associated with a given function name. * * @private - * @param {String} funcName The name of the function to get aliases for. - * @returns {Array} Returns an array of aliases. + * @param {string} funcName The name of the function to get aliases for. + * @returns {array} Returns an array of aliases. */ function getAliases(funcName) { return realToAliasMap[funcName] || []; @@ -382,8 +382,8 @@ * Gets the real name, not alias, of a given function name. * * @private - * @param {String} funcName The name of the function to resolve. - * @returns {String} Returns the real name. + * @param {string} funcName The name of the function to resolve. + * @returns {string} Returns the real name. */ function getRealName(funcName) { return aliasToRealMap[funcName] || funcName; @@ -393,9 +393,9 @@ * Tests if a given method can be called successfully. * * @private - * @param {Object} lodash The built Lo-Dash object. - * @param {String} funcName The name of the method to test. - * @param {String} message The unit test message. + * @param {object} lodash The built Lo-Dash object. + * @param {string} funcName The name of the method to test. + * @param {string} message The unit test message. */ function testMethod(lodash, methodName, message) { var pass = true, diff --git a/test/test-ui.js b/test/test-ui.js index 62f7eaf2f..d9a9ac8ca 100644 --- a/test/test-ui.js +++ b/test/test-ui.js @@ -20,8 +20,8 @@ * * @private * @param {Element} element The element. - * @param {String} eventName The name of the event. - * @param {Function} handler The event handler. + * @param {string} eventName The name of the event. + * @param {function} handler The event handler. * @returns {Element} The element. */ function addListener(element, eventName, handler) { diff --git a/test/test.js b/test/test.js index 3ca8f0436..b797c7a6e 100644 --- a/test/test.js +++ b/test/test.js @@ -109,7 +109,7 @@ * Skips a given number of tests with a passing result. * * @private - * @param {Number} [count=1] The number of tests to skip. + * @param {number} [count=1] The number of tests to skip. */ function skipTest(count) { count || (count = 1);