From d2949f0931bd995b083258c78226eebffad468fc Mon Sep 17 00:00:00 2001 From: jdalton Date: Fri, 1 May 2015 08:01:48 -0700 Subject: [PATCH] Bump to v3.1.5. --- README.md | 2 +- lodash._basematches/README.md | 4 +-- lodash._basematches/index.js | 4 +-- lodash._basematches/package.json | 2 +- lodash.random/README.md | 4 +-- lodash.random/index.js | 41 ++++++++++++----------- lodash.random/package.json | 2 +- lodash.range/README.md | 4 +-- lodash.range/index.js | 46 ++++++++++++++------------ lodash.range/package.json | 2 +- lodash.sortby/{LICENSE.txt => LICENSE} | 0 lodash.sortby/README.md | 4 +-- lodash.sortby/index.js | 12 +++---- lodash.sortby/package.json | 2 +- 14 files changed, 66 insertions(+), 63 deletions(-) rename lodash.sortby/{LICENSE.txt => LICENSE} (100%) diff --git a/README.md b/README.md index 1bccc8c1b..025bbb6b7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.1.4 +# lodash v3.1.5 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash._basematches/README.md b/lodash._basematches/README.md index 4dec912d1..696cc325b 100644 --- a/lodash._basematches/README.md +++ b/lodash._basematches/README.md @@ -1,4 +1,4 @@ -# lodash._basematches v3.1.4 +# lodash._basematches v3.1.5 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseMatches` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseMatches = require('lodash._basematches'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash._basematches) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.5-npm-packages/lodash._basematches) for more details. diff --git a/lodash._basematches/index.js b/lodash._basematches/index.js index e9a4812d7..3bed8b331 100644 --- a/lodash._basematches/index.js +++ b/lodash._basematches/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.4 (Custom Build) + * lodash 3.1.5 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -58,7 +58,7 @@ function baseMatches(source) { * equality comparisons, else `false`. */ function isStrictComparable(value) { - return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value)); + return value === value && !isObject(value); } /** diff --git a/lodash._basematches/package.json b/lodash._basematches/package.json index f07f9622a..6ae9ed51e 100644 --- a/lodash._basematches/package.json +++ b/lodash._basematches/package.json @@ -1,6 +1,6 @@ { "name": "lodash._basematches", - "version": "3.1.4", + "version": "3.1.5", "description": "The modern build of lodash’s internal `baseMatches` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.random/README.md b/lodash.random/README.md index 44b612d07..e16dc387e 100644 --- a/lodash.random/README.md +++ b/lodash.random/README.md @@ -1,4 +1,4 @@ -# lodash.random v3.1.4 +# lodash.random v3.1.5 The [lodash](https://lodash.com/) method `_.random` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var random = require('lodash.random'); ``` -See the [documentation](https://lodash.com/docs#random) or [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash.random) for more details. +See the [documentation](https://lodash.com/docs#random) or [package source](https://github.com/lodash/lodash/blob/3.1.5-npm-packages/lodash.random) for more details. diff --git a/lodash.random/index.js b/lodash.random/index.js index 0b774ef4c..4d41651d0 100644 --- a/lodash.random/index.js +++ b/lodash.random/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.4 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -35,20 +35,6 @@ var reIsUint = /^(?:0|[1-9]\d*)$/; var freeParseFloat = parseFloat, freeParseInt = parseInt; -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -69,7 +55,7 @@ var nativeFloor = Math.floor, * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -103,6 +89,21 @@ function baseRandom(lower, upper) { */ var getLength = baseProperty('length'); +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + /** * Checks if the given arguments are from an iteratee call. * @@ -342,8 +343,8 @@ function isSymbol(value) { * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -351,8 +352,8 @@ function isSymbol(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { diff --git a/lodash.random/package.json b/lodash.random/package.json index 23b531ce7..90ed22e68 100644 --- a/lodash.random/package.json +++ b/lodash.random/package.json @@ -1,6 +1,6 @@ { "name": "lodash.random", - "version": "3.1.4", + "version": "3.1.5", "description": "The lodash method `_.random` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.range/README.md b/lodash.range/README.md index 4f8251140..cef25bcf0 100644 --- a/lodash.range/README.md +++ b/lodash.range/README.md @@ -1,4 +1,4 @@ -# lodash.range v3.1.4 +# lodash.range v3.1.5 The [lodash](https://lodash.com/) method `_.range` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var range = require('lodash.range'); ``` -See the [documentation](https://lodash.com/docs#range) or [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash.range) for more details. +See the [documentation](https://lodash.com/docs#range) or [package source](https://github.com/lodash/lodash/blob/3.1.5-npm-packages/lodash.range) for more details. diff --git a/lodash.range/index.js b/lodash.range/index.js index 0c90e977d..ec5f125b8 100644 --- a/lodash.range/index.js +++ b/lodash.range/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.4 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -34,20 +34,6 @@ var reIsUint = /^(?:0|[1-9]\d*)$/; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -67,7 +53,7 @@ var nativeCeil = Math.ceil, * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -84,7 +70,7 @@ function baseProperty(key) { * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, @@ -137,6 +123,21 @@ function createRange(fromRight) { */ var getLength = baseProperty('length'); +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + /** * Checks if the given arguments are from an iteratee call. * @@ -376,8 +377,8 @@ function isSymbol(value) { * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -385,8 +386,8 @@ function isSymbol(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { @@ -425,7 +426,8 @@ function toNumber(value) { * @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 the new array of numbers. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight * @example * * _.range(4); diff --git a/lodash.range/package.json b/lodash.range/package.json index 345fb2be4..ae8262f82 100644 --- a/lodash.range/package.json +++ b/lodash.range/package.json @@ -1,6 +1,6 @@ { "name": "lodash.range", - "version": "3.1.4", + "version": "3.1.5", "description": "The lodash method `_.range` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.sortby/LICENSE.txt b/lodash.sortby/LICENSE similarity index 100% rename from lodash.sortby/LICENSE.txt rename to lodash.sortby/LICENSE diff --git a/lodash.sortby/README.md b/lodash.sortby/README.md index d61fb62ad..4d1fc54ea 100644 --- a/lodash.sortby/README.md +++ b/lodash.sortby/README.md @@ -1,4 +1,4 @@ -# lodash.sortby v3.1.4 +# lodash.sortby v3.1.5 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sortBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var sortBy = require('lodash.sortby'); ``` -See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash.sortby) for more details. +See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/3.1.5-npm-packages/lodash.sortby) for more details. diff --git a/lodash.sortby/index.js b/lodash.sortby/index.js index 647d8b1f7..0a66451f9 100644 --- a/lodash.sortby/index.js +++ b/lodash.sortby/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.4 (Custom Build) + * lodash 3.1.5 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -17,8 +17,8 @@ var baseCallback = require('lodash._basecallback'), * sort them in ascending order. * * @private - * @param {Object} object The object to compare to `other`. - * @param {Object} other The object to compare to `object`. + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. * @returns {number} Returns the sort order indicator for `object`. */ function compareAscending(object, other) { @@ -26,7 +26,7 @@ function compareAscending(object, other) { } /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -89,7 +89,7 @@ function isArrayLike(value) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. @@ -152,7 +152,7 @@ function sortBy(collection, iteratee, thisArg) { return []; } if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; + iteratee = undefined; } var index = -1; iteratee = baseCallback(iteratee, thisArg, 3); diff --git a/lodash.sortby/package.json b/lodash.sortby/package.json index b0e7cf5f0..5c646e56e 100644 --- a/lodash.sortby/package.json +++ b/lodash.sortby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortby", - "version": "3.1.4", + "version": "3.1.5", "description": "The modern build of lodash’s `_.sortBy` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",