Compare commits

...

1 Commits

Author SHA1 Message Date
jdalton
10d5566cf2 Bump to v3.9.3. 2015-05-25 20:56:15 -07:00
4 changed files with 19 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
# lodash v3.9.2 # lodash v3.9.3
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules.
@@ -28,7 +28,7 @@ var array = require('lodash/array');
var chunk = require('lodash/array/chunk'); var chunk = require('lodash/array/chunk');
``` ```
See the [package source](https://github.com/lodash/lodash/tree/3.9.2-npm) for more details. See the [package source](https://github.com/lodash/lodash/tree/3.9.3-npm) for more details.
**Note:**<br> **Note:**<br>
Dont assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br> Dont assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br>
@@ -39,15 +39,14 @@ Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash b
lodash is also available in a variety of other builds & module formats. lodash is also available in a variety of other builds & module formats.
* npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.2-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.2-amd) builds * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.3-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.3-amd) builds
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.2-es) build * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.3-es) build
## Further Reading ## Further Reading
* [API Documentation](https://lodash.com/docs) * [API Documentation](https://lodash.com/docs)
* [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences) * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)
* [Changelog](https://github.com/lodash/lodash/wiki/Changelog) * [Changelog](https://github.com/lodash/lodash/wiki/Changelog)
* [Release Notes](https://github.com/lodash/lodash/releases)
* [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap) * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)
* [More Resources](https://github.com/lodash/lodash/wiki/Resources) * [More Resources](https://github.com/lodash/lodash/wiki/Resources)
@@ -116,5 +115,5 @@ lodash is also available in a variety of other builds & module formats.
## Support ## Support
Tested in Chrome 41-42, Firefox 37-38, IE 6-11, MS Edge, Opera 28-29, Safari 5-8, ChakraNode 0.12.2, io.js 2.0.2, Node.js 0.8.28, 0.10.38, & 0.12.3, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6 Tested in Chrome 41-42, Firefox 37-38, IE 6-11, MS Edge, Opera 28-29, Safari 5-8, ChakraNode 0.12.2, io.js 2.1.0, Node.js 0.8.28, 0.10.38, & 0.12.4, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6.
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.

View File

@@ -1,6 +1,6 @@
/** /**
* @license * @license
* lodash 3.9.2 (Custom Build) <https://lodash.com/> * lodash 3.9.3 (Custom Build) <https://lodash.com/>
* Build: `lodash modern -d -o ./index.js` * Build: `lodash modern -d -o ./index.js`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -13,7 +13,7 @@
var undefined; var undefined;
/** Used as the semantic version number. */ /** Used as the semantic version number. */
var VERSION = '3.9.2'; var VERSION = '3.9.3';
/** Used to compose bitmasks for wrapper metadata. */ /** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1, var BIND_FLAG = 1,
@@ -118,6 +118,9 @@
/** Used to detect host constructors (Safari > 5). */ /** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/; var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to detect unsigned integer values. */
var reIsUint = /^\d+$/;
/** Used to match latin-1 supplementary letters (excluding mathematical operators). */ /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
@@ -152,9 +155,8 @@
'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array', 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array',
'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number',
'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'document', 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'document',
'isFinite', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', 'isFinite', 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array',
'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', 'window'
'window'
]; ];
/** Used to make template sourceURLs easier to identify. */ /** Used to make template sourceURLs easier to identify. */
@@ -745,6 +747,7 @@
clearTimeout = context.clearTimeout, clearTimeout = context.clearTimeout,
floor = Math.floor, floor = Math.floor,
getPrototypeOf = getNative(Object, 'getPrototypeOf'), getPrototypeOf = getNative(Object, 'getPrototypeOf'),
parseFloat = context.parseFloat,
push = arrayProto.push, push = arrayProto.push,
Set = getNative(context, 'Set'), Set = getNative(context, 'Set'),
setTimeout = context.setTimeout, setTimeout = context.setTimeout,
@@ -4072,7 +4075,7 @@
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/ */
function isIndex(value, length) { function isIndex(value, length) {
value = typeof value == 'number' ? value : parseFloat(value); value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
length = length == null ? MAX_SAFE_INTEGER : length; length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length; return value > -1 && value % 1 == 0 && value < length;
} }

View File

@@ -1,3 +1,6 @@
/** Used to detect unsigned integer values. */
var reIsUint = /^\d+$/;
/** /**
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* of an array-like value. * of an array-like value.
@@ -13,7 +16,7 @@ var MAX_SAFE_INTEGER = 9007199254740991;
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/ */
function isIndex(value, length) { function isIndex(value, length) {
value = typeof value == 'number' ? value : parseFloat(value); value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
length = length == null ? MAX_SAFE_INTEGER : length; length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length; return value > -1 && value % 1 == 0 && value < length;
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash", "name": "lodash",
"version": "3.9.2", "version": "3.9.3",
"description": "The modern build of lodash modular utilities.", "description": "The modern build of lodash modular utilities.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",