diff --git a/build.js b/build.js index 1be5c8550..1d59677ef 100644 --- a/build.js +++ b/build.js @@ -659,7 +659,7 @@ * * @private * @param {string} source The source to process. - * @param {array} [commands=[]] An array of commands. + * @param {Array} [commands=[]] An array of commands. * @returns {string} Returns the modified source. */ function addCommandsToHeader(source, commands) { @@ -822,7 +822,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, @@ -1085,7 +1085,7 @@ * each template file's basename. * * @private - * @param {object} state The build state object. + * @param {Object} state The build state object. * @returns {string} Returns the compiled source. */ function buildTemplate(state) { @@ -1218,7 +1218,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 @@ -1293,8 +1293,8 @@ * * @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 {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]; @@ -1309,7 +1309,7 @@ * * @private * @param {string} identifier The identifier to query. - * @param {object} [depMap] The dependency map used to resolve the identifier. + * @param {Object} [depMap] The dependency map used to resolve the identifier. * @returns {string} Returns the identifier's category. */ function getCategory(identifier, depMap) { @@ -1348,9 +1348,9 @@ * * @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 {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]; @@ -1375,11 +1375,11 @@ * dependencies plus any additional detected sub-dependencies. * * @private - * @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 {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. + * @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 @@ -1420,8 +1420,8 @@ * 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. + * @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) { @@ -1445,7 +1445,7 @@ * Gets the indent of the given function. * * @private - * @param {function} func The function to process. + * @param {Function} func The function to process. * @returns {string} Returns the indent. */ function getIndent(func) { @@ -1506,7 +1506,7 @@ * * @private * @param {string} category The category to filter by. - * @returns {array} Returns a new array of names. + * @returns {Array} Returns a new array of names. */ function getNamesByCategory(category) { return categoryMap[category] || []; @@ -1517,7 +1517,7 @@ * * @private * @param {string} funcName The name of the function to resolve. - * @param {object} [depMap] The dependency map used to validate the real name. + * @param {Object} [depMap] The dependency map used to validate the real name. * @returns {string} Returns the real function name. */ function getRealName(funcName, depMap) { @@ -1546,7 +1546,7 @@ * @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. + * @returns {Array} Returns a new array of variable names. */ function getVars(source, isShallow) { var indentA = isShallow ? ' {2}' : ' {2,4}', @@ -1621,7 +1621,7 @@ }, null); return result && ( - /@type +function\b/i.test(result[0]) || + /@type +Function\b/i.test(result[0]) || /(?:function(?:\s+\w+)?\b|create[A-Z][a-z]+|template)\(/.test(result[1])) ? (leadingComments ? result[0] : '') + result[1] : ''; @@ -1691,7 +1691,7 @@ * * @private * @param {string} value The option to convert. - * @returns {array} Returns the new converted array. + * @returns {Array} Returns the new converted array. */ function optionToArray(value) { return _.compact(_.isArray(value) @@ -1705,8 +1705,8 @@ * * @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 {Object} [depMap] The dependency map used to resolve real names. + * @returns {Array} Returns the new converted array. */ function optionToMethodsArray(value, depMap) { depMap || (depMap = funcDependencyMap); @@ -2513,8 +2513,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 = []); @@ -3498,8 +3498,8 @@ ' * @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.', + ' * @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', ' *', diff --git a/build/minify.js b/build/minify.js index 1f13d68ab..245a6dfe9 100755 --- a/build/minify.js +++ b/build/minify.js @@ -72,16 +72,16 @@ * callback when finished. The `onComplete` callback is invoked with one * argument; (outputSource). * - * @param {(string|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. - * outputPath - Write output to a given path/filename. - * isSilent - Skip status updates normally logged to the console. - * isTemplate - Applies template specific minifier options. - * onComplete - The function called once minification has finished. + * @param {Object} [options={}] The options object. + * @param {string} [options.outputPath] Write output to a given path/filename. + * @param {boolean} [options.isSilent] Skip status updates normally logged to the console. + * @param {boolean} [options.isTemplate] Applies template specific minifier options. + * @param {Function} [options.onComplete] The function called once minification has finished. */ function minify(source, options) { // used to specify the source map URL @@ -206,7 +206,7 @@ * @private * @constructor * @param {string} source The source to minify. - * @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. @@ -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 = []; @@ -368,7 +368,7 @@ * @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 {Function} callback The function called once the process has completed. */ function closureCompile(source, mode, callback) { var filePath = this.filePath, @@ -468,7 +468,7 @@ * @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 {Function} callback The function called once the process has completed. */ function uglify(source, label, callback) { if (!this.isSilent) { @@ -520,7 +520,7 @@ * The Closure Compiler callback for simple optimizations. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {string} result The resulting minified source. * @param {string} map The source map output. */ @@ -540,7 +540,7 @@ * The Closure Compiler `gzip` callback for simple optimizations. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onClosureSimpleGzip(exception, result) { @@ -565,7 +565,7 @@ * The Closure Compiler callback for advanced optimizations. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {string} result The resulting minified source. * @param {string} map The source map output. */ @@ -585,7 +585,7 @@ * The Closure Compiler `gzip` callback for advanced optimizations. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onClosureAdvancedGzip(exception, result) { @@ -610,7 +610,7 @@ * The UglifyJS callback. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {string} result The resulting minified source. */ function onUglify(exception, result) { @@ -626,7 +626,7 @@ * The UglifyJS `gzip` callback. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onUglifyGzip(exception, result) { @@ -656,7 +656,7 @@ * The hybrid callback for simple optimizations. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {string} result The resulting minified source. */ function onSimpleHybrid(exception, result) { @@ -672,7 +672,7 @@ * The hybrid `gzip` callback for simple optimizations. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {Buffer} result The resulting gzipped source. */ function onSimpleHybridGzip(exception, result) { @@ -697,7 +697,7 @@ * The hybrid callback for advanced optimizations. * * @private - * @param {object} [exception] The error object. + * @param {Object} [exception] The error object. * @param {string} result The resulting minified source. */ function onAdvancedHybrid(exception, result) { @@ -713,7 +713,7 @@ * The hybrid `gzip` callback for advanced optimizations. * * @private - * @param {object} [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/pre-compile.js b/build/pre-compile.js index a723632a1..7c22f7cb4 100644 --- a/build/pre-compile.js +++ b/build/pre-compile.js @@ -274,7 +274,7 @@ * Pre-process a given Lo-Dash `source`, preparing it for minification. * * @param {string} [source=''] The source to process. - * @param {object} [options={}] The options object. + * @param {Object} [options={}] The options object. * @returns {string} Returns the processed source. */ function preprocess(source, options) { diff --git a/build/util.js b/build/util.js index 7b4974203..ff58cb57a 100755 --- a/build/util.js +++ b/build/util.js @@ -41,7 +41,7 @@ * * @memberOf util.fs * @param {string} dirname The path of the directory. - * @param {(number|string)} [mode='0777'] The permission mode. + * @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 9e455822d..c7c3b702a 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -151,7 +151,7 @@ * or `fromIndex` constraints. * * @private - * @param {array} array The array to search. + * @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`. @@ -173,7 +173,7 @@ * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. * * @private - * @param {object} cache The cache object to inspect. + * @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`. */ @@ -239,8 +239,8 @@ * them in ascending order. * * @private - * @param {object} a The object to compare to `b`. - * @param {object} b The object to compare to `a`. + * @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) { @@ -268,8 +268,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, @@ -310,7 +310,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() || []; @@ -320,7 +320,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() || { @@ -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 {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. + * @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 @@ -602,7 +602,7 @@ * @constructor * @category Chaining * @param {*} value The value to wrap in a `lodash` instance. - * @returns {object} Returns a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -637,7 +637,7 @@ * @private * @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. + * @returns {Object} Returns a `lodash` instance. */ function lodashWrapper(value, chainAll) { this.__chain__ = !!chainAll; @@ -651,7 +651,7 @@ * * @static * @memberOf _ - * @type object + * @type Object */ var support = lodash.support = {}; @@ -785,7 +785,7 @@ * * @static * @memberOf _ - * @type object + * @type Object */ lodash.templateSettings = { @@ -793,7 +793,7 @@ * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'escape': /<%-([\s\S]+?)%>/g, @@ -801,7 +801,7 @@ * Used to detect code to be evaluated. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'evaluate': /<%([\s\S]+?)%>/g, @@ -809,7 +809,7 @@ * Used to detect `data` property values to inject. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'interpolate': reInterpolate, @@ -825,7 +825,7 @@ * Used to import variables into the compiled template. * * @memberOf _.templateSettings - * @type object + * @type Object */ 'imports': { @@ -833,7 +833,7 @@ * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports - * @type function + * @type Function */ '_': lodash } @@ -845,7 +845,7 @@ * The template used to create iterator functions. * * @private - * @param {object} data The data object used to populate the text. + * @param {Object} data The data object used to populate the text. * @returns {string} Returns the interpolated text. */ var iteratorTemplate = function(obj) { @@ -948,9 +948,9 @@ * @private * @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. + * @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) { @@ -1039,7 +1039,7 @@ * @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. + * @returns {Function} Returns a callback function. */ function baseCreateCallback(func, thisArg, argCount) { if (typeof func != 'function') { @@ -1081,11 +1081,11 @@ * shorthands or `thisArg` binding. * * @private - * @param {array} array The array to flatten. + * @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. + * @returns {Array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -1111,10 +1111,10 @@ * @private * @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. + * @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) { @@ -1278,11 +1278,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) { @@ -1343,10 +1343,10 @@ * or `thisArg` binding. * * @private - * @param {array} array The array to process. + * @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 {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. */ function baseUniq(array, isSorted, callback) { var index = -1, @@ -1397,8 +1397,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) { @@ -1427,7 +1427,7 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {(function|string)} func The function or method name to reference. + * @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` @@ -1436,13 +1436,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 {*} [thisArg] The `this` binding of `func`. * @param {number} [arity] The arity of `func`. - * @returns {function} Returns the new bound function. + * @returns {Function} Returns the new bound function. */ function createBound(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { var isBind = bitmask & 1, @@ -1536,15 +1536,15 @@ * Creates compiled iteration functions. * * @private - * @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. - * args - A string of comma separated arguments the iteration function will accept. - * 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. + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. */ function createIterator() { var data = getObject(); @@ -1588,8 +1588,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) : {}; @@ -1623,7 +1623,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; @@ -1634,7 +1634,7 @@ * Sets `this` binding data on a given function. * * @private - * @param {function} func The function to set data on. + * @param {Function} func The function to set data on. * @param {*} value The value to set. */ var setBindData = !defineProperty ? noop : function(func, value) { @@ -1728,7 +1728,7 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects * @param {*} value The value to check. * @returns {boolean} Returns `true` if the `value` is an array, else `false`. @@ -1749,9 +1749,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', @@ -1766,8 +1766,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 }); @@ -1845,11 +1845,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. + * @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`. + * @returns {Array|Object|string} Returns `collection`. */ var baseEach = createIterator(eachIteratorOptions); @@ -1864,14 +1864,14 @@ * * @static * @memberOf _ - * @type function + * @type Function * @alias extend * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] The source objects. - * @param {function} [callback] The function to customize assigning values. + * @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. + * @returns {Object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -1910,7 +1910,7 @@ * @category Objects * @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 {Function} [callback] The function to customize cloning values. * @param {*} [thisArg] The `this` binding of `callback`. * @returns {*} Returns the cloned `value`. * @example @@ -1964,7 +1964,7 @@ * @memberOf _ * @category Objects * @param {*} value The value to deep clone. - * @param {function} [callback] The function to customize cloning values. + * @param {Function} [callback] The function to customize cloning values. * @param {*} [thisArg] The `this` binding of `callback`. * @returns {*} Returns the deep cloned `value`. * @example @@ -2001,13 +2001,13 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] 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' }; @@ -2023,8 +2023,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2055,8 +2055,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2088,12 +2088,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 {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`. + * @returns {Object} Returns `object`. * @example * * function Dog(name) { @@ -2120,10 +2120,10 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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`. + * @returns {Object} Returns `object`. * @example * * function Dog(name) { @@ -2164,12 +2164,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 {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`. + * @returns {Object} Returns `object`. * @example * * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2186,10 +2186,10 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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`. + * @returns {Object} Returns `object`. * @example * * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2219,8 +2219,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(_); @@ -2243,7 +2243,7 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to check. + * @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 @@ -2261,8 +2261,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' }); @@ -2340,7 +2340,7 @@ * @static * @memberOf _ * @category Objects - * @param {(array|object|string)} value The value to inspect. + * @param {Array|Object|string} value The value to inspect. * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * @@ -2384,7 +2384,7 @@ * @category Objects * @param {*} a The value to compare. * @param {*} b The other value to compare. - * @param {function} [callback] The function to customize comparing values. + * @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 @@ -2666,11 +2666,11 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] The source objects. - * @param {function} [callback] The function to customize merging properties. + * @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. + * @returns {Object} Returns the destination object. * @example * * var names = { @@ -2746,11 +2746,11 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The source object. - * @param {(function|...string|string[])} [callback] The properties to omit or the + * @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. + * @returns {Object} Returns an object without the omitted properties. * @example * * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); @@ -2789,8 +2789,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 }); @@ -2820,12 +2820,12 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The source object. - * @param {(function|...string|string[])} [callback] The function called per + * @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. + * @returns {Object} Returns an object composed of the picked properties. * @example * * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); @@ -2871,8 +2871,8 @@ * @static * @memberOf _ * @category Objects - * @param {(array|object)} collection The collection to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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. @@ -2917,8 +2917,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 }); @@ -2946,10 +2946,10 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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 * @@ -2984,7 +2984,7 @@ * @memberOf _ * @alias include * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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`. @@ -3041,12 +3041,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3078,8 +3078,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3140,12 +3140,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that passed the callback check. + * @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; }); @@ -3204,8 +3204,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3263,8 +3263,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3298,10 +3298,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 {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`. + * @returns {Array|Object|string} Returns `collection`. * @example * * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); @@ -3334,10 +3334,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 {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`. + * @returns {Array|Object|string} Returns `collection`. * @example * * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); @@ -3386,12 +3386,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3425,12 +3425,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * var keys = [ @@ -3460,11 +3460,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 {...*} [arg] Arguments to invoke the method with. - * @returns {array} Returns a new array of the results of each invoked method. + * @returns {Array} Returns a new array of the results of each invoked method. * @example * * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); @@ -3502,12 +3502,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of the results of each `callback` execution. + * @returns {Array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -3559,8 +3559,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3628,8 +3628,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3686,11 +3686,11 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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. + * @returns {Array} Returns a new array of property values. * @example * * var stooges = [ @@ -3715,8 +3715,8 @@ * @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 {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. @@ -3765,8 +3765,8 @@ * @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 {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. @@ -3801,12 +3801,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that failed the callback check. + * @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; }); @@ -3838,11 +3838,11 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to sample. + * @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- {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]); @@ -3870,8 +3870,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]); @@ -3897,7 +3897,7 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * @@ -3932,8 +3932,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3995,12 +3995,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of sorted elements. + * @returns {Array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -4042,8 +4042,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); @@ -4065,11 +4065,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 = [ @@ -4094,8 +4094,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]); @@ -4122,9 +4122,9 @@ * @static * @memberOf _ * @category Arrays - * @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. + * @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]); @@ -4167,8 +4167,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4200,8 +4200,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4241,8 +4241,8 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -4318,13 +4318,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to flatten. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new flattened array. + * @returns {Array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -4363,9 +4363,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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` + * @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`. * @example @@ -4406,13 +4406,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -4471,8 +4471,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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]); @@ -4539,8 +4539,8 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -4607,7 +4607,7 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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`. @@ -4639,9 +4639,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to modify. + * @param {Array} array The array to modify. * @param {...*} [value] The values to remove. - * @returns {array} Returns `array`. + * @returns {Array} Returns `array`. * @example * * var array = [1, 2, 3, 1, 2, 3]; @@ -4679,7 +4679,7 @@ * @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. + * @returns {Array} Returns a new range array. * @example * * _.range(10); @@ -4736,12 +4736,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of removed elements. + * @returns {Array} Returns a new array of removed elements. * @example * * var array = [1, 2, 3, 4, 5, 6]; @@ -4788,13 +4788,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -4860,9 +4860,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to inspect. + * @param {Array} array The array to inspect. * @param {*} value The value to evaluate. - * @param {(function|object|string)} [callback=identity] The function called + * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4915,8 +4915,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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]); @@ -4945,13 +4945,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {array} array The array to process. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a duplicate-value-free array. + * @returns {Array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -4990,9 +4990,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to filter. + * @param {Array} array The array to filter. * @param {...*} [value] The values to exclude. - * @returns {array} Returns a new array of filtered values. + * @returns {Array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -5011,8 +5011,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {...array} [array] 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]); @@ -5039,9 +5039,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 * @@ -5075,8 +5075,8 @@ * @category Functions * @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); @@ -5104,10 +5104,10 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to bind. + * @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. + * @returns {Function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -5119,7 +5119,9 @@ * // => 'hi moe' */ function bind(func, thisArg) { - return createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg); + return arguments.length > 2 + ? createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg) + : createBound(func, 1, null, null, thisArg); } /** @@ -5131,10 +5133,10 @@ * @static * @memberOf _ * @category Functions - * @param {object} object The object to bind and assign the bound methods 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 = { @@ -5168,10 +5170,10 @@ * @static * @memberOf _ * @category Functions - * @param {object} object The object the method belongs to. + * @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. + * @returns {Function} Returns the new bound function. * @example * * var object = { @@ -5193,7 +5195,9 @@ * // => 'hi, moe!' */ function bindKey(object, key) { - return createBound(key, 19, nativeSlice.call(arguments, 2), null, object); + return arguments.length > 2 + ? createBound(key, 19, nativeSlice.call(arguments, 2), null, object) + : createBound(key, 3, null, null, object); } /** @@ -5205,8 +5209,8 @@ * @static * @memberOf _ * @category Functions - * @param {...function} [func] 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 = { @@ -5258,7 +5262,7 @@ * @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. + * @returns {Function} Returns a callback function. * @example * * var stooges = [ @@ -5324,9 +5328,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to curry. + * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. - * @returns {function} Returns the new curried function. + * @returns {Function} Returns the new curried function. * @example * * var curried = _.curry(function(a, b, c) { @@ -5361,13 +5365,13 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to debounce. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -5481,7 +5485,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to defer. + * @param {Function} func The function to defer. * @param {...*} [arg] Arguments to invoke the function with. * @returns {number} Returns the timer id. * @example @@ -5513,7 +5517,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to delay. + * @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. @@ -5542,9 +5546,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) { @@ -5589,8 +5593,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); @@ -5626,9 +5630,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to partially apply arguments to. + * @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. + * @returns {Function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -5647,9 +5651,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to partially apply arguments to. + * @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. + * @returns {Function} Returns the new partially applied function. * @example * * var defaultsDeep = _.partialRight(_.merge, _.defaults); @@ -5685,12 +5689,12 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to throttle. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -5735,8 +5739,8 @@ * @memberOf _ * @category Functions * @param {*} value The value to wrap. - * @param {function} wrapper The wrapper function. - * @returns {function} Returns the new function. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -5802,8 +5806,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({ @@ -5851,7 +5855,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {function} Returns the `lodash` function. + * @returns {Function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -5930,7 +5934,7 @@ * @static * @memberOf _ * @category Utilities - * @param {object} object The object to inspect. + * @param {Object} object The object to inspect. * @param {string} property The property to get the value of. * @returns {*} Returns the resolved value. * @example @@ -5970,15 +5974,15 @@ * @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. - * 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 + * @param {Object} data The data object used to populate the text. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as local variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [sourceURL] The sourceURL of the template's compiled source. + * @param {string} [variable] The data object variable name. + * @returns {Function|string} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -6150,9 +6154,9 @@ * @memberOf _ * @category Utilities * @param {number} n The number of times to execute the callback. - * @param {function} callback The function called per iteration. + * @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. + * @returns {Array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -6225,7 +6229,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to wrap. - * @returns {object} Returns the wrapper object. + * @returns {Object} Returns the wrapper object. * @example * * var stooges = [ @@ -6256,7 +6260,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to provide to `interceptor`. - * @param {function} interceptor The function to invoke. + * @param {Function} interceptor The function to invoke. * @returns {*} Returns `value`. * @example * diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index cb067d53d..53eec1c1a 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -3,54 +3,54 @@ * Lo-Dash 1.3.1 (Custom Build) lodash.com/license | Underscore.js 1.5.1 underscorejs.org/LICENSE * Build: `lodash -o ./dist/lodash.compat.js` */ -;!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=C&&f===n,h=u||g?i():c; -if(g){var v=o(h);v?(f=t,h=v):(g=d,h=u?h:(p(h),c))}for(;++af(h,y))&&((u||g)&&h.push(y),c.push(v))}return g?(p(h.b),s(h)):u&&p(h),c}function at(n){return function(t,e,r){var u={};if(e=_.createCallback(e,r,3),Ge(t)){r=-1;for(var o=t.length;++rk;k++)r+="n='"+n.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",n.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+n.g+"}"; -r+="}"}return(n.b||Ke.nonEnumArgs)&&(r+="}"),r+=n.c+";return E",t=t("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",e+r+"}"),s(n),t(Y,G,fe,de,j,ht,Ge,wt,n.f,le,X,qe,V,ce,xe)}function lt(n){return _t(n)?Se(n):{}}function ct(n){return Qe[n]}function pt(){var t=(t=_.indexOf)===zt?n:t;return t}function st(n){var t,e;return!n||xe.call(n)!=H||(t=n.constructor,dt(t)&&!(t instanceof t))||!Ke.argsClass&&ht(n)||!Ke.nodeClass&&l(n)?d:Ke.ownLast?(rr(n,function(n,t,r){return e=de.call(r,t),d}),e!==false):(rr(n,function(n,t){e=t -}),e===v||de.call(n,e))}function gt(n){return Xe[n]}function ht(n){return n&&typeof n=="object"?xe.call(n)==T:d}function vt(n,t,e){var r=Me(n),u=r.length;for(t=Y(t,e,3);u--&&(e=r[u],!(t(n[e],e,n)===false)););return n}function yt(n){var t=[];return rr(n,function(n,e){dt(n)&&t.push(e)}),t.sort()}function mt(n){for(var t=-1,e=Me(n),r=e.length,u={};++te?Pe(0,o+e):e)||0,o&&typeof o=="number"?a=-1<(wt(n)?n.indexOf(t,e):u(n,t,e)):nr(n,function(n){return++ro&&(o=i)}}else t=!t&&wt(n)?r:_.createCallback(t,e,3),nr(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Bt(n,t,e,r){var u=3>arguments.length;if(t=Y(t,r,4),Ge(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++oarguments.length;return t=Y(t,r,4),St(n,function(n,r,o){e=u?(u=d,n):t(e,n,r,o)}),e}function Pt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e=="number"?e:0); -return Ot(n,function(n){var e=Vt(++t);r[t]=r[e],r[e]=n}),r}function Nt(n,t,e){var r;if(t=_.createCallback(t,e,3),Ge(n)){e=-1;for(var u=n.length;++e=C&&u===n;if(l){var c=o(i);c?(u=t,i=c):l=d}for(;++ru(i,c)&&f.push(c);return l&&s(i),f -}function $t(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&t!=m){var o=-1;for(t=_.createCallback(t,e,3);++or?Pe(0,u+r):r||0}else if(r)return r=Tt(t,e),t[r]===e?r:-1;return n(t,e,r)}function Lt(n,t,e){if(typeof t!="number"&&t!=m){var r=0,u=-1,o=n?n.length:0;for(t=_.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++tl&&(a=n.apply(f,o)); -else{!s&&!v&&(c=i);var e=p-(i-c);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:P,variable:"",imports:{_:_}},Se||(lt=function(n){if(_t(n)){c.prototype=n;var t=new c;c.prototype=m}return t||{}});var We=Ee?function(n,t){var e=f();e.value=t,Ee(n,"__bindData__",e),s(e)}:c;Ke.argsClass||(ht=function(n){return n&&typeof n=="object"?de.call(n,"callee"):d});var Ge=Ae||function(n){return n&&typeof n=="object"?xe.call(n)==q:d -},Je=ft({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),Me=De?function(n){return _t(n)?Ke.enumPrototypes&&typeof n=="function"||Ke.nonEnumArgs&&n.length&&ht(n)?Je(n):De(n):[]}:Je,He={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:Me,g:"if(e(t[n],n,g)===false)return E"},Ue={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b":">",'"':""","'":"'"},Xe=mt(Qe),Ye=ue("("+Me(Xe).join("|")+")","g"),Ze=ue("["+Me(Qe).join("")+"]","g"),nr=ft(He),tr=ft(Ue,{i:Ue.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),er=ft(Ue),rr=ft(He,Ve,{j:d}),ur=ft(He,Ve); -dt(/x/)&&(dt=function(n){return typeof n=="function"&&xe.call(n)==J});var or=me?function(n){if(!n||xe.call(n)!=H||!Ke.argsClass&&ht(n))return d;var t=n.valueOf,e=typeof t=="function"&&(e=me(t))&&me(e);return e?n==e||me(n)==e:st(n)}:st,ar=at(function(n,t,e){de.call(n,e)?n[e]++:n[e]=1}),ir=at(function(n,t,e){(de.call(n,e)?n[e]:n[e]=[]).push(t)}),fr=at(function(n,t,e){n[e]=t}),lr=At;Le&&tt&&typeof we=="function"&&(Mt=function(n){if(!dt(n))throw new ae;return we.apply(e,arguments)});var cr=8==Re(O+"08")?Re:function(n,t){return Re(wt(n)?n.replace(N,""):n,t||0) -};return _.after=function(n,t){if(!dt(t))throw new ae;return function(){return 1>--n?t.apply(this,arguments):void 0}},_.assign=tr,_.at=function(n){var t=arguments,e=-1,r=nt(t,y,d,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);for(Ke.unindexedChars&&wt(n)&&(n=n.split(""));++e=C&&o(a?r[a]:v)}n:for(;++l(m?t(m,y):c(v,y))){for(a=u,(m||v).push(y);--a;)if(m=f[a],0>(m?t(m,y):c(r[a],y)))continue n;h.push(y)}}for(;u--;)(m=f[u])&&s(m);return p(f),p(v),h},_.invert=mt,_.invoke=function(n,t){var e=$e.call(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Xt(typeof o=="number"?o:0);return Ot(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},_.keys=Me,_.map=At,_.max=It,_.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):x+arguments[0]; -return de.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!dt(n))throw new ae;return e.cache={},e},_.merge=function(n){var t=arguments,e=2;if(!_t(n))return n;if("number"!=typeof t[2]&&(e=t.length),3r(a,e))&&(o[e]=n)}),o},_.once=function(n){var t,e;if(!dt(n))throw new ae;return function(){return t?e:(t=y,e=n.apply(this,arguments),n=m,e)}},_.pairs=function(n){for(var t=-1,e=Me(n),r=e.length,u=Xt(r);++te?Pe(0,r+e):Ne(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},_.mixin=Ut,_.noConflict=function(){return e._=pe,this},_.parseInt=cr,_.random=Vt,_.reduce=Bt,_.reduceRight=Dt,_.result=function(n,t){var e=n?n[t]:v;return dt(e)?n[t]():e},_.runInContext=h,_.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Me(n).length},_.some=Nt,_.sortedIndex=Tt,_.template=function(n,t,e){var r=_.templateSettings; -n||(n=""),e=er({},e,r);var u,o=er({},e.imports,r.imports),r=Me(o),o=jt(o),i=0,f=e.interpolate||R,l="__p+='",f=ue((e.escape||R).source+"|"+f.source+"|"+(f===P?B:R).source+"|"+(e.evaluate||R).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(i,c).replace($,a),e&&(l+="'+__e("+e+")+'"),f&&(u=y,l+="';"+f+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t}),l+="';\n",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(S,""):l).replace(A,"$1").replace(I,"$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(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},_.unescape=function(n){return n==m?"":oe(n).replace(Ye,gt)},_.uniqueId=function(n){var t=++w;return oe(n==m?"":n)+t},_.all=xt,_.any=Nt,_.detect=Et,_.findWhere=Et,_.foldl=Bt,_.foldr=Dt,_.include=kt,_.inject=Bt,ur(_,function(n,t){_.prototype[t]||(_.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return _e.apply(t,arguments),t=n.apply(_,t),e?new b(t,e):t})}),_.first=$t,_.last=function(n,t,e){if(n){var r=0,u=n.length; -if(typeof t!="number"&&t!=m){var o=u;for(t=_.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,r==m||e)return n[u-1];return g(n,Pe(0,u-r))}},_.sample=function(n,t,e){return Ge(n)||(n=Rt(n)),t==m||e?n[Vt(n.length-1)]:(n=Pt(n),n.length=Ne(Pe(0,t),n.length),n)},_.take=$t,_.head=$t,ur(_,function(n,t){var e="sample"!==t;_.prototype[t]||(_.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||t!=m&&(!r||e&&typeof t=="function")?new b(o,u):o})}),_.VERSION="1.3.1",_.prototype.chain=function(){return this.__chain__=y,this -},_.prototype.toString=function(){return oe(this.__wrapped__)},_.prototype.value=Qt,_.prototype.valueOf=Qt,nr(["join","pop","shift"],function(n){var t=ie[n];_.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new b(e,n):e}}),nr(["push","reverse","sort","unshift"],function(n){var t=ie[n];_.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),nr(["concat","slice","splice"],function(n){var t=ie[n];_.prototype[n]=function(){return new b(t.apply(this.__wrapped__,arguments),this.__chain__) -}}),Ke.spliceObjects||nr(["pop","shift","splice"],function(n){var t=ie[n],e="splice"==n;_.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new b(u,n):u}}),_}var v,y=!0,m=null,d=!1,_=[],b=[],w=0,j={},x=+new Date+"",C=75,E=40,O=" \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",S=/\b__p\+='';/g,A=/\b(__p\+=)''\+/g,I=/(__e\(.*?\)|\b__t\))\+'';/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,D=/\w*$/,P=/<%=([\s\S]+?)%>/g,N=RegExp("^["+O+"]*0+(?=.$)"),R=/($^)/,F=(F=/\bthis\b/)&&F.test(h)&&F,$=/['\n\r\t\u2028\u2029\\]/g,z="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),L="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),T="[object Arguments]",q="[object Array]",K="[object Boolean]",W="[object Date]",G="[object Error]",J="[object Function]",M="[object Number]",H="[object Object]",U="[object RegExp]",V="[object String]",Q={}; -Q[J]=d,Q[T]=Q[q]=Q[K]=Q[W]=Q[M]=Q[H]=Q[U]=Q[V]=y;var X={"boolean":d,"function":y,object:y,number:d,string:d,undefined:d},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Z=X[typeof window]&&window||this,nt=X[typeof exports]&&exports,tt=X[typeof module]&&module&&module.exports==nt&&module,et=X[typeof global]&&global;!et||et.global!==et&&et.window!==et||(Z=et);var rt=h();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Z._=rt, define(function(){return rt -})):nt&&!nt.nodeType?tt?(tt.exports=rt)._=rt:nt._=rt:Z._=rt}.call(this); \ No newline at end of file +;(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=w&&l===n,h=u||g?i():c; +if(g){var v=o(h);v?(l=t,h=v):(g=!1,h=u?h:(p(h),c))}for(;++al(h,y))&&((u||g)&&h.push(y),c.push(v))}return g?(p(h.b),s(h)):u&&p(h),c}function rt(n){return function(t,e,r){var u={};if(e=y.createCallback(e,r,3),qe(t)){r=-1;for(var o=t.length;++rk;k++)r+="n='"+n.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",n.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+n.g+"}"; +r+="}"}return(n.b||Le.nonEnumArgs)&&(r+="}"),r+=n.c+";return E",t=t("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",e+r+"}"),s(n),t(V,q,oe,ve,_,pt,qe,dt,n.f,ae,U,ze,M,ie,we)}function at(n){return yt(n)?Ce(n):{}}function it(n){return He[n]}function lt(){var t=(t=y.indexOf)===Rt?n:t;return t}function ft(n){var t,e;return!n||we.call(n)!=G||(t=n.constructor,vt(t)&&!(t instanceof t))||!Le.argsClass&&pt(n)||!Le.nodeClass&&f(n)?!1:Le.ownLast?(nr(n,function(n,t,r){return e=ve.call(r,t),!1}),false!==e):(nr(n,function(n,t){e=t +}),e===v||ve.call(n,e))}function ct(n){return Ue[n]}function pt(n){return n&&typeof n=="object"?we.call(n)==$:!1}function st(n,t,e){var r=We(n),u=r.length;for(t=V(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function gt(n){var t=[];return nr(n,function(n,e){vt(n)&&t.push(e)}),t.sort()}function ht(n){for(var t=-1,e=We(n),r=e.length,u={};++te?Ie(0,o+e):e)||0,o&&typeof o=="number"?a=-1<(dt(n)?n.indexOf(t,e):u(n,t,e)):Xe(n,function(n){return++ro&&(o=i)}}else t=!t&&dt(n)?r:y.createCallback(t,e,3),Xe(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function St(n,t,e,r){var u=3>arguments.length;if(t=V(t,r,4),qe(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++oarguments.length;return t=V(t,r,4),Ct(n,function(n,r,o){e=u?(u=!1,n):t(e,n,r,o)}),e}function It(n){var t=-1,e=n?n.length:0,r=Ut(typeof e=="number"?e:0); +return xt(n,function(n){var e=Mt(++t);r[t]=r[e],r[e]=n}),r}function Bt(n,t,e){var r;if(t=y.createCallback(t,e,3),qe(n)){e=-1;for(var u=n.length;++e=w&&u===n;if(f){var c=o(i);c?(u=t,i=c):f=!1}for(;++ru(i,c)&&l.push(c);return f&&s(i),l +}function Nt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=y.createCallback(t,e,3);++or?Ie(0,u+r):r||0}else if(r)return r=$t(t,e),t[r]===e?r:-1;return n(t,e,r)}function Ft(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=y.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++ti&&(u=n.apply(a,r));else{c||g||(l=o);var e=f-(o-l);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:I,variable:"",imports:{_:y}},Ce||(at=function(n){if(yt(n)){c.prototype=n;var t=new c;c.prototype=null}return t||{}});var Te=ke?function(n,t){var e=l();e.value=t,ke(n,"__bindData__",e),s(e)}:c;Le.argsClass||(pt=function(n){return n&&typeof n=="object"?ve.call(n,"callee"):!1});var qe=Ee||function(n){return n&&typeof n=="object"?we.call(n)==z:!1 +},Ke=ot({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),We=Ae?function(n){return yt(n)?Le.enumPrototypes&&typeof n=="function"||Le.nonEnumArgs&&n.length&&pt(n)?Ke(n):Ae(n):[]}:Ke,Ge={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:We,g:"if(e(t[n],n,g)===false)return E"},Je={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b":">",'"':""","'":"'"},Ue=ht(He),Ve=te("("+We(Ue).join("|")+")","g"),Qe=te("["+We(He).join("")+"]","g"),Xe=ot(Ge),Ye=ot(Je,{i:Je.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),Ze=ot(Je),nr=ot(Ge,Me,{j:!1}),tr=ot(Ge,Me); +vt(/x/)&&(vt=function(n){return typeof n=="function"&&we.call(n)==K});var er=he?function(n){if(!n||we.call(n)!=G||!Le.argsClass&&pt(n))return!1;var t=n.valueOf,e=typeof t=="function"&&(e=he(t))&&he(e);return e?n==e||he(n)==e:ft(n)}:ft,rr=rt(function(n,t,e){ve.call(n,e)?n[e]++:n[e]=1}),ur=rt(function(n,t,e){(ve.call(n,e)?n[e]:n[e]=[]).push(t)}),or=rt(function(n,t,e){n[e]=t}),ar=Et;Fe&&Y&&typeof de=="function"&&(Wt=function(n){if(!vt(n))throw new re;return de.apply(e,arguments)});var ir=8==De(x+"08")?De:function(n,t){return De(dt(n)?n.replace(B,""):n,t||0) +};return y.after=function(n,t){if(!vt(t))throw new re;return function(){return 1>--n?t.apply(this,arguments):void 0}},y.assign=Ye,y.at=function(n){var t=arguments,e=-1,r=X(t,!0,!1,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Ut(t);for(Le.unindexedChars&&dt(n)&&(n=n.split(""));++e=w&&o(a?r[a]:v)}n:for(;++f(m?t(m,y):c(v,y))){for(a=u,(m||v).push(y);--a;)if(m=l[a],0>(m?t(m,y):c(r[a],y)))continue n;h.push(y)}}for(;u--;)(m=l[u])&&s(m);return p(l),p(v),h},y.invert=ht,y.invoke=function(n,t){var e=Ne.call(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Ut(typeof o=="number"?o:0);return xt(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},y.keys=We,y.map=Et,y.max=Ot,y.memoize=function(n,t){if(!vt(n))throw new re;var e=function(){var r=e.cache,u=t?t.apply(this,arguments):b+arguments[0]; +return ve.call(r,u)?r[u]:r[u]=n.apply(this,arguments)};return e.cache={},e},y.merge=function(n){var t=arguments,e=2;if(!yt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3r(a,e))&&(o[e]=n)}),o},y.once=function(n){var t,e;if(!vt(n))throw new re;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},y.pairs=function(n){for(var t=-1,e=We(n),r=e.length,u=Ut(r);++te?Ie(0,r+e):Be(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},y.mixin=Jt,y.noConflict=function(){return e._=le,this},y.parseInt=ir,y.random=Mt,y.reduce=St,y.reduceRight=At,y.result=function(n,t){var e=n?n[t]:v;return vt(e)?n[t]():e},y.runInContext=h,y.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:We(n).length},y.some=Bt,y.sortedIndex=$t,y.template=function(n,t,e){var r=y.templateSettings; +n||(n=""),e=Ze({},e,r);var u,o=Ze({},e.imports,r.imports),r=We(o),o=_t(o),i=0,l=e.interpolate||D,f="__p+='",l=te((e.escape||D).source+"|"+l.source+"|"+(l===I?S:D).source+"|"+(e.evaluate||D).source+"|$","g");n.replace(l,function(t,e,r,o,l,c){return r||(r=o),f+=n.slice(i,c).replace(N,a),e&&(f+="'+__e("+e+")+'"),l&&(u=!0,f+="';"+l+";__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t}),f+="';\n",l=e=e.variable,l||(e="obj",f="with("+e+"){"+f+"}"),f=(u?f.replace(C,""):f).replace(E,"$1").replace(O,"$1;"),f="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}"; +try{var c=Xt(r,"return "+f).apply(v,o)}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},y.unescape=function(n){return null==n?"":ee(n).replace(Ve,ct)},y.uniqueId=function(n){var t=++d;return ee(null==n?"":n)+t},y.all=wt,y.any=Bt,y.detect=kt,y.findWhere=kt,y.foldl=St,y.foldr=At,y.include=bt,y.inject=St,tr(y,function(n,t){y.prototype[t]||(y.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return ye.apply(t,arguments),t=n.apply(y,t),e?new m(t,e):t})}),y.first=Nt,y.last=function(n,t,e){if(n){var r=0,u=n.length; +if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return g(n,Ie(0,u-r))}},y.sample=function(n,t,e){return qe(n)||(n=Dt(n)),null==t||e?n[Mt(n.length-1)]:(n=It(n),n.length=Be(Ie(0,t),n.length),n)},y.take=Nt,y.head=Nt,tr(y,function(n,t){var e="sample"!==t;y.prototype[t]||(y.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new m(o,u):o})}),y.VERSION="1.3.1",y.prototype.chain=function(){return this.__chain__=!0,this +},y.prototype.toString=function(){return ee(this.__wrapped__)},y.prototype.value=Ht,y.prototype.valueOf=Ht,Xe(["join","pop","shift"],function(n){var t=ue[n];y.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);return n?new m(e,n):e}}),Xe(["push","reverse","sort","unshift"],function(n){var t=ue[n];y.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Xe(["concat","slice","splice"],function(n){var t=ue[n];y.prototype[n]=function(){return new m(t.apply(this.__wrapped__,arguments),this.__chain__) +}}),Le.spliceObjects||Xe(["pop","shift","splice"],function(n){var t=ue[n],e="splice"==n;y.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new m(u,n):u}}),y}var v,y=[],m=[],d=0,_={},b=+new Date+"",w=75,j=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,E=/\b(__p\+=)''\+/g,O=/(__e\(.*?\)|\b__t\))\+'';/g,S=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,A=/\w*$/,I=/<%=([\s\S]+?)%>/g,B=RegExp("^["+x+"]*0+(?=.$)"),D=/($^)/,P=(P=/\bthis\b/)&&P.test(h)&&P,N=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),F="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),$="[object Arguments]",z="[object Array]",L="[object Boolean]",T="[object Date]",q="[object Error]",K="[object Function]",W="[object Number]",G="[object Object]",J="[object RegExp]",M="[object String]",H={}; +H[K]=!1,H[$]=H[z]=H[L]=H[T]=H[W]=H[G]=H[J]=H[M]=!0;var U={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},V={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Q=U[typeof window]&&window||this,X=U[typeof exports]&&exports,Y=U[typeof module]&&module&&module.exports==X&&module,Z=U[typeof global]&&global;!Z||Z.global!==Z&&Z.window!==Z||(Q=Z);var nt=h();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Q._=nt, define(function(){return nt +})):X&&!X.nodeType?Y?(Y.exports=nt)._=nt:X._=nt:Q._=nt}).call(this); \ No newline at end of file diff --git a/dist/lodash.js b/dist/lodash.js index a14abed33..1b2b547e8 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -141,7 +141,7 @@ * or `fromIndex` constraints. * * @private - * @param {array} array The array to search. + * @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`. @@ -163,7 +163,7 @@ * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. * * @private - * @param {object} cache The cache object to inspect. + * @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`. */ @@ -229,8 +229,8 @@ * them in ascending order. * * @private - * @param {object} a The object to compare to `b`. - * @param {object} b The object to compare to `a`. + * @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) { @@ -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, @@ -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 {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. + * @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 @@ -548,7 +548,7 @@ * @constructor * @category Chaining * @param {*} value The value to wrap in a `lodash` instance. - * @returns {object} Returns a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -583,7 +583,7 @@ * @private * @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. + * @returns {Object} Returns a `lodash` instance. */ function lodashWrapper(value, chainAll) { this.__chain__ = !!chainAll; @@ -597,7 +597,7 @@ * * @static * @memberOf _ - * @type object + * @type Object */ var support = lodash.support = {}; @@ -616,7 +616,7 @@ * * @static * @memberOf _ - * @type object + * @type Object */ lodash.templateSettings = { @@ -624,7 +624,7 @@ * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'escape': /<%-([\s\S]+?)%>/g, @@ -632,7 +632,7 @@ * Used to detect code to be evaluated. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'evaluate': /<%([\s\S]+?)%>/g, @@ -640,7 +640,7 @@ * Used to detect `data` property values to inject. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'interpolate': reInterpolate, @@ -656,7 +656,7 @@ * Used to import variables into the compiled template. * * @memberOf _.templateSettings - * @type object + * @type Object */ 'imports': { @@ -664,7 +664,7 @@ * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports - * @type function + * @type Function */ '_': lodash } @@ -679,9 +679,9 @@ * @private * @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. + * @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) { @@ -770,7 +770,7 @@ * @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. + * @returns {Function} Returns a callback function. */ function baseCreateCallback(func, thisArg, argCount) { if (typeof func != 'function') { @@ -812,11 +812,11 @@ * shorthands or `thisArg` binding. * * @private - * @param {array} array The array to flatten. + * @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. + * @returns {Array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -842,10 +842,10 @@ * @private * @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. + * @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) { @@ -1009,11 +1009,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) { @@ -1074,10 +1074,10 @@ * or `thisArg` binding. * * @private - * @param {array} array The array to process. + * @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 {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. */ function baseUniq(array, isSorted, callback) { var index = -1, @@ -1128,8 +1128,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) { @@ -1158,7 +1158,7 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {(function|string)} func The function or method name to reference. + * @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` @@ -1167,13 +1167,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 {*} [thisArg] The `this` binding of `func`. * @param {number} [arity] The arity of `func`. - * @returns {function} Returns the new bound function. + * @returns {Function} Returns the new bound function. */ function createBound(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { var isBind = bitmask & 1, @@ -1267,8 +1267,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) : {}; @@ -1291,7 +1291,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; @@ -1302,7 +1302,7 @@ * Sets `this` binding data on a given function. * * @private - * @param {function} func The function to set data on. + * @param {Function} func The function to set data on. * @param {*} value The value to set. */ var setBindData = !defineProperty ? noop : function(func, value) { @@ -1378,7 +1378,7 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects * @param {*} value The value to check. * @returns {boolean} Returns `true` if the `value` is an array, else `false`. @@ -1399,9 +1399,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 = []; @@ -1421,8 +1421,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 }); @@ -1469,14 +1469,14 @@ * * @static * @memberOf _ - * @type function + * @type Function * @alias extend * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] The source objects. - * @param {function} [callback] The function to customize assigning values. + * @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. + * @returns {Object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -1529,7 +1529,7 @@ * @category Objects * @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 {Function} [callback] The function to customize cloning values. * @param {*} [thisArg] The `this` binding of `callback`. * @returns {*} Returns the cloned `value`. * @example @@ -1583,7 +1583,7 @@ * @memberOf _ * @category Objects * @param {*} value The value to deep clone. - * @param {function} [callback] The function to customize cloning values. + * @param {Function} [callback] The function to customize cloning values. * @param {*} [thisArg] The `this` binding of `callback`. * @returns {*} Returns the deep cloned `value`. * @example @@ -1620,13 +1620,13 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] 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' }; @@ -1662,8 +1662,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -1694,8 +1694,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -1727,12 +1727,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 {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`. + * @returns {Object} Returns `object`. * @example * * function Dog(name) { @@ -1766,10 +1766,10 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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`. + * @returns {Object} Returns `object`. * @example * * function Dog(name) { @@ -1810,12 +1810,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 {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`. + * @returns {Object} Returns `object`. * @example * * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -1846,10 +1846,10 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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`. + * @returns {Object} Returns `object`. * @example * * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -1879,8 +1879,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(_); @@ -1903,7 +1903,7 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to check. + * @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 @@ -1921,8 +1921,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' }); @@ -2000,7 +2000,7 @@ * @static * @memberOf _ * @category Objects - * @param {(array|object|string)} value The value to inspect. + * @param {Array|Object|string} value The value to inspect. * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * @@ -2043,7 +2043,7 @@ * @category Objects * @param {*} a The value to compare. * @param {*} b The other value to compare. - * @param {function} [callback] The function to customize comparing values. + * @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 @@ -2319,11 +2319,11 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] The source objects. - * @param {function} [callback] The function to customize merging properties. + * @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. + * @returns {Object} Returns the destination object. * @example * * var names = { @@ -2399,11 +2399,11 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The source object. - * @param {(function|...string|string[])} [callback] The properties to omit or the + * @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. + * @returns {Object} Returns an object without the omitted properties. * @example * * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); @@ -2442,8 +2442,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 }); @@ -2473,12 +2473,12 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The source object. - * @param {(function|...string|string[])} [callback] The function called per + * @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. + * @returns {Object} Returns an object composed of the picked properties. * @example * * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); @@ -2524,8 +2524,8 @@ * @static * @memberOf _ * @category Objects - * @param {(array|object)} collection The collection to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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. @@ -2570,8 +2570,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 }); @@ -2599,10 +2599,10 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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 * @@ -2634,7 +2634,7 @@ * @memberOf _ * @alias include * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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`. @@ -2691,12 +2691,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -2728,8 +2728,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2790,12 +2790,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that passed the callback check. + * @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; }); @@ -2854,8 +2854,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2913,8 +2913,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2948,10 +2948,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 {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`. + * @returns {Array|Object|string} Returns `collection`. * @example * * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); @@ -2985,10 +2985,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 {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`. + * @returns {Array|Object|string} Returns `collection`. * @example * * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); @@ -3031,12 +3031,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3070,12 +3070,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * var keys = [ @@ -3105,11 +3105,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 {...*} [arg] Arguments to invoke the method with. - * @returns {array} Returns a new array of the results of each invoked method. + * @returns {Array} Returns a new array of the results of each invoked method. * @example * * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); @@ -3147,12 +3147,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of the results of each `callback` execution. + * @returns {Array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -3205,8 +3205,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3274,8 +3274,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3332,11 +3332,11 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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. + * @returns {Array} Returns a new array of property values. * @example * * var stooges = [ @@ -3372,8 +3372,8 @@ * @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 {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. @@ -3423,8 +3423,8 @@ * @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 {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. @@ -3459,12 +3459,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that failed the callback check. + * @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; }); @@ -3496,11 +3496,11 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to sample. + * @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- {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]); @@ -3528,8 +3528,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]); @@ -3555,7 +3555,7 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * @@ -3590,8 +3590,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3653,12 +3653,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of sorted elements. + * @returns {Array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -3700,8 +3700,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); @@ -3721,11 +3721,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 = [ @@ -3750,8 +3750,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]); @@ -3778,9 +3778,9 @@ * @static * @memberOf _ * @category Arrays - * @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. + * @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]); @@ -3823,8 +3823,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3856,8 +3856,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3897,8 +3897,8 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -3974,13 +3974,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to flatten. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new flattened array. + * @returns {Array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -4019,9 +4019,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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` + * @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`. * @example @@ -4062,13 +4062,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -4127,8 +4127,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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]); @@ -4195,8 +4195,8 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -4263,7 +4263,7 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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`. @@ -4295,9 +4295,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to modify. + * @param {Array} array The array to modify. * @param {...*} [value] The values to remove. - * @returns {array} Returns `array`. + * @returns {Array} Returns `array`. * @example * * var array = [1, 2, 3, 1, 2, 3]; @@ -4335,7 +4335,7 @@ * @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. + * @returns {Array} Returns a new range array. * @example * * _.range(10); @@ -4392,12 +4392,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of removed elements. + * @returns {Array} Returns a new array of removed elements. * @example * * var array = [1, 2, 3, 4, 5, 6]; @@ -4444,13 +4444,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -4516,9 +4516,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to inspect. + * @param {Array} array The array to inspect. * @param {*} value The value to evaluate. - * @param {(function|object|string)} [callback=identity] The function called + * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4571,8 +4571,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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]); @@ -4601,13 +4601,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {array} array The array to process. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a duplicate-value-free array. + * @returns {Array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -4646,9 +4646,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to filter. + * @param {Array} array The array to filter. * @param {...*} [value] The values to exclude. - * @returns {array} Returns a new array of filtered values. + * @returns {Array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -4667,8 +4667,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {...array} [array] 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]); @@ -4695,9 +4695,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 * @@ -4731,8 +4731,8 @@ * @category Functions * @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); @@ -4760,10 +4760,10 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to bind. + * @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. + * @returns {Function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -4775,7 +4775,9 @@ * // => 'hi moe' */ function bind(func, thisArg) { - return createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg); + return arguments.length > 2 + ? createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg) + : createBound(func, 1, null, null, thisArg); } /** @@ -4787,10 +4789,10 @@ * @static * @memberOf _ * @category Functions - * @param {object} object The object to bind and assign the bound methods 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 = { @@ -4824,10 +4826,10 @@ * @static * @memberOf _ * @category Functions - * @param {object} object The object the method belongs to. + * @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. + * @returns {Function} Returns the new bound function. * @example * * var object = { @@ -4849,7 +4851,9 @@ * // => 'hi, moe!' */ function bindKey(object, key) { - return createBound(key, 19, nativeSlice.call(arguments, 2), null, object); + return arguments.length > 2 + ? createBound(key, 19, nativeSlice.call(arguments, 2), null, object) + : createBound(key, 3, null, null, object); } /** @@ -4861,8 +4865,8 @@ * @static * @memberOf _ * @category Functions - * @param {...function} [func] 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 = { @@ -4914,7 +4918,7 @@ * @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. + * @returns {Function} Returns a callback function. * @example * * var stooges = [ @@ -4980,9 +4984,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to curry. + * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. - * @returns {function} Returns the new curried function. + * @returns {Function} Returns the new curried function. * @example * * var curried = _.curry(function(a, b, c) { @@ -5017,13 +5021,13 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to debounce. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -5137,7 +5141,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to defer. + * @param {Function} func The function to defer. * @param {...*} [arg] Arguments to invoke the function with. * @returns {number} Returns the timer id. * @example @@ -5169,7 +5173,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to delay. + * @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. @@ -5198,9 +5202,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) { @@ -5245,8 +5249,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); @@ -5282,9 +5286,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to partially apply arguments to. + * @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. + * @returns {Function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -5303,9 +5307,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to partially apply arguments to. + * @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. + * @returns {Function} Returns the new partially applied function. * @example * * var defaultsDeep = _.partialRight(_.merge, _.defaults); @@ -5341,12 +5345,12 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to throttle. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -5391,8 +5395,8 @@ * @memberOf _ * @category Functions * @param {*} value The value to wrap. - * @param {function} wrapper The wrapper function. - * @returns {function} Returns the new function. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -5458,8 +5462,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({ @@ -5507,7 +5511,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {function} Returns the `lodash` function. + * @returns {Function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -5586,7 +5590,7 @@ * @static * @memberOf _ * @category Utilities - * @param {object} object The object to inspect. + * @param {Object} object The object to inspect. * @param {string} property The property to get the value of. * @returns {*} Returns the resolved value. * @example @@ -5626,15 +5630,15 @@ * @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. - * 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 + * @param {Object} data The data object used to populate the text. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as local variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [sourceURL] The sourceURL of the template's compiled source. + * @param {string} [variable] The data object variable name. + * @returns {Function|string} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -5806,9 +5810,9 @@ * @memberOf _ * @category Utilities * @param {number} n The number of times to execute the callback. - * @param {function} callback The function called per iteration. + * @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. + * @returns {Array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -5881,7 +5885,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to wrap. - * @returns {object} Returns the wrapper object. + * @returns {Object} Returns the wrapper object. * @example * * var stooges = [ @@ -5912,7 +5916,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to provide to `interceptor`. - * @param {function} interceptor The function to invoke. + * @param {Function} interceptor The function to invoke. * @returns {*} Returns `value`. * @example * diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 458702738..3805db39f 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -3,50 +3,50 @@ * Lo-Dash 1.3.1 (Custom Build) lodash.com/license | Underscore.js 1.5.1 underscorejs.org/LICENSE * Build: `lodash modern -o ./dist/lodash.js` */ -;!function(){function n(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++re||typeof r=="undefined")return 1;if(rr?0:r);++e=j&&f===n,h=u||v?i():s;if(v){var g=o(h);g?(f=t,h=g):(v=m,h=u?h:(c(h),s)) -}for(;++af(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(c(h.b),p(h)):u&&c(h),s}function it(n){return function(t,r,e){var u={};r=Z.createCallback(r,e,3),e=-1;var o=t?t.length:0;if(typeof o=="number")for(;++er?Nr(0,o+r):r)||0,o&&typeof o=="number"?a=-1<(dt(n)?n.indexOf(t,r):u(n,t,r)):b(n,function(n){return++eo&&(o=i)}}else t=!t&&dt(n)?e:Z.createCallback(t,r,3),Ot(n,function(n,r,e){r=t(n,r,e),r>u&&(u=r,o=n)});return o}function At(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Xt(e);++rarguments.length;t=rt(t,e,4);var o=-1,a=n.length;if(typeof a=="number")for(u&&(r=n[++o]);++oarguments.length;return t=rt(t,e,4),Et(n,function(n,e,o){r=u?(u=m,n):t(r,n,e,o)}),r}function Bt(n){var t=-1,r=n?n.length:0,e=Xt(typeof r=="number"?r:0);return Ot(n,function(n){var r=Jt(++t);e[t]=e[r],e[r]=n}),e}function $t(n,t,r){var e;t=Z.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r=j&&u===n;if(l){var c=o(i);c?(u=t,i=c):l=m}for(;++eu(i,c)&&f.push(c);return l&&p(i),f}function Tt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=y){var o=-1;for(t=Z.createCallback(t,r,3);++oe?Nr(0,u+e):e||0}else if(e)return e=Wt(t,r),t[e]===r?e:-1;return n(t,r,e) -}function qt(n,t,r){if(typeof t!="number"&&t!=y){var e=0,u=-1,o=n?n.length:0;for(t=Z.createCallback(t,r,3);++u>>1,r(n[e])r?0:r);++tl&&(a=n.apply(f,o));else{!s&&!_&&(c=i);var r=p-(i-c);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:Z}};var Wr=xr?function(n,t){var r=f();r.value=t,xr(n,"__bindData__",r),p(r)}:l,Pr=Er||function(n){return n&&typeof n=="object"?jr.call(n)==T:m},Kr=Ar?function(n){return _t(n)?Ar(n):[]}:X,Lr={"&":"&","<":"<",">":">",'"':""","'":"'"},Mr=yt(Lr),Ur=ur("("+Kr(Mr).join("|")+")","g"),Vr=ur("["+Kr(Lr).join("")+"]","g"),Gr=it(function(n,t,r){yr.call(n,r)?n[r]++:n[r]=1 -}),Hr=it(function(n,t,r){(yr.call(n,r)?n[r]:n[r]=[]).push(t)}),Jr=it(function(n,t,r){n[r]=t});Tr&&Q&&typeof br=="function"&&(Vt=function(n){if(!mt(n))throw new ar;return br.apply(r,arguments)});var Qr=8==Br(x+"08")?Br:function(n,t){return Br(dt(n)?n.replace(N,""):n,t||0)};return Z.after=function(n,t){if(!mt(t))throw new ar;return function(){return 1>--n?t.apply(this,arguments):void 0}},Z.assign=J,Z.at=function(n){for(var t=arguments,r=-1,e=et(t,g,m,1),t=t[2]&&t[2][t[1]]===n?1:e.length,u=Xt(t);++r=j&&o(a?e[a]:g)}n:for(;++l(m?t(m,y):s(g,y))){for(a=u,(m||g).push(y);--a;)if(m=f[a],0>(m?t(m,y):s(e[a],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 r=Dr.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,a=Xt(typeof o=="number"?o:0);return Ot(n,function(n){a[++e]=(u?t:n[t]).apply(n,r)}),a},Z.keys=Kr,Z.map=It,Z.max=St,Z.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):w+arguments[0];return yr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!mt(n))throw new ar;return r.cache={},r},Z.merge=function(n){var t=arguments,r=2;if(!_t(n))return n;if("number"!=typeof t[2]&&(r=t.length),3e(a,r))&&(o[r]=n) -}),o},Z.once=function(n){var t,r;if(!mt(n))throw new ar;return function(){return t?r:(t=g,r=n.apply(this,arguments),n=y,r)}},Z.pairs=function(n){for(var t=-1,r=Kr(n),e=r.length,u=Xt(e);++tr?Nr(0,e+r):Rr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},Z.mixin=Ht,Z.noConflict=function(){return r._=lr,this -},Z.parseInt=Qr,Z.random=Jt,Z.reduce=Nt,Z.reduceRight=Rt,Z.result=function(n,t){var r=n?n[t]:h;return mt(r)?n[t]():r},Z.runInContext=v,Z.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Kr(n).length},Z.some=$t,Z.sortedIndex=Wt,Z.template=function(n,t,r){var e=Z.templateSettings;n||(n=""),r=G({},r,e);var u,o=G({},r.imports,e.imports),e=Kr(o),o=wt(o),i=0,f=r.interpolate||R,l="__p+='",f=ur((r.escape||R).source+"|"+f.source+"|"+(f===A?I:R).source+"|"+(r.evaluate||R).source+"|$","g");n.replace(f,function(t,r,e,o,f,c){return e||(e=o),l+=n.slice(i,c).replace($,a),r&&(l+="'+__e("+r+")+'"),f&&(u=g,l+="';"+f+";__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),i=c+t.length,t -}),l+="';\n",f=r=r.variable,f||(r="obj",l="with("+r+"){"+l+"}"),l=(u?l.replace(C,""):l).replace(O,"$1").replace(E,"$1;"),l="function("+r+"){"+(f?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=nr(e,"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?"":or(n).replace(Ur,st)},Z.uniqueId=function(n){var t=++d;return or(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__],r=this.__chain__;return _r.apply(t,arguments),t=n.apply(Z,t),r?new nt(t,r):t})}),Z.first=Tt,Z.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=y){var o=u;for(t=Z.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,e==y||r)return n[u-1];return s(n,Nr(0,u-e))}},Z.sample=function(n,t,r){return Pr(n)||(n=Dt(n)),t==y||r?n[Jt(n.length-1)]:(n=Bt(n),n.length=Rr(Nr(0,t),n.length),n) -},Z.take=Tt,Z.head=Tt,b(Z,function(n,t){var r="sample"!==t;Z.prototype[t]||(Z.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||t!=y&&(!e||r&&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 or(this.__wrapped__)},Z.prototype.value=Qt,Z.prototype.valueOf=Qt,Ot(["join","pop","shift"],function(n){var t=ir[n];Z.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments); -return n?new nt(r,n):r}}),Ot(["push","reverse","sort","unshift"],function(n){var t=ir[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ot(["concat","slice","splice"],function(n){var t=ir[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 +;(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=b&&f===n,h=u||v?i():s;if(v){var g=o(h);g?(f=t,h=g):(v=!1,h=u?h:(c(h),s)) +}for(;++af(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(c(h.b),p(h)):u&&c(h),s}function ut(n){return function(t,e,r){var u={};e=Q.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++re?Ie(0,o+e):e)||0,o&&typeof o=="number"?a=-1<(mt(n)?n.indexOf(t,e):u(n,t,e)):y(n,function(n){return++ro&&(o=i)}}else t=!t&&mt(n)?r:Q.createCallback(t,e,3),kt(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Et(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Ht(r);++earguments.length;t=Z(t,r,4);var o=-1,a=n.length;if(typeof a=="number")for(u&&(e=n[++o]);++oarguments.length;return t=Z(t,r,4),xt(n,function(n,r,o){e=u?(u=!1,n):t(e,n,r,o)}),e}function At(n){var t=-1,e=n?n.length:0,r=Ht(typeof e=="number"?e:0);return kt(n,function(n){var e=Vt(++t);r[t]=r[e],r[e]=n}),r}function Nt(n,t,e){var r;t=Q.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e=b&&u===n;if(l){var c=o(i);c?(u=t,i=c):l=!1}for(;++ru(i,c)&&f.push(c);return l&&p(i),f}function $t(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=Q.createCallback(t,e,3);++or?Ie(0,u+r):r||0}else if(r)return r=Tt(t,e),t[r]===e?r:-1; +return n(t,e,r)}function Ft(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=Q.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++tl&&(a=n.apply(f,o));else{s||g||(c=i);var e=p-(i-c);0/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:Q}};var Te=we?function(n,t){var e=f();e.value=t,we(n,"__bindData__",e),p(e)}:l,ze=xe||function(n){return n&&typeof n=="object"?be.call(n)==$:!1},qe=Ee?function(n){return gt(n)?Ee(n):[]}:H,We={"&":"&","<":"<",">":">",'"':""","'":"'"},Pe=vt(We),Ke=te("("+qe(Pe).join("|")+")","g"),Le=te("["+qe(We).join("")+"]","g"),Me=ut(function(n,t,e){ve.call(n,e)?n[e]++:n[e]=1 +}),Ue=ut(function(n,t,e){(ve.call(n,e)?n[e]:n[e]=[]).push(t)}),Ve=ut(function(n,t,e){n[e]=t});$e&&G&&typeof ye=="function"&&(Lt=function(n){if(!ht(n))throw new re;return ye.apply(e,arguments)});var Ge=8==Ae(w+"08")?Ae:function(n,t){return Ae(mt(n)?n.replace(I,""):n,t||0)};return Q.after=function(n,t){if(!ht(t))throw new re;return function(){return 1>--n?t.apply(this,arguments):void 0}},Q.assign=V,Q.at=function(n){for(var t=arguments,e=-1,r=nt(t,!0,!1,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Ht(t);++e=b&&o(a?r[a]:g)}n:for(;++l(m?t(m,y):s(g,y))){for(a=u,(m||g).push(y);--a;)if(m=f[a],0>(m?t(m,y):s(r[a],y)))continue n;h.push(y)}}for(;u--;)(m=f[u])&&p(m); +return c(f),c(g),h},Q.invert=vt,Q.invoke=function(n,t){var e=Re.call(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Ht(typeof o=="number"?o:0);return kt(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},Q.keys=qe,Q.map=Ct,Q.max=Ot,Q.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):_+arguments[0];return ve.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!ht(n))throw new re;return e.cache={},e},Q.merge=function(n){var t=arguments,e=2;if(!gt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3r(a,e))&&(o[e]=n) +}),o},Q.once=function(n){var t,e;if(!ht(n))throw new re;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},Q.pairs=function(n){for(var t=-1,e=qe(n),r=e.length,u=Ht(r);++te?Ie(0,r+e):Se(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},Q.mixin=Ut,Q.noConflict=function(){return e._=ae,this +},Q.parseInt=Ge,Q.random=Vt,Q.reduce=It,Q.reduceRight=St,Q.result=function(n,t){var e=n?n[t]:h;return ht(e)?n[t]():e},Q.runInContext=v,Q.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:qe(n).length},Q.some=Nt,Q.sortedIndex=Tt,Q.template=function(n,t,e){var r=Q.templateSettings;n||(n=""),e=M({},e,r);var u,o=M({},e.imports,r.imports),r=qe(o),o=_t(o),i=0,f=e.interpolate||S,l="__p+='",f=te((e.escape||S).source+"|"+f.source+"|"+(f===E?C:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(i,c).replace(N,a),e&&(l+="'+__e("+e+")+'"),f&&(u=!0,l+="';"+f+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t +}),l+="';\n",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(j,""):l).replace(k,"$1").replace(x,"$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=Xt(r,"return "+l).apply(h,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},Q.unescape=function(n){return null==n?"":ee(n).replace(Ke,lt)},Q.uniqueId=function(n){var t=++m;return ee(null==n?"":n)+t +},Q.all=dt,Q.any=Nt,Q.detect=jt,Q.findWhere=jt,Q.foldl=It,Q.foldr=St,Q.include=bt,Q.inject=It,y(Q,function(n,t){Q.prototype[t]||(Q.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return ge.apply(t,arguments),t=n.apply(Q,t),e?new X(t,e):t})}),Q.first=$t,Q.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=Q.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return s(n,Ie(0,u-r))}},Q.sample=function(n,t,e){return ze(n)||(n=Rt(n)),null==t||e?n[Vt(n.length-1)]:(n=At(n),n.length=Se(Ie(0,t),n.length),n) +},Q.take=$t,Q.head=$t,y(Q,function(n,t){var e="sample"!==t;Q.prototype[t]||(Q.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new X(o,u):o})}),Q.VERSION="1.3.1",Q.prototype.chain=function(){return this.__chain__=!0,this},Q.prototype.toString=function(){return ee(this.__wrapped__)},Q.prototype.value=Gt,Q.prototype.valueOf=Gt,kt(["join","pop","shift"],function(n){var t=ue[n];Q.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments); +return n?new X(e,n):e}}),kt(["push","reverse","sort","unshift"],function(n){var t=ue[n];Q.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),kt(["concat","slice","splice"],function(n){var t=ue[n];Q.prototype[n]=function(){return new X(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Q}var h,g=[],y=[],m=0,_=+new Date+"",b=75,d=40,w=" \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",j=/\b__p\+='';/g,k=/\b(__p\+=)''\+/g,x=/(__e\(.*?\)|\b__t\))\+'';/g,C=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,O=/\w*$/,E=/<%=([\s\S]+?)%>/g,I=RegExp("^["+w+"]*0+(?=.$)"),S=/($^)/,A=(A=/\bthis\b/)&&A.test(v)&&A,N=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),B="[object Arguments]",$="[object Array]",D="[object Boolean]",F="[object Date]",T="[object Function]",z="[object Number]",q="[object Object]",W="[object RegExp]",P="[object String]",K={}; +K[T]=!1,K[B]=K[$]=K[D]=K[F]=K[z]=K[q]=K[W]=K[P]=!0;var L={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},M={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},U=L[typeof window]&&window||this,V=L[typeof exports]&&exports,G=L[typeof module]&&module&&module.exports==V&&module,H=L[typeof global]&&global;!H||H.global!==H&&H.window!==H||(U=H);var J=v();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(U._=J, define(function(){return J +})):V&&!V.nodeType?G?(G.exports=J)._=J:V._=J:U._=J}).call(this); \ No newline at end of file diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index 5f2e99730..9dd4bb0e2 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -84,7 +84,7 @@ * or `fromIndex` constraints. * * @private - * @param {array} array The array to search. + * @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`. @@ -106,8 +106,8 @@ * them in ascending order. * * @private - * @param {object} a The object to compare to `b`. - * @param {object} b The object to compare to `a`. + * @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) { @@ -241,7 +241,7 @@ * @constructor * @category Chaining * @param {*} value The value to wrap in a `lodash` instance. - * @returns {object} Returns a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -275,7 +275,7 @@ * @private * @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. + * @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 = {}; @@ -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, @@ -373,7 +373,7 @@ * @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. + * @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 {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. + * @returns {Array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -435,10 +435,10 @@ * @private * @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. + * @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) { @@ -544,10 +544,10 @@ * or `thisArg` binding. * * @private - * @param {array} array The array to process. + * @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 {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,7 +610,7 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {(function|string)} func The function or method name to reference. + * @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` @@ -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 {*} [thisArg] The `this` binding of `func`. * @param {number} [arity] The arity of `func`. - * @returns {function} Returns the new bound function. + * @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) : {}; @@ -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; @@ -784,7 +784,7 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects * @param {*} value The value to check. * @returns {boolean} Returns `true` if the `value` is an array, else `false`. @@ -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} [source] The source objects. - * @param {function} [callback] The function to customize assigning values. + * @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. + * @returns {Object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -924,7 +924,7 @@ * @category Objects * @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 {Function} [callback] The function to customize cloning values. * @param {*} [thisArg] The `this` binding of `callback`. * @returns {*} Returns the cloned `value`. * @example @@ -965,13 +965,13 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] 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 {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`. + * @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 {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`. + * @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,7 +1099,7 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to check. + * @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 @@ -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' }); @@ -1196,7 +1196,7 @@ * @static * @memberOf _ * @category Objects - * @param {(array|object|string)} value The value to inspect. + * @param {Array|Object|string} value The value to inspect. * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * @@ -1236,7 +1236,7 @@ * @category Objects * @param {*} a The value to compare. * @param {*} b The other value to compare. - * @param {function} [callback] The function to customize comparing values. + * @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 @@ -1481,11 +1481,11 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The source object. - * @param {(function|...string|string[])} [callback] The properties to omit or the + * @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. + * @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 {(function|...string|string[])} [callback] The function called per + * @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. + * @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,7 +1614,7 @@ * @memberOf _ * @alias include * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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`. @@ -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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -1700,8 +1700,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that passed the callback check. + * @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,8 +1826,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -1887,8 +1887,8 @@ * @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. + * @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 * @@ -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 {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`. + * @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 {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`. + * @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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @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 {...*} [arg] Arguments to invoke the method with. - * @returns {array} Returns a new array of the results of each invoked method. + * @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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of the results of each `callback` execution. + * @returns {Array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -2126,8 +2126,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2193,8 +2193,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2249,11 +2249,11 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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. + * @returns {Array} Returns a new array of property values. * @example * * var stooges = [ @@ -2289,8 +2289,8 @@ * @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 {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. @@ -2340,8 +2340,8 @@ * @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 {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. @@ -2376,12 +2376,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that failed the callback check. + * @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 +2414,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,7 +2441,7 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * @@ -2476,8 +2476,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2539,12 +2539,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of sorted elements. + * @returns {Array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -2585,8 +2585,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 +2609,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 = [ @@ -2642,8 +2642,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 +2670,9 @@ * @static * @memberOf _ * @category Arrays - * @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. + * @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,8 +2711,8 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -2788,13 +2788,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to flatten. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new flattened array. + * @returns {Array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -2824,9 +2824,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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` + * @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`. * @example @@ -2867,13 +2867,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -2932,8 +2932,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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,8 +2979,8 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -3047,7 +3047,7 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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`. @@ -3083,7 +3083,7 @@ * @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. + * @returns {Array} Returns a new range array. * @example * * _.range(10); @@ -3143,13 +3143,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -3215,9 +3215,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to inspect. + * @param {Array} array The array to inspect. * @param {*} value The value to evaluate. - * @param {(function|object|string)} [callback=identity] The function called + * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3270,8 +3270,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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 +3300,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {array} array The array to process. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a duplicate-value-free array. + * @returns {Array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -3345,9 +3345,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to filter. + * @param {Array} array The array to filter. * @param {...*} [value] The values to exclude. - * @returns {array} Returns a new array of filtered values. + * @returns {Array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -3366,8 +3366,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {...array} [array] 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 +3393,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 * @@ -3429,8 +3429,8 @@ * @category Functions * @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 +3458,10 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to bind. + * @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. + * @returns {Function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -3473,7 +3473,9 @@ * // => 'hi moe' */ function bind(func, thisArg) { - return createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg); + return arguments.length > 2 + ? createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg) + : createBound(func, 1, null, null, thisArg); } /** @@ -3485,10 +3487,10 @@ * @static * @memberOf _ * @category Functions - * @param {object} object The object to bind and assign the bound methods 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 +3523,8 @@ * @static * @memberOf _ * @category Functions - * @param {...function} [func] 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 = { @@ -3574,7 +3576,7 @@ * @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. + * @returns {Function} Returns a callback function. * @example * * var stooges = [ @@ -3632,13 +3634,13 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to debounce. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -3752,7 +3754,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to defer. + * @param {Function} func The function to defer. * @param {...*} [arg] Arguments to invoke the function with. * @returns {number} Returns the timer id. * @example @@ -3775,7 +3777,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to delay. + * @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. @@ -3804,9 +3806,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 +3847,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 +3884,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to partially apply arguments to. + * @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. + * @returns {Function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -3910,12 +3912,12 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to throttle. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -3955,8 +3957,8 @@ * @memberOf _ * @category Functions * @param {*} value The value to wrap. - * @param {function} wrapper The wrapper function. - * @returns {function} Returns the new function. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -4022,8 +4024,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 +4065,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {function} Returns the `lodash` function. + * @returns {Function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -4118,7 +4120,7 @@ * @static * @memberOf _ * @category Utilities - * @param {object} object The object to inspect. + * @param {Object} object The object to inspect. * @param {string} property The property to get the value of. * @returns {*} Returns the resolved value. * @example @@ -4158,15 +4160,15 @@ * @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. - * 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 + * @param {Object} data The data object used to populate the text. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as local variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [sourceURL] The sourceURL of the template's compiled source. + * @param {string} [variable] The data object variable name. + * @returns {Function|string} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -4292,9 +4294,9 @@ * @memberOf _ * @category Utilities * @param {number} n The number of times to execute the callback. - * @param {function} callback The function called per iteration. + * @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. + * @returns {Array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -4365,7 +4367,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to wrap. - * @returns {object} Returns the wrapper object. + * @returns {Object} Returns the wrapper object. * @example * * var stooges = [ @@ -4396,7 +4398,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to provide to `interceptor`. - * @param {function} interceptor The function to invoke. + * @param {Function} interceptor The function to invoke. * @returns {*} Returns `value`. * @example * diff --git a/dist/lodash.underscore.min.js b/dist/lodash.underscore.min.js index 2df2e1beb..7cbd1407d 100644 --- a/dist/lodash.underscore.min.js +++ b/dist/lodash.underscore.min.js @@ -3,9 +3,9 @@ * 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(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])>>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=[]; @@ -34,5 +34,5 @@ return function(){var t=[n];return Ar.apply(t,arguments),r.apply(this,t)}},u.zip },u.isNumber=E,u.isObject=x,u.isRegExp=function(n){return n&&sr[typeof n]?Tr.call(n)==cr:!1},u.isString=A,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?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 +}},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 diff --git a/doc/README.md b/doc/README.md index ca5d97448..475cea0e9 100644 --- a/doc/README.md +++ b/doc/README.md @@ -107,14 +107,14 @@ * [`_.compose`](#_composefunc) * [`_.createCallback`](#_createcallbackfuncidentity--thisarg--argcount) * [`_.curry`](#_curryfunc--arityfunclength) -* [`_.debounce`](#_debouncefunc-wait-options) +* [`_.debounce`](#_debouncefunc-wait--options--optionsleadingfalse--optionsmaxwait--optionstrailingtrue) * [`_.defer`](#_deferfunc--arg) * [`_.delay`](#_delayfunc-wait--arg) * [`_.memoize`](#_memoizefunc--resolver) * [`_.once`](#_oncefunc) * [`_.partial`](#_partialfunc--arg) * [`_.partialRight`](#_partialrightfunc--arg) -* [`_.throttle`](#_throttlefunc-wait-options) +* [`_.throttle`](#_throttlefunc-wait--options--optionsleadingtrue--optionstrailingtrue) * [`_.wrap`](#_wrapvalue-wrapper) @@ -177,7 +177,7 @@ * [`_.random`](#_randommin0--max1) * [`_.result`](#_resultobject-property) * [`_.runInContext`](#_runincontextcontextroot) -* [`_.template`](#_templatetext-data-options) +* [`_.template`](#_templatetext-data--options--optionsescape--optionsevaluate--optionsimports--optionsinterpolate--sourceurl--variable) * [`_.times`](#_timesn-callback--thisarg) * [`_.unescape`](#_unescapestring) * [`_.uniqueId`](#_uniqueidprefix) @@ -236,10 +236,10 @@ Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are all falsey. #### Arguments -1. `array` *(array)*: The array to compact. +1. `array` *(Array)*: The array to compact. #### Returns -*(array)*: Returns a new array of filtered values. +*(Array)*: Returns a new array of filtered values. #### Example ```js @@ -260,11 +260,11 @@ _.compact([0, 1, false, 2, '', 3]); Creates an array excluding all values of the provided arrays using strict equality for comparisons, i.e. `===`. #### Arguments -1. `array` *(array)*: The array to process. -2. `[array]` *(...array)*: The arrays of values to exclude. +1. `array` *(Array)*: The array to process. +2. `[array]` *(...Array)*: The arrays of values to exclude. #### Returns -*(array)*: Returns a new array of filtered values. +*(Array)*: Returns a new array of filtered values. #### Example ```js @@ -285,8 +285,8 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]); This method is like `_.find` except that it returns the index of the first element that passes the callback check, instead of the element itself. #### Arguments -1. `array` *(array)*: The array to search. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `array` *(Array)*: The array to search. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -313,8 +313,8 @@ _.findIndex(['apple', 'banana', 'beet'], function(food) { This method is like `_.findIndex` except that it iterates over elements of a `collection` from right to left. #### Arguments -1. `array` *(array)*: The array to search. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `array` *(Array)*: The array to search. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -348,8 +348,8 @@ If an object is provided for `callback` the created "_.where" style callback wil *head, take* #### Arguments -1. `array` *(array)*: The array to query. -2. `[callback]` *(function|object|number|string)*: 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. +1. `array` *(Array)*: The array to query. +2. `[callback]` *(Function|Object|number|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -405,13 +405,13 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `array` *(array)*: The array to flatten. +1. `array` *(Array)*: The array to flatten. 2. `[isShallow=false]` *(boolean)*: A flag to restrict flattening to a single level. -3. `[callback=identity]` *(function|object|string)*: 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. +3. `[callback=identity]` *(Function|Object|string)*: 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. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a new flattened array. +*(Array)*: Returns a new flattened array. #### Example ```js @@ -444,7 +444,7 @@ _.flatten(stooges, 'quotes'); Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the array is already sorted providing `true` for `fromIndex` will run a faster binary search. #### Arguments -1. `array` *(array)*: The array to search. +1. `array` *(Array)*: The array to search. 2. `value` *(\*)*: The value to search for. 3. `[fromIndex=0]` *(boolean|number)*: The index to search from or `true` to perform a binary search on a sorted array. @@ -480,12 +480,12 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `array` *(array)*: The array to query. -2. `[callback=1]` *(function|object|number|string)*: 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. +1. `array` *(Array)*: The array to query. +2. `[callback=1]` *(Function|Object|number|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a slice of `array`. +*(Array)*: Returns a slice of `array`. #### Example ```js @@ -533,10 +533,10 @@ _.initial(food, { 'type': 'vegetable' }); Creates an array of unique values present in all provided arrays using strict equality for comparisons, i.e. `===`. #### Arguments -1. `[array]` *(...array)*: The arrays to inspect. +1. `[array]` *(...Array)*: The arrays to inspect. #### Returns -*(array)*: Returns an array of composite values. +*(Array)*: Returns an array of composite values. #### Example ```js @@ -561,8 +561,8 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `array` *(array)*: The array to query. -2. `[callback]` *(function|object|number|string)*: 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. +1. `array` *(Array)*: The array to query. +2. `[callback]` *(Function|Object|number|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -614,7 +614,7 @@ _.last(food, { 'type': 'vegetable' }); Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection. #### Arguments -1. `array` *(array)*: The array to search. +1. `array` *(Array)*: The array to search. 2. `value` *(\*)*: The value to search for. 3. `[fromIndex=array.length-1]` *(number)*: The index to search from. @@ -643,11 +643,11 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); Removes all provided values from the given array using strict equality for comparisons, i.e. `===`. #### Arguments -1. `array` *(array)*: The array to modify. +1. `array` *(Array)*: The array to modify. 2. `[value]` *(...\*)*: The values to remove. #### Returns -*(array)*: Returns `array`. +*(Array)*: Returns `array`. #### Example ```js @@ -675,7 +675,7 @@ Creates an array of numbers *(positive and/or negative)* progressing from `start 3. `[step=1]` *(number)*: The value to increment or decrement by. #### Returns -*(array)*: Returns a new range array. +*(Array)*: Returns a new range array. #### Example ```js @@ -715,12 +715,12 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `array` *(array)*: The array to modify. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `array` *(Array)*: The array to modify. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a new array of removed elements. +*(Array)*: Returns a new array of removed elements. #### Example ```js @@ -754,12 +754,12 @@ If an object is provided for `callback` the created "_.where" style callback wil *drop, tail* #### Arguments -1. `array` *(array)*: The array to query. -2. `[callback=1]` *(function|object|number|string)*: 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. +1. `array` *(Array)*: The array to query. +2. `[callback=1]` *(Function|Object|number|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a slice of `array`. +*(Array)*: Returns a slice of `array`. #### Example ```js @@ -811,9 +811,9 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `array` *(array)*: The array to inspect. +1. `array` *(Array)*: The array to inspect. 2. `value` *(\*)*: The value to evaluate. -3. `[callback=identity]` *(function|object|string)*: 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. +3. `[callback=identity]` *(Function|Object|string)*: 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. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -856,10 +856,10 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { Creates an array of unique values, in order, of the provided arrays using strict equality for comparisons, i.e. `===`. #### Arguments -1. `[array]` *(...array)*: The arrays to inspect. +1. `[array]` *(...Array)*: The arrays to inspect. #### Returns -*(array)*: Returns an array of composite values. +*(Array)*: Returns an array of composite values. #### Example ```js @@ -887,13 +887,13 @@ If an object is provided for `callback` the created "_.where" style callback wil *unique* #### Arguments -1. `array` *(array)*: The array to process. +1. `array` *(Array)*: The array to process. 2. `[isSorted=false]` *(boolean)*: A flag to indicate that `array` is sorted. -3. `[callback=identity]` *(function|object|string)*: 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. +3. `[callback=identity]` *(Function|Object|string)*: 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. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a duplicate-value-free array. +*(Array)*: Returns a duplicate-value-free array. #### Example ```js @@ -927,11 +927,11 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); Creates an array excluding all provided values using strict equality for comparisons, i.e. `===`. #### Arguments -1. `array` *(array)*: The array to filter. +1. `array` *(Array)*: The array to filter. 2. `[value]` *(...\*)*: The values to exclude. #### Returns -*(array)*: Returns a new array of filtered values. +*(Array)*: Returns a new array of filtered values. #### Example ```js @@ -955,10 +955,10 @@ Creates an array of grouped elements, the first of which contains the first elem *unzip* #### Arguments -1. `[array]` *(...array)*: Arrays to process. +1. `[array]` *(...Array)*: Arrays to process. #### Returns -*(array)*: Returns a new array of grouped elements. +*(Array)*: Returns a new array of grouped elements. #### Example ```js @@ -982,11 +982,11 @@ Creates an object composed from arrays of `keys` and `values`. Provide either a *object* #### Arguments -1. `keys` *(array)*: The array of keys. -2. `[values=[]]` *(array)*: The array of values. +1. `keys` *(Array)*: The array of keys. +2. `[values=[]]` *(Array)*: The array of values. #### Returns -*(object)*: Returns an object composed of the given keys and corresponding values. +*(Object)*: Returns an object composed of the given keys and corresponding values. #### Example ```js @@ -1030,7 +1030,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is provi 1. `value` *(\*)*: The value to wrap in a `lodash` instance. #### Returns -*(object)*: Returns a `lodash` instance. +*(Object)*: Returns a `lodash` instance. #### Example ```js @@ -1062,7 +1062,7 @@ _.isArray(squares.value()); ### `_.chain(value)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6262 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6266 "View in source") [Ⓣ][1] Creates a `lodash` object that wraps the given `value`. @@ -1070,7 +1070,7 @@ Creates a `lodash` object that wraps the given `value`. 1. `value` *(\*)*: The value to wrap. #### Returns -*(object)*: Returns the wrapper object. +*(Object)*: Returns the wrapper object. #### Example ```js @@ -1095,13 +1095,13 @@ var youngest = _.chain(stooges) ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6290 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6294 "View in source") [Ⓣ][1] Invokes `interceptor` with the `value` as the first argument and then returns `value`. The purpose of this method is to "tap into" a method chain in order to perform operations on intermediate results within the chain. #### Arguments 1. `value` *(\*)*: The value to provide to `interceptor`. -2. `interceptor` *(function)*: The function to invoke. +2. `interceptor` *(Function)*: The function to invoke. #### Returns *(\*)*: Returns `value`. @@ -1125,7 +1125,7 @@ _([1, 2, 3, 4]) ### `_.prototype.chain()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6310 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6314 "View in source") [Ⓣ][1] Enables method chaining on the wrapper object. @@ -1149,7 +1149,7 @@ var sum = _([1, 2, 3]) ### `_.prototype.toString()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6327 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6331 "View in source") [Ⓣ][1] Produces the `toString` result of the wrapped value. @@ -1170,7 +1170,7 @@ _([1, 2, 3]).toString(); ### `_.prototype.valueOf()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6344 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6348 "View in source") [Ⓣ][1] Extracts the wrapped value. @@ -1206,11 +1206,11 @@ _([1, 2, 3]).valueOf(); Creates an array of elements from the specified indexes, or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. +1. `collection` *(Array|Object|string)*: The collection to iterate over. 2. `[index]` *(...(number|number[]|string|string[])*: 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 provided indexes. +*(Array)*: Returns a new array of elements corresponding to the provided indexes. #### Example ```js @@ -1237,7 +1237,7 @@ Checks if a given value is present in a collection using strict equality for com *include* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. +1. `collection` *(Array|Object|string)*: The collection to iterate over. 2. `target` *(\*)*: The value to check for. 3. `[fromIndex=0]` *(number)*: The index to search from. @@ -1276,12 +1276,12 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns the composed aggregate object. +*(Object)*: Returns the composed aggregate object. #### Example ```js @@ -1315,8 +1315,8 @@ If an object is provided for `callback` the created "_.where" style callback wil *all* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -1361,12 +1361,12 @@ If an object is provided for `callback` the created "_.where" style callback wil *select* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a new array of elements that passed the callback check. +*(Array)*: Returns a new array of elements that passed the callback check. #### Example ```js @@ -1407,8 +1407,8 @@ If an object is provided for `callback` the created "_.where" style callback wil *detect, findWhere* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -1449,8 +1449,8 @@ _.find(food, 'organic'); This method is like `_.find` except that it iterates over elements of a `collection` from right to left. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -1480,12 +1480,12 @@ Iterates over elements of a collection, executing the callback for each element. *each* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*((array, object, string)*): Returns `collection`. +*(Array, Object, string)*: Returns `collection`. #### Example ```js @@ -1512,12 +1512,12 @@ This method is like `_.forEach` except that it iterates over elements of a `coll *eachRight* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*((array, object, string)*): Returns `collection`. +*(Array, Object, string)*: Returns `collection`. #### Example ```js @@ -1542,12 +1542,12 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false` #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns the composed aggregate object. +*(Object)*: Returns the composed aggregate object. #### Example ```js @@ -1579,12 +1579,12 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns the composed aggregate object. +*(Object)*: Returns the composed aggregate object. #### Example ```js @@ -1616,12 +1616,12 @@ _.indexBy(stooges, function(key) { this.fromCharCode(key.code); }, String); Invokes the method named by `methodName` on each element in the `collection` returning an array of the results of each invoked method. Additional arguments will be provided to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `methodName` *(function|string)*: The name of the method to invoke or the function invoked per iteration. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `methodName` *(Function|string)*: The name of the method to invoke or the function invoked per iteration. 3. `[arg]` *(...\*)*: Arguments to invoke the method with. #### Returns -*(array)*: Returns a new array of the results of each invoked method. +*(Array)*: Returns a new array of the results of each invoked method. #### Example ```js @@ -1652,12 +1652,12 @@ If an object is provided for `callback` the created "_.where" style callback wil *collect* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a new array of the results of each `callback` execution. +*(Array)*: Returns a new array of the results of each `callback` execution. #### Example ```js @@ -1694,8 +1694,8 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -1736,8 +1736,8 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -1774,11 +1774,11 @@ _.min(stooges, 'age'); Retrieves the value of a specified property from all elements in the `collection`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. +1. `collection` *(Array|Object|string)*: The collection to iterate over. 2. `property` *(string)*: The property to pluck. #### Returns -*(array)*: Returns a new array of property values. +*(Array)*: Returns a new array of property values. #### Example ```js @@ -1807,8 +1807,8 @@ Reduces a collection to a value which is the accumulated result of running each *foldl, inject* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[accumulator]` *(\*)*: Initial value of the accumulator. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. @@ -1845,8 +1845,8 @@ This method is like `_.reduce` except that it iterates over elements of a `colle *foldr* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[accumulator]` *(\*)*: Initial value of the accumulator. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. @@ -1877,12 +1877,12 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a new array of elements that failed the callback check. +*(Array)*: Returns a new array of elements that failed the callback check. #### Example ```js @@ -1916,11 +1916,11 @@ _.reject(food, { 'type': 'fruit' }); Retrieves a random element or `n` random elements from a collection. #### Arguments -1. `collection` *(array|object|string)*: The collection to sample. +1. `collection` *(Array|Object|string)*: The collection to sample. 2. `[n]` *(number)*: The number of elements to sample. #### Returns -*(array)*: Returns the random sample(s) of `collection`. +*(Array)*: Returns the random sample(s) of `collection`. #### Example ```js @@ -1944,10 +1944,10 @@ _.sample([1, 2, 3, 4], 2); Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. #### Arguments -1. `collection` *(array|object|string)*: The collection to shuffle. +1. `collection` *(Array|Object|string)*: The collection to shuffle. #### Returns -*(array)*: Returns a new shuffled collection. +*(Array)*: Returns a new shuffled collection. #### Example ```js @@ -1968,7 +1968,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]); Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects. #### Arguments -1. `collection` *(array|object|string)*: The collection to inspect. +1. `collection` *(Array|Object|string)*: The collection to inspect. #### Returns *(number)*: Returns `collection.length` or number of own enumerable properties. @@ -2005,8 +2005,8 @@ If an object is provided for `callback` the created "_.where" style callback wil *any* #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -2048,12 +2048,12 @@ If a property name is provided for `callback` the created "_.pluck" style callba If an object is provided for `callback` the created "_.where" style callback will return `true` for elements that have the properties of the given object, else `false`. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns a new array of sorted elements. +*(Array)*: Returns a new array of sorted elements. #### Example ```js @@ -2081,10 +2081,10 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length'); Converts the `collection` to an array. #### Arguments -1. `collection` *(array|object|string)*: The collection to convert. +1. `collection` *(Array|Object|string)*: The collection to convert. #### Returns -*(array)*: Returns the new converted array. +*(Array)*: Returns the new converted array. #### Example ```js @@ -2105,11 +2105,11 @@ Converts the `collection` to an array. Performs a deep comparison of each element in a `collection` to the given `properties` object, returning an array of all elements that have equivalent property values. #### Arguments -1. `collection` *(array|object|string)*: The collection to iterate over. -2. `properties` *(object)*: The object of property values to filter by. +1. `collection` *(Array|Object|string)*: The collection to iterate over. +2. `properties` *(Object)*: The object of property values to filter by. #### Returns -*(array)*: Returns a new array of elements that have the given `properties`. +*(Array)*: Returns a new array of elements that have the given `properties`. #### Example ```js @@ -2146,10 +2146,10 @@ Creates a function this is restricted to executing `func` with the `this` bindin #### Arguments 1. `n` *(number)*: The number of times the function must be called before `func` is executed. -2. `func` *(function)*: The function to restrict. +2. `func` *(Function)*: The function to restrict. #### Returns -*(function)*: Returns the new restricted function. +*(Function)*: Returns the new restricted function. #### Example ```js @@ -2173,12 +2173,12 @@ _.forEach(notes, function(note) { Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those provided to the bound function. #### Arguments -1. `func` *(function)*: The function to bind. +1. `func` *(Function)*: The function to bind. 2. `[thisArg]` *(\*)*: The `this` binding of `func`. 3. `[arg]` *(...\*)*: Arguments to be partially applied. #### Returns -*(function)*: Returns the new bound function. +*(Function)*: Returns the new bound function. #### Example ```js @@ -2199,16 +2199,16 @@ func(); ### `_.bindAll(object, [methodName])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5168 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5170 "View in source") [Ⓣ][1] Binds methods of an object to the object itself, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided all the function properties of `object` will be bound. #### Arguments -1. `object` *(object)*: The object to bind and assign the bound methods to. +1. `object` *(Object)*: The object to bind and assign the bound methods to. 2. `[methodName]` *(...string)*: The object method names to bind, specified as individual method names or arrays of method names. #### Returns -*(object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -2230,17 +2230,17 @@ jQuery('#docs').on('click', view.onClick); ### `_.bindKey(object, key, [arg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5214 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5216 "View in source") [Ⓣ][1] Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those provided to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern. #### Arguments -1. `object` *(object)*: The object the method belongs to. +1. `object` *(Object)*: The object the method belongs to. 2. `key` *(string)*: The key of the method. 3. `[arg]` *(...\*)*: Arguments to be partially applied. #### Returns -*(function)*: Returns the new bound function. +*(Function)*: Returns the new bound function. #### Example ```js @@ -2271,15 +2271,15 @@ func(); ### `_.compose([func])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5248 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5252 "View in source") [Ⓣ][1] Creates a function that is the composition of the provided functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function. #### Arguments -1. `[func]` *(...function)*: Functions to compose. +1. `[func]` *(...Function)*: Functions to compose. #### Returns -*(function)*: Returns the new composed function. +*(Function)*: Returns the new composed function. #### Example ```js @@ -2309,7 +2309,7 @@ welcome('curly'); ### `_.createCallback([func=identity], [thisArg], [argCount])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5299 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5303 "View in source") [Ⓣ][1] Produces a callback bound to an optional `thisArg`. If `func` is a property name the created callback will return the property value for a given element. If `func` is an object the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`. @@ -2319,7 +2319,7 @@ Produces a callback bound to an optional `thisArg`. If `func` is a property name 3. `[argCount]` *(number)*: The number of arguments the callback accepts. #### Returns -*(function)*: Returns a callback function. +*(Function)*: Returns a callback function. #### Example ```js @@ -2348,16 +2348,16 @@ _.filter(stooges, 'age__gt45'); ### `_.curry(func, [arity=func.length])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5364 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5368 "View in source") [Ⓣ][1] Creates a function which accepts one or more arguments of `func` that when invoked either executes `func` returning its result, if all `func` arguments have been provided, or returns a function that accepts one or more of the remaining `func` arguments, and so on. The arity of `func` can be specified if `func.length` is not sufficient. #### Arguments -1. `func` *(function)*: The function to curry. +1. `func` *(Function)*: The function to curry. 2. `[arity=func.length]` *(number)*: The arity of `func`. #### Returns -*(function)*: Returns the new curried function. +*(Function)*: Returns the new curried function. #### Example ```js @@ -2382,20 +2382,23 @@ curried(1, 2, 3); -### `_.debounce(func, wait, options)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5408 "View in source") [Ⓣ][1] +### `_.debounce(func, wait, [options], [options.leading=false], [options.maxWait], [options.trailing=true])` +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5412 "View in source") [Ⓣ][1] Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call. Note: If `leading` and `trailing` options are `true` `func` will be called on the trailing edge of the timeout only if the the debounced function is invoked more than once during the `wait` timeout. #### Arguments -1. `func` *(function)*: The function to debounce. +1. `func` *(Function)*: The function to debounce. 2. `wait` *(number)*: The number of milliseconds to delay. -3. `options` *(object)*: 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. +3. `[options]` *(Object)*: The options object. +4. `[options.leading=false]` *(boolean)*: Specify execution on the leading edge of the timeout. +5. `[options.maxWait]` *(number)*: The maximum time `func` is allowed to be delayed before it's called. +6. `[options.trailing=true]` *(boolean)*: Specify execution on the trailing edge of the timeout. #### Returns -*(function)*: Returns the new debounced function. +*(Function)*: Returns the new debounced function. #### Example ```js @@ -2424,12 +2427,12 @@ source.addEventListener('message', _.debounce(batchLog, 250, { ### `_.defer(func, [arg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5511 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5515 "View in source") [Ⓣ][1] Defers executing the `func` function until the current call stack has cleared. Additional arguments will be provided to `func` when it is invoked. #### Arguments -1. `func` *(function)*: The function to defer. +1. `func` *(Function)*: The function to defer. 2. `[arg]` *(...\*)*: Arguments to invoke the function with. #### Returns @@ -2449,12 +2452,12 @@ _.defer(function() { console.log('deferred'); }); ### `_.delay(func, wait, [arg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5545 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5549 "View in source") [Ⓣ][1] Executes the `func` function after `wait` milliseconds. Additional arguments will be provided to `func` when it is invoked. #### Arguments -1. `func` *(function)*: The function to delay. +1. `func` *(Function)*: The function to delay. 2. `wait` *(number)*: The number of milliseconds to delay execution. 3. `[arg]` *(...\*)*: Arguments to invoke the function with. @@ -2476,16 +2479,16 @@ _.delay(log, 1000, 'logged later'); ### `_.memoize(func, [resolver])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5587 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5591 "View in source") [Ⓣ][1] Creates a function that memoizes the result of `func`. If `resolver` is provided it will be used to determine the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function. The result cache is exposed as the `cache` property on the memoized function. #### Arguments -1. `func` *(function)*: The function to have its output memoized. -2. `[resolver]` *(function)*: A function used to resolve the cache key. +1. `func` *(Function)*: The function to have its output memoized. +2. `[resolver]` *(Function)*: A function used to resolve the cache key. #### Returns -*(function)*: Returns the new memoizing function. +*(Function)*: Returns the new memoizing function. #### Example ```js @@ -2516,15 +2519,15 @@ stooge('curly'); ### `_.once(func)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5620 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5624 "View in source") [Ⓣ][1] Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function. #### Arguments -1. `func` *(function)*: The function to restrict. +1. `func` *(Function)*: The function to restrict. #### Returns -*(function)*: Returns the new restricted function. +*(Function)*: Returns the new restricted function. #### Example ```js @@ -2542,16 +2545,16 @@ initialize(); ### `_.partial(func, [arg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5658 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5662 "View in source") [Ⓣ][1] Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those provided to the new function. This method is similar to `_.bind` except it does **not** alter the `this` binding. #### Arguments -1. `func` *(function)*: The function to partially apply arguments to. +1. `func` *(Function)*: The function to partially apply arguments to. 2. `[arg]` *(...\*)*: Arguments to be partially applied. #### Returns -*(function)*: Returns the new partially applied function. +*(Function)*: Returns the new partially applied function. #### Example ```js @@ -2569,16 +2572,16 @@ hi('moe'); ### `_.partialRight(func, [arg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5689 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5693 "View in source") [Ⓣ][1] This method is like `_.partial` except that `partial` arguments are appended to those provided to the new function. #### Arguments -1. `func` *(function)*: The function to partially apply arguments to. +1. `func` *(Function)*: The function to partially apply arguments to. 2. `[arg]` *(...\*)*: Arguments to be partially applied. #### Returns -*(function)*: Returns the new partially applied function. +*(Function)*: Returns the new partially applied function. #### Example ```js @@ -2605,20 +2608,22 @@ options.imports -### `_.throttle(func, wait, options)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5724 "View in source") [Ⓣ][1] +### `_.throttle(func, wait, [options], [options.leading=true], [options.trailing=true])` +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5728 "View in source") [Ⓣ][1] Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call. Note: If `leading` and `trailing` options are `true` `func` will be called on the trailing edge of the timeout only if the the throttled function is invoked more than once during the `wait` timeout. #### Arguments -1. `func` *(function)*: The function to throttle. +1. `func` *(Function)*: The function to throttle. 2. `wait` *(number)*: The number of milliseconds to throttle executions to. -3. `options` *(object)*: 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. +3. `[options]` *(Object)*: The options object. +4. `[options.leading=true]` *(boolean)*: Specify execution on the leading edge of the timeout. +5. `[options.trailing=true]` *(boolean)*: Specify execution on the trailing edge of the timeout. #### Returns -*(function)*: Returns the new throttled function. +*(Function)*: Returns the new throttled function. #### Example ```js @@ -2640,16 +2645,16 @@ jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { ### `_.wrap(value, wrapper)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5768 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5772 "View in source") [Ⓣ][1] Creates a function that provides `value` to the wrapper function as its first argument. Additional arguments provided to the function are appended to those provided to the wrapper function. The wrapper is executed with the `this` binding of the created function. #### Arguments 1. `value` *(\*)*: The value to wrap. -2. `wrapper` *(function)*: The wrapper function. +2. `wrapper` *(Function)*: The wrapper function. #### Returns -*(function)*: Returns the new function. +*(Function)*: Returns the new function. #### Example ```js @@ -2684,13 +2689,13 @@ Assigns own enumerable properties of source object(s) to the destination object. *extend* #### Arguments -1. `object` *(object)*: The destination object. -2. `[source]` *(...object)*: The source objects. -3. `[callback]` *(function)*: The function to customize assigning values. +1. `object` *(Object)*: The destination object. +2. `[source]` *(...Object)*: The source objects. +3. `[callback]` *(Function)*: The function to customize assigning values. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns the destination object. +*(Object)*: Returns the destination object. #### Example ```js @@ -2721,7 +2726,7 @@ Creates a clone of `value`. If `deep` is `true` nested objects will also be clon #### Arguments 1. `value` *(\*)*: The value to clone. 2. `[deep=false]` *(boolean)*: A flag to indicate a deep clone. -3. `[callback]` *(function)*: The function to customize cloning values. +3. `[callback]` *(Function)*: The function to customize cloning values. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -2769,7 +2774,7 @@ Note: This method is loosely based on the structured clone algorithm. Functions #### Arguments 1. `value` *(\*)*: The value to deep clone. -2. `[callback]` *(function)*: The function to customize cloning values. +2. `[callback]` *(Function)*: The function to customize cloning values. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -2812,11 +2817,11 @@ clone.node == view.node; Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to `undefined`. Once a property is set, additional defaults of the same property will be ignored. #### Arguments -1. `object` *(object)*: The destination object. -2. `[source]` *(...object)*: The source objects. +1. `object` *(Object)*: The destination object. +2. `[source]` *(...Object)*: The source objects. #### Returns -*(object)*: Returns the destination object. +*(Object)*: Returns the destination object. #### Example ```js @@ -2838,8 +2843,8 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' }); This method is like `_.findIndex` except that it returns the key of the first element that passes the callback check, instead of the element itself. #### Arguments -1. `object` *(object)*: The object to search. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `object` *(Object)*: The object to search. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -2866,8 +2871,8 @@ _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { This method is like `_.findKey` except that it iterates over elements of a `collection` in the opposite order. #### Arguments -1. `object` *(object)*: The object to search. -2. `[callback=identity]` *(function|object|string)*: 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. +1. `object` *(Object)*: The object to search. +2. `[callback=identity]` *(Function|Object|string)*: 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. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -2894,12 +2899,12 @@ _.findLastKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { Iterates over own and inherited enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`. #### Arguments -1. `object` *(object)*: The object to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `object` *(Object)*: The object to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -2930,12 +2935,12 @@ _.forIn(new Dog('Dagny'), function(value, key) { This method is like `_.forIn` except that it iterates over elements of a `collection` in the opposite order. #### Arguments -1. `object` *(object)*: The object to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `object` *(Object)*: The object to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -2966,12 +2971,12 @@ _.forInRight(new Dog('Dagny'), function(value, key) { Iterates over own enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`. #### Arguments -1. `object` *(object)*: The object to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `object` *(Object)*: The object to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -2994,12 +2999,12 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { This method is like `_.forOwn` except that it iterates over elements of a `collection` in the opposite order. #### Arguments -1. `object` *(object)*: The object to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `object` *(Object)*: The object to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns `object`. +*(Object)*: Returns `object`. #### Example ```js @@ -3025,10 +3030,10 @@ Creates a sorted array of property names of all enumerable properties, own and i *methods* #### Arguments -1. `object` *(object)*: The object to inspect. +1. `object` *(Object)*: The object to inspect. #### Returns -*(array)*: Returns an array of property names that have function values. +*(Array)*: Returns an array of property names that have function values. #### Example ```js @@ -3049,7 +3054,7 @@ _.functions(_); Checks if the specified object `property` exists and is a direct property, instead of an inherited property. #### Arguments -1. `object` *(object)*: The object to check. +1. `object` *(Object)*: The object to check. 2. `property` *(string)*: The property to check for. #### Returns @@ -3074,10 +3079,10 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); Creates an object composed of the inverted keys and values of the given object. #### Arguments -1. `object` *(object)*: The object to invert. +1. `object` *(Object)*: The object to invert. #### Returns -*(object)*: Returns the created inverted object. +*(Object)*: Returns the created inverted object. #### Example ```js @@ -3224,7 +3229,7 @@ _.isElement(document.body); Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty". #### Arguments -1. `value` *(array|object|string)*: The value to inspect. +1. `value` *(Array|Object|string)*: The value to inspect. #### Returns *(boolean)*: Returns `true` if the `value` is empty, else `false`. @@ -3256,7 +3261,7 @@ Performs a deep comparison between two values to determine if they are equivalen #### Arguments 1. `a` *(\*)*: The value to compare. 2. `b` *(\*)*: The other value to compare. -3. `[callback]` *(function)*: The function to customize comparing values. +3. `[callback]` *(Function)*: The function to customize comparing values. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns @@ -3586,10 +3591,10 @@ _.isUndefined(void 0); Creates an array composed of the own enumerable property names of an object. #### Arguments -1. `object` *(object)*: The object to inspect. +1. `object` *(Object)*: The object to inspect. #### Returns -*(array)*: Returns an array of property names. +*(Array)*: Returns an array of property names. #### Example ```js @@ -3610,13 +3615,13 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 }); Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined` into the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the merged values of the destination and source properties. If the callback returns `undefined` merging will be handled by the method instead. The callback is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*. #### Arguments -1. `object` *(object)*: The destination object. -2. `[source]` *(...object)*: The source objects. -3. `[callback]` *(function)*: The function to customize merging properties. +1. `object` *(Object)*: The destination object. +2. `[source]` *(...Object)*: The source objects. +3. `[callback]` *(Function)*: The function to customize merging properties. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns the destination object. +*(Object)*: Returns the destination object. #### Example ```js @@ -3666,12 +3671,12 @@ _.merge(food, otherFood, function(a, b) { Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` omitting the properties the callback returns truthy for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. #### Arguments -1. `object` *(object)*: The source object. -2. `[callback]` *(function|...string|string[])*: The properties to omit or the function called per iteration. +1. `object` *(Object)*: The source object. +2. `[callback]` *(Function|...string|string[])*: The properties to omit or the function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns an object without the omitted properties. +*(Object)*: Returns an object without the omitted properties. #### Example ```js @@ -3697,10 +3702,10 @@ _.omit({ 'name': 'moe', 'age': 40 }, function(value) { Creates a two dimensional array of an object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`. #### Arguments -1. `object` *(object)*: The object to inspect. +1. `object` *(Object)*: The object to inspect. #### Returns -*(array)*: Returns new array of key-value pairs. +*(Array)*: Returns new array of key-value pairs. #### Example ```js @@ -3721,12 +3726,12 @@ _.pairs({ 'moe': 30, 'larry': 40 }); Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` picking the properties the callback returns truthy for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. #### Arguments -1. `object` *(object)*: The source object. -2. `[callback]` *(function|...string|string[])*: The function called per iteration or property names to pick, specified as individual property names or arrays of property names. +1. `object` *(Object)*: The source object. +2. `[callback]` *(Function|...string|string[])*: The function called per iteration or property names to pick, specified as individual property names or arrays of property names. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(object)*: Returns an object composed of the picked properties. +*(Object)*: Returns an object composed of the picked properties. #### Example ```js @@ -3752,8 +3757,8 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) { An alternative to `_.reduce` this method transforms `object` to a new `accumulator` object which is the result of running each of its elements through a callback, with each callback execution potentially mutating the `accumulator` object. The callback is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`. #### Arguments -1. `collection` *(array|object)*: The collection to iterate over. -2. `[callback=identity]` *(function)*: The function called per iteration. +1. `collection` *(Array|Object)*: The collection to iterate over. +2. `[callback=identity]` *(Function)*: The function called per iteration. 3. `[accumulator]` *(\*)*: The custom accumulator value. 4. `[thisArg]` *(\*)*: The `this` binding of `callback`. @@ -3789,10 +3794,10 @@ var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) Creates an array composed of the own enumerable property values of `object`. #### Arguments -1. `object` *(object)*: The object to inspect. +1. `object` *(Object)*: The object to inspect. #### Returns -*(array)*: Returns an array of property values. +*(Array)*: Returns an array of property values. #### Example ```js @@ -3815,7 +3820,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 }); ### `_.escape(string)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5795 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5799 "View in source") [Ⓣ][1] Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities. @@ -3839,7 +3844,7 @@ _.escape('Moe, Larry & Curly'); ### `_.identity(value)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5813 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5817 "View in source") [Ⓣ][1] This method returns the first argument provided to it. @@ -3864,13 +3869,13 @@ moe === _.identity(moe); ### `_.mixin(object, object)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5840 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5844 "View in source") [Ⓣ][1] Adds function properties of a source object to the `lodash` function and chainable wrapper. #### Arguments -1. `object` *(object)*: The object of function properties to add to `lodash`. -2. `object` *(object)*: The object of function properties to add to `lodash`. +1. `object` *(Object)*: The object of function properties to add to `lodash`. +2. `object` *(Object)*: The object of function properties to add to `lodash`. #### Example ```js @@ -3895,12 +3900,12 @@ _('moe').capitalize(); ### `_.noConflict()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5878 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5882 "View in source") [Ⓣ][1] Reverts the '_' variable to its previous value and returns a reference to the `lodash` function. #### Returns -*(function)*: Returns the `lodash` function. +*(Function)*: Returns the `lodash` function. #### Example ```js @@ -3915,7 +3920,7 @@ var lodash = _.noConflict(); ### `_.parseInt(value, [radix])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5902 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5906 "View in source") [Ⓣ][1] Converts the given `value` into an integer of the specified `radix`. If `radix` is `undefined` or `0` a `radix` of `10` is used unless the `value` is a hexadecimal, in which case a `radix` of `16` is used. @@ -3942,7 +3947,7 @@ _.parseInt('08'); ### `_.random([min=0], [max=1])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5926 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5930 "View in source") [Ⓣ][1] Produces a random number between `min` and `max` *(inclusive)*. If only one argument is provided a number between `0` and the given number will be returned. @@ -3970,12 +3975,12 @@ _.random(5); ### `_.result(object, property)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5970 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5974 "View in source") [Ⓣ][1] Resolves the value of `property` on `object`. If `property` is a function it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is falsey then `undefined` is returned. #### Arguments -1. `object` *(object)*: The object to inspect. +1. `object` *(Object)*: The object to inspect. 2. `property` *(string)*: The property to get the value of. #### Returns @@ -4010,10 +4015,10 @@ _.result(object, 'stuff'); Create a new `lodash` function using the given `context` object. #### Arguments -1. `[context=root]` *(object)*: The context object. +1. `[context=root]` *(Object)*: The context object. #### Returns -*(function)*: Returns the `lodash` function. +*(Function)*: Returns the `lodash` function. * * * @@ -4022,8 +4027,8 @@ Create a new `lodash` function using the given `context` object. -### `_.template(text, data, options)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6061 "View in source") [Ⓣ][1] +### `_.template(text, data, [options], [options.escape], [options.evaluate], [options.imports], [options.interpolate], [sourceURL], [variable])` +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6065 "View in source") [Ⓣ][1] A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. @@ -4037,11 +4042,17 @@ http://developer.chrome.com/stable/extensions/sandboxingEval.html #### Arguments 1. `text` *(string)*: The template text. -2. `data` *(object)*: The data object used to populate the text. -3. `options` *(object)*: 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. +2. `data` *(Object)*: The data object used to populate the text. +3. `[options]` *(Object)*: The options object. +4. `[options.escape]` *(RegExp)*: The "escape" delimiter. +5. `[options.evaluate]` *(RegExp)*: The "evaluate" delimiter. +6. `[options.imports]` *(Object)*: An object to import into the template as local variables. +7. `[options.interpolate]` *(RegExp)*: The "interpolate" delimiter. +8. `[sourceURL]` *(string)*: The sourceURL of the template's compiled source. +9. `[variable]` *(string)*: The data object variable name. #### Returns -*((function, string)*): Returns a compiled function when no `data` object is given, else it returns the interpolated text. +*(Function, string)*: Returns a compiled function when no `data` object is given, else it returns the interpolated text. #### Example ```js @@ -4111,17 +4122,17 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ ### `_.times(n, callback, [thisArg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6186 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6190 "View in source") [Ⓣ][1] Executes the callback `n` times, returning an array of the results of each callback execution. The callback is bound to `thisArg` and invoked with one argument; *(index)*. #### Arguments 1. `n` *(number)*: The number of times to execute the callback. -2. `callback` *(function)*: The function called per iteration. +2. `callback` *(Function)*: The function called per iteration. 3. `[thisArg]` *(\*)*: The `this` binding of `callback`. #### Returns -*(array)*: Returns an array of the results of each `callback` execution. +*(Array)*: Returns an array of the results of each `callback` execution. #### Example ```js @@ -4143,7 +4154,7 @@ _.times(3, function(n) { this.cast(n); }, mage); ### `_.unescape(string)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6213 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6217 "View in source") [Ⓣ][1] The inverse of `_.escape` this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters. @@ -4167,7 +4178,7 @@ _.unescape('Moe, Larry & Curly'); ### `_.uniqueId([prefix])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6233 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6237 "View in source") [Ⓣ][1] Generates a unique ID. If `prefix` is provided the ID will be appended to it. @@ -4220,7 +4231,7 @@ A reference to the `lodash` function. ### `_.VERSION` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6542 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6546 "View in source") [Ⓣ][1] *(string)*: The semantic version number. @@ -4234,7 +4245,7 @@ A reference to the `lodash` function. ### `_.support` # [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L657 "View in source") [Ⓣ][1] -*(object)*: An object used to flag environments features. +*(Object)*: An object used to flag environments features. * * * @@ -4374,7 +4385,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters ### `_.templateSettings` # [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L791 "View in source") [Ⓣ][1] -*(object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters. +*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters. * * * @@ -4386,7 +4397,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters ### `_.templateSettings.escape` # [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L799 "View in source") [Ⓣ][1] -*(regexp)*: Used to detect `data` property values to be HTML-escaped. +*(RegExp)*: Used to detect `data` property values to be HTML-escaped. * * * @@ -4398,7 +4409,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters ### `_.templateSettings.evaluate` # [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L807 "View in source") [Ⓣ][1] -*(regexp)*: Used to detect code to be evaluated. +*(RegExp)*: Used to detect code to be evaluated. * * * @@ -4410,7 +4421,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters ### `_.templateSettings.interpolate` # [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L815 "View in source") [Ⓣ][1] -*(regexp)*: Used to detect `data` property values to inject. +*(RegExp)*: Used to detect `data` property values to inject. * * * @@ -4434,7 +4445,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters ### `_.templateSettings.imports` # [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L831 "View in source") [Ⓣ][1] -*(object)*: Used to import variables into the compiled template. +*(Object)*: Used to import variables into the compiled template. * * * diff --git a/lodash.js b/lodash.js index e7fd68a6f..327c3e12e 100644 --- a/lodash.js +++ b/lodash.js @@ -150,7 +150,7 @@ * or `fromIndex` constraints. * * @private - * @param {array} array The array to search. + * @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`. @@ -172,7 +172,7 @@ * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. * * @private - * @param {object} cache The cache object to inspect. + * @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`. */ @@ -238,8 +238,8 @@ * them in ascending order. * * @private - * @param {object} a The object to compare to `b`. - * @param {object} b The object to compare to `a`. + * @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) { @@ -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, @@ -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() || { @@ -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 {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. + * @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 @@ -603,7 +603,7 @@ * @constructor * @category Chaining * @param {*} value The value to wrap in a `lodash` instance. - * @returns {object} Returns a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. * @example * * var wrapped = _([1, 2, 3]); @@ -638,7 +638,7 @@ * @private * @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. + * @returns {Object} Returns a `lodash` instance. */ function lodashWrapper(value, chainAll) { this.__chain__ = !!chainAll; @@ -652,7 +652,7 @@ * * @static * @memberOf _ - * @type object + * @type Object */ var support = lodash.support = {}; @@ -786,7 +786,7 @@ * * @static * @memberOf _ - * @type object + * @type Object */ lodash.templateSettings = { @@ -794,7 +794,7 @@ * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'escape': /<%-([\s\S]+?)%>/g, @@ -802,7 +802,7 @@ * Used to detect code to be evaluated. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'evaluate': /<%([\s\S]+?)%>/g, @@ -810,7 +810,7 @@ * Used to detect `data` property values to inject. * * @memberOf _.templateSettings - * @type regexp + * @type RegExp */ 'interpolate': reInterpolate, @@ -826,7 +826,7 @@ * Used to import variables into the compiled template. * * @memberOf _.templateSettings - * @type object + * @type Object */ 'imports': { @@ -834,7 +834,7 @@ * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports - * @type function + * @type Function */ '_': lodash } @@ -846,7 +846,7 @@ * The template used to create iterator functions. * * @private - * @param {object} data The data object used to populate the text. + * @param {Object} data The data object used to populate the text. * @returns {string} Returns the interpolated text. */ var iteratorTemplate = template( @@ -966,9 +966,9 @@ * @private * @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. + * @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) { @@ -1057,7 +1057,7 @@ * @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. + * @returns {Function} Returns a callback function. */ function baseCreateCallback(func, thisArg, argCount) { if (typeof func != 'function') { @@ -1099,11 +1099,11 @@ * shorthands or `thisArg` binding. * * @private - * @param {array} array The array to flatten. + * @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. + * @returns {Array} Returns a new flattened array. */ function baseFlatten(array, isShallow, isArgArrays, fromIndex) { var index = (fromIndex || 0) - 1, @@ -1129,10 +1129,10 @@ * @private * @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. + * @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) { @@ -1296,11 +1296,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) { @@ -1361,10 +1361,10 @@ * or `thisArg` binding. * * @private - * @param {array} array The array to process. + * @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 {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. */ function baseUniq(array, isSorted, callback) { var index = -1, @@ -1415,8 +1415,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) { @@ -1445,7 +1445,7 @@ * with an optional `this` binding and partially applied arguments. * * @private - * @param {(function|string)} func The function or method name to reference. + * @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` @@ -1454,13 +1454,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 {*} [thisArg] The `this` binding of `func`. * @param {number} [arity] The arity of `func`. - * @returns {function} Returns the new bound function. + * @returns {Function} Returns the new bound function. */ function createBound(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { var isBind = bitmask & 1, @@ -1554,15 +1554,15 @@ * Creates compiled iteration functions. * * @private - * @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. - * args - A string of comma separated arguments the iteration function will accept. - * 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. + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. */ function createIterator() { var data = getObject(); @@ -1607,8 +1607,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) : {}; @@ -1642,7 +1642,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; @@ -1653,7 +1653,7 @@ * Sets `this` binding data on a given function. * * @private - * @param {function} func The function to set data on. + * @param {Function} func The function to set data on. * @param {*} value The value to set. */ var setBindData = !defineProperty ? noop : function(func, value) { @@ -1747,7 +1747,7 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects * @param {*} value The value to check. * @returns {boolean} Returns `true` if the `value` is an array, else `false`. @@ -1768,9 +1768,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', @@ -1785,8 +1785,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 }); @@ -1864,11 +1864,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. + * @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`. + * @returns {Array|Object|string} Returns `collection`. */ var baseEach = createIterator(eachIteratorOptions); @@ -1883,14 +1883,14 @@ * * @static * @memberOf _ - * @type function + * @type Function * @alias extend * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] The source objects. - * @param {function} [callback] The function to customize assigning values. + * @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. + * @returns {Object} Returns the destination object. * @example * * _.assign({ 'name': 'moe' }, { 'age': 40 }); @@ -1929,7 +1929,7 @@ * @category Objects * @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 {Function} [callback] The function to customize cloning values. * @param {*} [thisArg] The `this` binding of `callback`. * @returns {*} Returns the cloned `value`. * @example @@ -1983,7 +1983,7 @@ * @memberOf _ * @category Objects * @param {*} value The value to deep clone. - * @param {function} [callback] The function to customize cloning values. + * @param {Function} [callback] The function to customize cloning values. * @param {*} [thisArg] The `this` binding of `callback`. * @returns {*} Returns the deep cloned `value`. * @example @@ -2020,13 +2020,13 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] 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' }; @@ -2042,8 +2042,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2074,8 +2074,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -2107,12 +2107,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 {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`. + * @returns {Object} Returns `object`. * @example * * function Dog(name) { @@ -2139,10 +2139,10 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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`. + * @returns {Object} Returns `object`. * @example * * function Dog(name) { @@ -2183,12 +2183,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 {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`. + * @returns {Object} Returns `object`. * @example * * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2205,10 +2205,10 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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`. + * @returns {Object} Returns `object`. * @example * * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { @@ -2238,8 +2238,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(_); @@ -2262,7 +2262,7 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The object to check. + * @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 @@ -2280,8 +2280,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' }); @@ -2359,7 +2359,7 @@ * @static * @memberOf _ * @category Objects - * @param {(array|object|string)} value The value to inspect. + * @param {Array|Object|string} value The value to inspect. * @returns {boolean} Returns `true` if the `value` is empty, else `false`. * @example * @@ -2403,7 +2403,7 @@ * @category Objects * @param {*} a The value to compare. * @param {*} b The other value to compare. - * @param {function} [callback] The function to customize comparing values. + * @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 @@ -2685,11 +2685,11 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The destination object. - * @param {...object} [source] The source objects. - * @param {function} [callback] The function to customize merging properties. + * @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. + * @returns {Object} Returns the destination object. * @example * * var names = { @@ -2765,11 +2765,11 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The source object. - * @param {(function|...string|string[])} [callback] The properties to omit or the + * @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. + * @returns {Object} Returns an object without the omitted properties. * @example * * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); @@ -2808,8 +2808,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 }); @@ -2839,12 +2839,12 @@ * @static * @memberOf _ * @category Objects - * @param {object} object The source object. - * @param {(function|...string|string[])} [callback] The function called per + * @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. + * @returns {Object} Returns an object composed of the picked properties. * @example * * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); @@ -2890,8 +2890,8 @@ * @static * @memberOf _ * @category Objects - * @param {(array|object)} collection The collection to iterate over. - * @param {function} [callback=identity] The function called per iteration. + * @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. @@ -2936,8 +2936,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 }); @@ -2965,10 +2965,10 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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 * @@ -3003,7 +3003,7 @@ * @memberOf _ * @alias include * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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`. @@ -3060,12 +3060,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3097,8 +3097,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3159,12 +3159,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that passed the callback check. + * @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; }); @@ -3223,8 +3223,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3282,8 +3282,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3317,10 +3317,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 {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`. + * @returns {Array|Object|string} Returns `collection`. * @example * * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); @@ -3353,10 +3353,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 {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`. + * @returns {Array|Object|string} Returns `collection`. * @example * * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); @@ -3405,12 +3405,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); @@ -3444,12 +3444,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {object} Returns the composed aggregate object. + * @returns {Object} Returns the composed aggregate object. * @example * * var keys = [ @@ -3479,11 +3479,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 {...*} [arg] Arguments to invoke the method with. - * @returns {array} Returns a new array of the results of each invoked method. + * @returns {Array} Returns a new array of the results of each invoked method. * @example * * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); @@ -3521,12 +3521,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of the results of each `callback` execution. + * @returns {Array} Returns a new array of the results of each `callback` execution. * @example * * _.map([1, 2, 3], function(num) { return num * 3; }); @@ -3578,8 +3578,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3647,8 +3647,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -3705,11 +3705,11 @@ * * @static * @memberOf _ - * @type function + * @type Function * @category Collections - * @param {(array|object|string)} collection The collection to iterate over. + * @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. + * @returns {Array} Returns a new array of property values. * @example * * var stooges = [ @@ -3734,8 +3734,8 @@ * @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 {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. @@ -3784,8 +3784,8 @@ * @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 {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. @@ -3820,12 +3820,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of elements that failed the callback check. + * @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; }); @@ -3857,11 +3857,11 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to sample. + * @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- {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]); @@ -3889,8 +3889,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]); @@ -3916,7 +3916,7 @@ * @static * @memberOf _ * @category Collections - * @param {(array|object|string)} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns `collection.length` or number of own enumerable properties. * @example * @@ -3951,8 +3951,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4014,12 +4014,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of sorted elements. + * @returns {Array} Returns a new array of sorted elements. * @example * * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); @@ -4061,8 +4061,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); @@ -4084,11 +4084,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 = [ @@ -4113,8 +4113,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]); @@ -4141,9 +4141,9 @@ * @static * @memberOf _ * @category Arrays - * @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. + * @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]); @@ -4186,8 +4186,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4219,8 +4219,8 @@ * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4260,8 +4260,8 @@ * @memberOf _ * @alias head, take * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -4337,13 +4337,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to flatten. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new flattened array. + * @returns {Array} Returns a new flattened array. * @example * * _.flatten([1, [2], [3, [[4]]]]); @@ -4382,9 +4382,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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` + * @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`. * @example @@ -4425,13 +4425,13 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.initial([1, 2, 3]); @@ -4490,8 +4490,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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]); @@ -4558,8 +4558,8 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback] 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. @@ -4626,7 +4626,7 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to search. + * @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`. @@ -4658,9 +4658,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to modify. + * @param {Array} array The array to modify. * @param {...*} [value] The values to remove. - * @returns {array} Returns `array`. + * @returns {Array} Returns `array`. * @example * * var array = [1, 2, 3, 1, 2, 3]; @@ -4698,7 +4698,7 @@ * @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. + * @returns {Array} Returns a new range array. * @example * * _.range(10); @@ -4755,12 +4755,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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a new array of removed elements. + * @returns {Array} Returns a new array of removed elements. * @example * * var array = [1, 2, 3, 4, 5, 6]; @@ -4807,13 +4807,13 @@ * @memberOf _ * @alias drop, tail * @category Arrays - * @param {array} array The array to query. - * @param {(function|object|number|string)} [callback=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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a slice of `array`. + * @returns {Array} Returns a slice of `array`. * @example * * _.rest([1, 2, 3]); @@ -4879,9 +4879,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to inspect. + * @param {Array} array The array to inspect. * @param {*} value The value to evaluate. - * @param {(function|object|string)} [callback=identity] The function called + * @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 {*} [thisArg] The `this` binding of `callback`. @@ -4934,8 +4934,8 @@ * @static * @memberOf _ * @category Arrays - * @param {...array} [array] 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]); @@ -4964,13 +4964,13 @@ * @memberOf _ * @alias unique * @category Arrays - * @param {array} array The array to process. + * @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 {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 {*} [thisArg] The `this` binding of `callback`. - * @returns {array} Returns a duplicate-value-free array. + * @returns {Array} Returns a duplicate-value-free array. * @example * * _.uniq([1, 2, 1, 3, 1]); @@ -5009,9 +5009,9 @@ * @static * @memberOf _ * @category Arrays - * @param {array} array The array to filter. + * @param {Array} array The array to filter. * @param {...*} [value] The values to exclude. - * @returns {array} Returns a new array of filtered values. + * @returns {Array} Returns a new array of filtered values. * @example * * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); @@ -5030,8 +5030,8 @@ * @memberOf _ * @alias unzip * @category Arrays - * @param {...array} [array] 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]); @@ -5058,9 +5058,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 * @@ -5094,8 +5094,8 @@ * @category Functions * @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); @@ -5123,10 +5123,10 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to bind. + * @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. + * @returns {Function} Returns the new bound function. * @example * * var func = function(greeting) { @@ -5138,7 +5138,9 @@ * // => 'hi moe' */ function bind(func, thisArg) { - return createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg); + return arguments.length > 2 + ? createBound(func, 17, nativeSlice.call(arguments, 2), null, thisArg) + : createBound(func, 1, null, null, thisArg); } /** @@ -5150,10 +5152,10 @@ * @static * @memberOf _ * @category Functions - * @param {object} object The object to bind and assign the bound methods 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 = { @@ -5187,10 +5189,10 @@ * @static * @memberOf _ * @category Functions - * @param {object} object The object the method belongs to. + * @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. + * @returns {Function} Returns the new bound function. * @example * * var object = { @@ -5212,7 +5214,9 @@ * // => 'hi, moe!' */ function bindKey(object, key) { - return createBound(key, 19, nativeSlice.call(arguments, 2), null, object); + return arguments.length > 2 + ? createBound(key, 19, nativeSlice.call(arguments, 2), null, object) + : createBound(key, 3, null, null, object); } /** @@ -5224,8 +5228,8 @@ * @static * @memberOf _ * @category Functions - * @param {...function} [func] 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 = { @@ -5277,7 +5281,7 @@ * @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. + * @returns {Function} Returns a callback function. * @example * * var stooges = [ @@ -5343,9 +5347,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to curry. + * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. - * @returns {function} Returns the new curried function. + * @returns {Function} Returns the new curried function. * @example * * var curried = _.curry(function(a, b, c) { @@ -5380,13 +5384,13 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to debounce. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. * @example * * // avoid costly calculations while the window size is in flux @@ -5500,7 +5504,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to defer. + * @param {Function} func The function to defer. * @param {...*} [arg] Arguments to invoke the function with. * @returns {number} Returns the timer id. * @example @@ -5532,7 +5536,7 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to delay. + * @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. @@ -5561,9 +5565,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) { @@ -5608,8 +5612,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); @@ -5645,9 +5649,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to partially apply arguments to. + * @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. + * @returns {Function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { return greeting + ' ' + name; }; @@ -5666,9 +5670,9 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to partially apply arguments to. + * @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. + * @returns {Function} Returns the new partially applied function. * @example * * var defaultsDeep = _.partialRight(_.merge, _.defaults); @@ -5704,12 +5708,12 @@ * @static * @memberOf _ * @category Functions - * @param {function} func The function to throttle. + * @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. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. * @example * * // avoid excessively updating the position while scrolling @@ -5754,8 +5758,8 @@ * @memberOf _ * @category Functions * @param {*} value The value to wrap. - * @param {function} wrapper The wrapper function. - * @returns {function} Returns the new function. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. * @example * * var hello = function(name) { return 'hello ' + name; }; @@ -5821,8 +5825,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({ @@ -5870,7 +5874,7 @@ * @static * @memberOf _ * @category Utilities - * @returns {function} Returns the `lodash` function. + * @returns {Function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); @@ -5949,7 +5953,7 @@ * @static * @memberOf _ * @category Utilities - * @param {object} object The object to inspect. + * @param {Object} object The object to inspect. * @param {string} property The property to get the value of. * @returns {*} Returns the resolved value. * @example @@ -5989,15 +5993,15 @@ * @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. - * 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 + * @param {Object} data The data object used to populate the text. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as local variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [sourceURL] The sourceURL of the template's compiled source. + * @param {string} [variable] The data object variable name. + * @returns {Function|string} Returns a compiled function when no `data` object * is given, else it returns the interpolated text. * @example * @@ -6169,9 +6173,9 @@ * @memberOf _ * @category Utilities * @param {number} n The number of times to execute the callback. - * @param {function} callback The function called per iteration. + * @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. + * @returns {Array} Returns an array of the results of each `callback` execution. * @example * * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); @@ -6244,7 +6248,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to wrap. - * @returns {object} Returns the wrapper object. + * @returns {Object} Returns the wrapper object. * @example * * var stooges = [ @@ -6275,7 +6279,7 @@ * @memberOf _ * @category Chaining * @param {*} value The value to provide to `interceptor`. - * @param {function} interceptor The function to invoke. + * @param {Function} interceptor The function to invoke. * @returns {*} Returns `value`. * @example * diff --git a/perf/perf-ui.js b/perf/perf-ui.js index 1282e28ce..6a1d6f0ea 100644 --- a/perf/perf-ui.js +++ b/perf/perf-ui.js @@ -21,7 +21,7 @@ * @private * @param {Element} element The element. * @param {string} eventName The name of the event. - * @param {function} handler The event handler. + * @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 c54896143..6075d41ee 100644 --- a/perf/perf.js +++ b/perf/perf.js @@ -113,7 +113,7 @@ * See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms. * * @private - * @param {array} array The array of values. + * @param {Array} array The array of values. * @returns {number} The geometric mean. */ function getGeometricMean(array) { @@ -127,7 +127,7 @@ * margin of error. * * @private - * @param {object} bench The benchmark object. + * @param {Object} bench The benchmark object. * @returns {number} Returns the adjusted Hz. */ function getHz(bench) { @@ -591,7 +591,7 @@ /*--------------------------------------------------------------------------*/ suites.push( - Benchmark.Suite('`_.bind` (uses native `Function#bind` if available and inferred fast)') + Benchmark.Suite('`_.bind` with partially applied arguments (uses native `Function#bind` if available and inferred fast)') .add(buildName, { 'fn': 'lodash.bind(func, { "name": "moe" }, "hi")', 'teardown': 'function bind(){}' diff --git a/test/test-build.js b/test/test-build.js index 73d43c548..823ef5570 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -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) { @@ -372,7 +372,7 @@ * * @private * @param {string} funcName The name of the function to get aliases for. - * @returns {array} Returns an array of aliases. + * @returns {Array} Returns an array of aliases. */ function getAliases(funcName) { return realToAliasMap[funcName] || []; @@ -393,7 +393,7 @@ * Tests if a given method can be called successfully. * * @private - * @param {object} lodash The built Lo-Dash object. + * @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. */ diff --git a/test/test-ui.js b/test/test-ui.js index d9a9ac8ca..67e2e54b8 100644 --- a/test/test-ui.js +++ b/test/test-ui.js @@ -21,7 +21,7 @@ * @private * @param {Element} element The element. * @param {string} eventName The name of the event. - * @param {function} handler The event handler. + * @param {Function} handler The event handler. * @returns {Element} The element. */ function addListener(element, eventName, handler) { diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index e9c49b29f..9b2b94a07 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -105,8 +105,8 @@ * * @static * @memberOf Benchmark - * @param {object} [context=window] The context object. - * @returns {function} Returns the `Benchmark` function. + * @param {Object} [context=window] The context object. + * @returns {Function} Returns the `Benchmark` function. */ function runInContext(context) { // exit early if unable to acquire lodash @@ -181,7 +181,7 @@ * * @static * @memberOf Benchmark - * @type object + * @type Object */ var support = {}; @@ -245,7 +245,7 @@ * Timer object used by `clock()` and `Deferred#resolve`. * * @private - * @type object + * @type Object */ var timer = { @@ -254,7 +254,7 @@ * * @private * @memberOf timer - * @type {(function|object)} + * @type {Function|Object} */ 'ns': Date, @@ -263,7 +263,7 @@ * * @private * @memberOf timer - * @param {object} deferred The deferred instance. + * @param {Object} deferred The deferred instance. */ 'start': null, // lazy defined in `clock()` @@ -272,7 +272,7 @@ * * @private * @memberOf timer - * @param {object} deferred The deferred instance. + * @param {Object} deferred The deferred instance. */ 'stop': null // lazy defined in `clock()` }; @@ -284,8 +284,8 @@ * * @constructor * @param {string} name A name to identify the benchmark. - * @param {(function|string)} fn The test to benchmark. - * @param {object} [options={}] Options object. + * @param {Function|string} fn The test to benchmark. + * @param {Object} [options={}] Options object. * @example * * // basic usage (the `new` operator is optional) @@ -394,7 +394,7 @@ * * @constructor * @memberOf Benchmark - * @param {object} clone The cloned benchmark instance. + * @param {Object} clone The cloned benchmark instance. */ function Deferred(clone) { var deferred = this; @@ -410,7 +410,7 @@ * * @constructor * @memberOf Benchmark - * @param {(object|string)} type The event type. + * @param {Object|string} type The event type. */ function Event(type) { var event = this; @@ -428,7 +428,7 @@ * @constructor * @memberOf Benchmark * @param {string} name A name to identify the suite. - * @param {object} [options={}] Options object. + * @param {Object} [options={}] Options object. * @example * * // basic usage (the `new` operator is optional) @@ -499,7 +499,7 @@ * @private * @param {string} args The comma separated function arguments. * @param {string} body The function body. - * @returns {function} The new function. + * @returns {Function} The new function. */ function createFunction() { // lazy define @@ -523,8 +523,8 @@ * Delay the execution of a function based on the benchmark's `delay` property. * * @private - * @param {object} bench The benchmark instance. - * @param {object} fn The function to execute. + * @param {Object} bench The benchmark instance. + * @param {Object} fn The function to execute. */ function delay(bench, fn) { bench._timerId = _.delay(fn, bench.delay * 1e3); @@ -545,7 +545,7 @@ * Gets the name of the first argument from a function's source. * * @private - * @param {function} fn The function. + * @param {Function} fn The function. * @returns {string} The argument name. */ function getFirstArgument(fn) { @@ -558,7 +558,7 @@ * See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms. * * @private - * @param {array} sample The sample. + * @param {Array} sample The sample. * @returns {number} The geometric mean. */ function getGeometricMean(sample) { @@ -571,7 +571,7 @@ * Computes the arithmetic mean of a sample. * * @private - * @param {array} sample The sample. + * @param {Array} sample The sample. * @returns {number} The mean. */ function getMean(sample) { @@ -584,7 +584,7 @@ * Gets the source code of a function. * * @private - * @param {function} fn The function. + * @param {Function} fn The function. * @param {string} altSource A string used when a function's source code is unretrievable. * @returns {string} The function's source code. */ @@ -704,8 +704,8 @@ * A helper function for setting options/event handlers. * * @private - * @param {object} object The benchmark or suite instance. - * @param {object} [options={}] Options object. + * @param {Object} object The benchmark or suite instance. + * @param {Object} [options={}] Options object. */ function setOptions(object, options) { options = _.extend({}, object.constructor.options, options); @@ -758,10 +758,10 @@ * * @static * @memberOf Benchmark - * @param {array} array The array to iterate over. - * @param {(function|string)} callback The function/alias called per iteration. + * @param {Array} array The array to iterate over. + * @param {Function|string} callback The function/alias called per iteration. * @param {*} thisArg The `this` binding for the callback. - * @returns {array} A new array of values that passed callback filter. + * @returns {Array} A new array of values that passed callback filter. * @example * * // get odd numbers @@ -818,10 +818,10 @@ * * @static * @memberOf Benchmark - * @param {array} benches Array of benchmarks to iterate over. - * @param {(object|string)} name The name of the method to invoke OR options object. + * @param {Array} benches Array of benchmarks to iterate over. + * @param {Object|string} name The name of the method to invoke OR options object. * @param {...*} [arg] Arguments to invoke the method with. - * @returns {array} A new array of values returned from each method invoked. + * @returns {Array} A new array of values returned from each method invoked. * @example * * // invoke `reset` on all benchmarks @@ -999,7 +999,7 @@ * * @static * @memberOf Benchmark - * @param {(array|object)} object The object to operate on. + * @param {Array|Object} object The object to operate on. * @param {string} [separator1=','] The separator used between key-value pairs. * @param {string} [separator2=': '] The separator used between keys and values. * @returns {string} The joined result. @@ -1023,7 +1023,7 @@ * * @name abort * @memberOf Benchmark.Suite - * @returns {object} The suite instance. + * @returns {Object} The suite instance. */ function abortSuite() { var event, @@ -1053,9 +1053,9 @@ * * @memberOf Benchmark.Suite * @param {string} name A name to identify the benchmark. - * @param {(function|string)} fn The test to benchmark. - * @param {object} [options={}] Options object. - * @returns {object} The benchmark instance. + * @param {Function|string} fn The test to benchmark. + * @param {Object} [options={}] Options object. + * @returns {Object} The benchmark instance. * @example * * // basic usage @@ -1101,8 +1101,8 @@ * * @name clone * @memberOf Benchmark.Suite - * @param {object} options Options object to overwrite cloned options. - * @returns {object} The new suite instance. + * @param {Object} options Options object to overwrite cloned options. + * @returns {Object} The new suite instance. */ function cloneSuite(options) { var suite = this, @@ -1124,8 +1124,8 @@ * * @name filter * @memberOf Benchmark.Suite - * @param {(function|string)} callback The function/alias called per iteration. - * @returns {object} A new suite of benchmarks that passed callback filter. + * @param {Function|string} callback The function/alias called per iteration. + * @returns {Object} A new suite of benchmarks that passed callback filter. */ function filterSuite(callback) { var suite = this, @@ -1140,7 +1140,7 @@ * * @name reset * @memberOf Benchmark.Suite - * @returns {object} The suite instance. + * @returns {Object} The suite instance. */ function resetSuite() { var event, @@ -1169,8 +1169,8 @@ * * @name run * @memberOf Benchmark.Suite - * @param {object} [options={}] Options object. - * @returns {object} The suite instance. + * @param {Object} [options={}] Options object. + * @returns {Object} The suite instance. * @example * * // basic usage @@ -1215,7 +1215,7 @@ * Executes all registered listeners of the specified event type. * * @memberOf Benchmark, Benchmark.Suite - * @param {(object|string)} type The event type or object. + * @param {Object|string} type The event type or object. * @returns {*} Returns the return value of the last listener executed. */ function emit(type) { @@ -1246,7 +1246,7 @@ * * @memberOf Benchmark, Benchmark.Suite * @param {string} type The event type. - * @returns {array} The listeners array. + * @returns {Array} The listeners array. */ function listeners(type) { var object = this, @@ -1262,8 +1262,8 @@ * * @memberOf Benchmark, Benchmark.Suite * @param {string} [type] The event type. - * @param {function} [listener] The function to unregister. - * @returns {object} The benchmark instance. + * @param {Function} [listener] The function to unregister. + * @returns {Object} The benchmark instance. * @example * * // unregister a listener for an event type @@ -1313,8 +1313,8 @@ * * @memberOf Benchmark, Benchmark.Suite * @param {string} type The event type. - * @param {function} listener The function to register. - * @returns {object} The benchmark instance. + * @param {Function} listener The function to register. + * @returns {Object} The benchmark instance. * @example * * // register a listener for an event type @@ -1342,7 +1342,7 @@ * Aborts the benchmark without recording times. * * @memberOf Benchmark - * @returns {object} The benchmark instance. + * @returns {Object} The benchmark instance. */ function abort() { var event, @@ -1375,8 +1375,8 @@ * Creates a new benchmark using the same test and options. * * @memberOf Benchmark - * @param {object} options Options object to overwrite cloned options. - * @returns {object} The new benchmark instance. + * @param {Object} options Options object to overwrite cloned options. + * @returns {Object} The new benchmark instance. * @example * * var bizarro = bench.clone({ @@ -1405,7 +1405,7 @@ * Determines if a benchmark is faster than another. * * @memberOf Benchmark - * @param {object} other The benchmark to compare. + * @param {Object} other The benchmark to compare. * @returns {number} Returns `-1` if slower, `1` if faster, and `0` if indeterminate. */ function compare(other) { @@ -1459,7 +1459,7 @@ * Reset properties and abort if running. * * @memberOf Benchmark - * @returns {object} The benchmark instance. + * @returns {Object} The benchmark instance. */ function reset() { var data, @@ -1557,7 +1557,7 @@ * Clocks the time taken to execute a test per cycle (secs). * * @private - * @param {object} bench The benchmark instance. + * @param {Object} bench The benchmark instance. * @returns {number} The time taken. */ function clock() { @@ -1872,8 +1872,8 @@ * Computes stats on benchmark results. * * @private - * @param {object} bench The benchmark instance. - * @param {object} options The options object. + * @param {Object} bench The benchmark instance. + * @param {Object} options The options object. */ function compute(bench, options) { options || (options = {}); @@ -2026,8 +2026,8 @@ * Cycles a benchmark until a run `count` can be established. * * @private - * @param {object} clone The cloned benchmark instance. - * @param {object} options The options object. + * @param {Object} clone The cloned benchmark instance. + * @param {Object} options The options object. */ function cycle(clone, options) { options || (options = {}); @@ -2130,8 +2130,8 @@ * Runs the benchmark. * * @memberOf Benchmark - * @param {object} [options={}] Options object. - * @returns {object} The benchmark instance. + * @param {Object} [options={}] Options object. + * @returns {Object} The benchmark instance. * @example * * // basic usage @@ -2187,7 +2187,7 @@ * * @static * @memberOf Benchmark - * @type object + * @type Object */ 'options': { @@ -2270,7 +2270,7 @@ * An event listener called when the benchmark is aborted. * * @memberOf Benchmark.options - * @type function + * @type Function */ 'onAbort': undefined, @@ -2278,7 +2278,7 @@ * An event listener called when the benchmark completes running. * * @memberOf Benchmark.options - * @type function + * @type Function */ 'onComplete': undefined, @@ -2286,7 +2286,7 @@ * An event listener called after each run cycle. * * @memberOf Benchmark.options - * @type function + * @type Function */ 'onCycle': undefined, @@ -2294,7 +2294,7 @@ * An event listener called when a test errors. * * @memberOf Benchmark.options - * @type function + * @type Function */ 'onError': undefined, @@ -2302,7 +2302,7 @@ * An event listener called when the benchmark is reset. * * @memberOf Benchmark.options - * @type function + * @type Function */ 'onReset': undefined, @@ -2310,7 +2310,7 @@ * An event listener called when the benchmark starts running. * * @memberOf Benchmark.options - * @type function + * @type Function */ 'onStart': undefined }, @@ -2321,7 +2321,7 @@ * * @static * @memberOf Benchmark - * @type object + * @type Object */ 'platform': context.platform || req('platform') || ({ 'description': context.navigator && context.navigator.userAgent || null, @@ -2393,7 +2393,7 @@ * The compiled test function. * * @memberOf Benchmark - * @type function|...string + * @type {Function|string} */ 'compiled': undefined, @@ -2401,7 +2401,7 @@ * The error object if the test failed. * * @memberOf Benchmark - * @type object + * @type Object */ 'error': undefined, @@ -2409,7 +2409,7 @@ * The test to benchmark. * * @memberOf Benchmark - * @type function|...string + * @type {Function|string} */ 'fn': undefined, @@ -2433,7 +2433,7 @@ * Compiled into the test and executed immediately **before** the test loop. * * @memberOf Benchmark - * @type function|...string + * @type {Function|string} * @example * * // basic usage @@ -2496,7 +2496,7 @@ * Compiled into the test and executed immediately **after** the test loop. * * @memberOf Benchmark - * @type function|...string + * @type {Function|string} */ 'teardown': noop, @@ -2504,7 +2504,7 @@ * An object of stats including mean, margin or error, and standard deviation. * * @memberOf Benchmark - * @type object + * @type Object */ 'stats': { @@ -2569,7 +2569,7 @@ * An object of timing data including cycle, elapsed, period, start, and stop. * * @memberOf Benchmark - * @type object + * @type Object */ 'times': { @@ -2628,7 +2628,7 @@ * The deferred benchmark instance. * * @memberOf Benchmark.Deferred - * @type object + * @type Object */ 'benchmark': null, @@ -2685,7 +2685,7 @@ * The object whose listeners are currently being processed. * * @memberOf Benchmark.Event - * @type object + * @type Object */ 'currentTarget': undefined, @@ -2701,7 +2701,7 @@ * The object to which the event was originally emitted. * * @memberOf Benchmark.Event - * @type object + * @type Object */ 'target': undefined, @@ -2729,7 +2729,7 @@ * * @static * @memberOf Benchmark.Suite - * @type object + * @type Object */ Suite.options = { diff --git a/vendor/docdown/docdown.php b/vendor/docdown/docdown.php index e933e0a10..b25ea915b 100644 --- a/vendor/docdown/docdown.php +++ b/vendor/docdown/docdown.php @@ -9,7 +9,7 @@ require(dirname(__FILE__) . '/src/DocDown/MarkdownGenerator.php'); /** * Generates Markdown from JSDoc entries in a given file. * - * @param {array} [$options=array()] The options array. + * @param {Array} [$options=array()] The options array. * @returns {string} The generated Markdown. * @example * diff --git a/vendor/docdown/src/DocDown/Alias.php b/vendor/docdown/src/DocDown/Alias.php index 65ba4f755..c04e55cbf 100644 --- a/vendor/docdown/src/DocDown/Alias.php +++ b/vendor/docdown/src/DocDown/Alias.php @@ -20,7 +20,7 @@ class Alias { * * @constructor * @param {string} $name The alias name. - * @param {object} $owner The alias owner. + * @param {Object} $owner The alias owner. */ public function __construct( $name, $owner ) { $this->owner = $owner; @@ -48,7 +48,7 @@ class Alias { * * @memberOf Alias * @param {number} $index The index of the array value to return. - * @returns {(array|string)} The entry's `alias` objects. + * @returns {Array|string} The entry's `alias` objects. */ public function getAliases( $index = null ) { $result = array(); @@ -172,7 +172,7 @@ class Alias { * * @memberOf Alias * @param {number} $index The index of the array value to return. - * @returns {(array|string)} The owner entry's `member` data. + * @returns {Array|string} The owner entry's `member` data. */ public function getMembers( $index = null ) { return $index !== null @@ -195,7 +195,7 @@ class Alias { * * @memberOf Alias * @param {number} $index The index of the array value to return. - * @returns {array} The owner entry's `param` data. + * @returns {Array} The owner entry's `param` data. */ public function getParams( $index = null ) { return $index !== null diff --git a/vendor/docdown/src/DocDown/Entry.php b/vendor/docdown/src/DocDown/Entry.php index 51a8ebb0a..e1e7b56a4 100644 --- a/vendor/docdown/src/DocDown/Entry.php +++ b/vendor/docdown/src/DocDown/Entry.php @@ -55,7 +55,7 @@ class Entry { * @static * @memberOf Entry * @param {string} $source The source code. - * @returns {array} The array of entries. + * @returns {Array} The array of entries. */ public static function getEntries( $source ) { preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); @@ -90,7 +90,7 @@ class Entry { * * @memberOf Entry * @param {number} $index The index of the array value to return. - * @returns {(array|string)} The entry's `alias` objects. + * @returns {Array|string} The entry's `alias` objects. */ public function getAliases( $index = null ) { if (!isset($this->_aliases)) { @@ -167,7 +167,7 @@ class Entry { if (count($result)) { $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); } else { - $result = $this->getType() == 'function' ? 'Methods' : 'Properties'; + $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; } $this->_category = $result; return $result; @@ -191,7 +191,7 @@ class Entry { $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); $result = trim($result); - $result = ($type == 'function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; + $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; } $this->_desc = $result; return $result; @@ -330,7 +330,7 @@ class Entry { * * @memberOf Entry * @param {number} $index The index of the array value to return. - * @returns {(array|string)} The entry's `member` data. + * @returns {Array|string} The entry's `member` data. */ public function getMembers( $index = null ) { if (!isset($this->_members)) { @@ -373,7 +373,7 @@ class Entry { * * @memberOf Entry * @param {number} $index The index of the array value to return. - * @returns {array} The entry's `param` data. + * @returns {Array} The entry's `param` data. */ public function getParams( $index = null ) { if (!isset($this->_params)) { @@ -434,9 +434,12 @@ class Entry { preg_match('#\*[\t ]*@type\s(?:\{\(?)?([^)}\n]+)#', $this->entry, $result); if (count($result)) { - $result = trim(strtolower($result[1])); + $result = trim($result[1]); + if (preg_match('/^(?:array|function|object|regexp)$/', $result)) { + $result = ucfirst($result); + } } else { - $result = $this->isFunction() ? 'function' : 'unknown'; + $result = $this->isFunction() ? 'Function' : 'unknown'; } $this->_type = $result; return $result; diff --git a/vendor/docdown/src/DocDown/MarkdownGenerator.php b/vendor/docdown/src/DocDown/MarkdownGenerator.php index 10ccdf7a8..1b8edd122 100644 --- a/vendor/docdown/src/DocDown/MarkdownGenerator.php +++ b/vendor/docdown/src/DocDown/MarkdownGenerator.php @@ -56,7 +56,7 @@ class MarkdownGenerator { * * @constructor * @param {string} $source The source code to parse. - * @param {array} $options The options array. + * @param {Array} $options The options array. */ public function __construct( $source, $options = array() ) { // juggle arguments @@ -139,7 +139,7 @@ class MarkdownGenerator { * @static * @memberOf MarkdownGenerator * @param {string} $string The string to modify. - * @param {(array|object)} $object The template object. + * @param {Array|Object} $object The template object. * @returns {string} The modified string. */ private static function interpolate( $string, $object ) { @@ -175,8 +175,8 @@ class MarkdownGenerator { * * @private * @memberOf MarkdownGenerator - * @param {array} $result The result array to modify. - * @param {array} $entries The entries to add to the `$result`. + * @param {Array} $result The result array to modify. + * @param {Array} $entries The entries to add to the `$result`. */ private function addEntries( &$result, $entries ) { foreach ($entries as $entry) { @@ -235,7 +235,7 @@ class MarkdownGenerator { * * @private * @memberOf MarkdownGenerator - * @param {(number|object)} $entry The entry object. + * @param {number|Object} $entry The entry object. * @param {string} $member The name of the member. * @returns {string} The url hash. */ @@ -255,7 +255,7 @@ class MarkdownGenerator { * * @private * @memberOf MarkdownGenerator - * @param {(number|object)} $entry The entry object. + * @param {number|Object} $entry The entry object. * @returns {string} The url. */ private function getLineUrl( $entry ) { @@ -268,7 +268,7 @@ class MarkdownGenerator { * * @private * @memberOf MarkdownGenerator - * @param {(number|object)} $entry The entry object. + * @param {number|Object} $entry The entry object. * @returns {string} The separator. */ private function getSeparator( $entry ) { @@ -315,7 +315,7 @@ class MarkdownGenerator { } // append entry to api member - if (!$member || $entry->isCtor() || ($entry->getType() == 'object' && + if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { // assign the real entry, replacing the temporary entry if it exist @@ -400,7 +400,7 @@ class MarkdownGenerator { foreach ($entry->{$kind} as $subentry) { $name = $subentry->getName(); // functions w/o ALL-CAPs names are last - $sortBy['a'][] = $subentry->getType() == 'function' && !preg_match('/^[A-Z_]+$/', $name); + $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); // ALL-CAPs properties first $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); // lowercase alphanumeric sort @@ -541,7 +541,7 @@ class MarkdownGenerator { $subentries = is_string($kind) ? $entry->{$kind} : array($kind); // add sub-entry name - if ($kind != 'static' && $entry->getType() != 'object' && + if ($kind != 'static' && $entry->getType() != 'Object' && count($subentries) && $subentries[0] != $kind) { if ($kind == 'plugin') { $result[] = $closeTag; diff --git a/vendor/platform.js/platform.js b/vendor/platform.js/platform.js index 815eb58dc..a11a5ac46 100644 --- a/vendor/platform.js/platform.js +++ b/vendor/platform.js/platform.js @@ -77,8 +77,8 @@ * An iteration utility for arrays and objects. * * @private - * @param {(array|object)} object The object to iterate over. - * @param {function} callback The function called per iteration. + * @param {Array|Object} object The object to iterate over. + * @param {Function} callback The function called per iteration. */ function each(object, callback) { var index = -1, @@ -111,8 +111,8 @@ * Iterates over an object's own properties, executing the `callback` for each. * * @private - * @param {object} object The object to iterate over. - * @param {function} callback The function executed per own property. + * @param {Object} object The object to iterate over. + * @param {Function} callback The function executed per own property. */ function forOwn(object, callback) { for (var key in object) { @@ -137,7 +137,7 @@ * Checks if an object has the specified key as a direct property. * * @private - * @param {object} object The object to check. + * @param {Object} object The object to check. * @param {string} key The key to check for. * @returns {boolean} Returns `true` if key is a direct property, else `false`. */ @@ -199,8 +199,8 @@ * A bare-bones` Array#reduce` like utility function. * * @private - * @param {array} array The array to iterate over. - * @param {function} callback The function called per iteration. + * @param {Array} array The array to iterate over. + * @param {Function} callback The function called per iteration. * @param {*} accumulator Initial value of the accumulator. * @returns {*} The accumulator. */ @@ -230,7 +230,7 @@ * * @memberOf platform * @param {string} [ua = navigator.userAgent] The user agent string. - * @returns {object} A platform object. + * @returns {Object} A platform object. */ function parse(ua) { @@ -377,8 +377,8 @@ * Picks the layout engine from an array of guesses. * * @private - * @param {array} guesses An array of guesses. - * @returns {(null|string)} The detected layout engine. + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected layout engine. */ function getLayout(guesses) { return reduce(guesses, function(result, guess) { @@ -392,8 +392,8 @@ * Picks the manufacturer from an array of guesses. * * @private - * @param {array} guesses An array of guesses. - * @returns {(null|string)} The detected manufacturer. + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected manufacturer. */ function getManufacturer(guesses) { return reduce(guesses, function(result, value, key) { @@ -410,8 +410,8 @@ * Picks the browser name from an array of guesses. * * @private - * @param {array} guesses An array of guesses. - * @returns {(null|string)} The detected browser name. + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected browser name. */ function getName(guesses) { return reduce(guesses, function(result, guess) { @@ -425,8 +425,8 @@ * Picks the OS name from an array of guesses. * * @private - * @param {array} guesses An array of guesses. - * @returns {(null|string)} The detected OS name. + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected OS name. */ function getOS(guesses) { return reduce(guesses, function(result, guess) { @@ -475,8 +475,8 @@ * Picks the product name from an array of guesses. * * @private - * @param {array} guesses An array of guesses. - * @returns {(null|string)} The detected product name. + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected product name. */ function getProduct(guesses) { return reduce(guesses, function(result, guess) { @@ -504,8 +504,8 @@ * Resolves the version using an array of UA patterns. * * @private - * @param {array} patterns An array of UA patterns. - * @returns {(null|string)} The detected version. + * @param {Array} patterns An array of UA patterns. + * @returns {null|string} The detected version. */ function getVersion(patterns) { return reduce(patterns, function(result, pattern) { @@ -862,7 +862,7 @@ * The platform object. * * @name platform - * @type object + * @type Object */ return { @@ -870,7 +870,7 @@ * The browser/environment version. * * @memberOf platform - * @type string|Null + * @type string|null */ 'version': name && version && (description.unshift(version), version), @@ -878,7 +878,7 @@ * The name of the browser/environment. * * @memberOf platform - * @type string|Null + * @type string|null */ 'name': name && (description.unshift(name), name), @@ -886,7 +886,7 @@ * The name of the operating system. * * @memberOf platform - * @type object + * @type Object */ 'os': os ? (name && @@ -898,7 +898,7 @@ * The CPU architecture the OS is built for. * * @memberOf platform.os - * @type number|Null + * @type number|null */ 'architecture': null, @@ -906,7 +906,7 @@ * The family of the OS. * * @memberOf platform.os - * @type string|Null + * @type string|null */ 'family': null, @@ -914,7 +914,7 @@ * The version of the OS. * * @memberOf platform.os - * @type string|Null + * @type string|null */ 'version': null, @@ -931,7 +931,7 @@ * The platform description. * * @memberOf platform - * @type string|Null + * @type string|null */ 'description': description.length ? description.join(' ') : ua, @@ -939,7 +939,7 @@ * The name of the browser layout engine. * * @memberOf platform - * @type string|Null + * @type string|null */ 'layout': layout && layout[0], @@ -947,7 +947,7 @@ * The name of the product's manufacturer. * * @memberOf platform - * @type string|Null + * @type string|null */ 'manufacturer': manufacturer, @@ -955,7 +955,7 @@ * The alpha/beta release indicator. * * @memberOf platform - * @type string|Null + * @type string|null */ 'prerelease': prerelease, @@ -963,7 +963,7 @@ * The name of the product hosting the browser. * * @memberOf platform - * @type string|Null + * @type string|null */ 'product': product, @@ -971,7 +971,7 @@ * The browser's user agent string. * * @memberOf platform - * @type string|Null + * @type string|null */ 'ua': ua, diff --git a/vendor/qunit-clib/qunit-clib.js b/vendor/qunit-clib/qunit-clib.js index a74dbbf50..61c467b09 100644 --- a/vendor/qunit-clib/qunit-clib.js +++ b/vendor/qunit-clib/qunit-clib.js @@ -22,7 +22,7 @@ * Installs the CLI boilerplate additions on the given `context` object. * * @memberOf exports - * @param {object} context The context object. + * @param {Object} context The context object. */ function runInContext(context) { // exit early if no `context` is provided or if `QUnit` does not exist @@ -34,7 +34,7 @@ * Schedules timer-based callbacks. * * @private - * @param {(function|string)} fn The function to call. + * @param {Function|string} fn The function to call. * @param {number} delay The number of milliseconds to delay the `fn` call. * @param [arg1, arg2, ...] Arguments to invoke `fn` with. * @param {boolean} repeated A flag to specify whether `fn` is called repeatedly. @@ -84,7 +84,7 @@ * Executes a code snippet or function repeatedly, with a delay between each call. * * @memberOf context - * @param {(function|string)} fn The function to call or string to evaluate. + * @param {Function|string} fn The function to call or string to evaluate. * @param {number} delay The number of milliseconds to delay each `fn` call. * @param [arg1, arg2, ...] Arguments to invoke `fn` with. * @returns {number} The the ID of the timeout. @@ -97,7 +97,7 @@ * Executes a code snippet or a function after specified delay. * * @memberOf context - * @param {(function|string)} fn The function to call or string to evaluate. + * @param {Function|string} fn The function to call or string to evaluate. * @param {number} delay The number of milliseconds to delay the `fn` call. * @param [arg1, arg2, ...] Arguments to invoke `fn` with. * @returns {number} The the ID of the timeout. @@ -121,7 +121,7 @@ * A logging callback triggered when all testing is completed. * * @memberOf QUnit - * @param {object} details An object with properties `failed`, `passed`, `runtime`, and `total`. + * @param {Object} details An object with properties `failed`, `passed`, `runtime`, and `total`. */ QUnit.done(function() { var ran; @@ -160,7 +160,7 @@ * A logging callback triggered after every assertion. * * @memberOf QUnit - * @param {object} details An object with properties `actual`, `expected`, `message`, and `result`. + * @param {Object} details An object with properties `actual`, `expected`, `message`, and `result`. */ QUnit.log(function(details) { var expected = details.expected, @@ -183,7 +183,7 @@ * A logging callback triggered at the start of every test module. * * @memberOf QUnit - * @param {object} details An object with property `name`. + * @param {Object} details An object with property `name`. */ QUnit.moduleStart(function(details) { console.log(hr); @@ -195,8 +195,8 @@ * Converts an object into a string representation. * * @memberOf QUnit - * @type function - * @param {object} object The object to stringify. + * @type Function + * @param {Object} object The object to stringify. * @returns {string} The result string. */ QUnit.jsDump.parsers.object = (function() { @@ -217,7 +217,7 @@ * A logging callback triggered after a test is completed. * * @memberOf QUnit - * @param {object} details An object with properties `failed`, `name`, `passed`, and `total`. + * @param {Object} details An object with properties `failed`, `name`, `passed`, and `total`. */ QUnit.testDone(function(details) { var assertions = QUnit.config.testStats.assertions, @@ -239,7 +239,7 @@ * An object used to hold information about the current running test. * * @memberOf QUnit.config - * @type object + * @type Object */ QUnit.config.testStats = {