mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32393ae520 |
@@ -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 [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules.
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules.
|
||||||
|
|
||||||
@@ -13,8 +13,8 @@ $ lodash modern exports=amd -d -o ./main.js
|
|||||||
Using bower or volo:
|
Using bower or volo:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ bower i lodash#3.9.2-amd
|
$ bower i lodash#3.9.3-amd
|
||||||
$ volo add lodash/3.9.2-amd
|
$ volo add lodash/3.9.3-amd
|
||||||
```
|
```
|
||||||
|
|
||||||
Defining a build as `'lodash'`.
|
Defining a build as `'lodash'`.
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
define([], function() {
|
define([], function() {
|
||||||
|
|
||||||
|
/** 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.
|
||||||
@@ -15,7 +18,7 @@ define([], function() {
|
|||||||
* @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;
|
||||||
}
|
}
|
||||||
|
|||||||
15
main.js
15
main.js
@@ -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 exports="amd" -d -o ./main.js`
|
* Build: `lodash modern exports="amd" -d -o ./main.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. */
|
||||||
@@ -742,6 +744,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,
|
||||||
@@ -4069,7 +4072,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash",
|
"name": "lodash",
|
||||||
"version": "3.9.2",
|
"version": "3.9.3",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"volo": {
|
"volo": {
|
||||||
|
|||||||
Reference in New Issue
Block a user