mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Rebuild docs and custom builds.
Former-commit-id: 6fea0c6b4c7bb28ee3d55b4af27874e40cd9813f
This commit is contained in:
66
dist/lodash.compat.js
vendored
66
dist/lodash.compat.js
vendored
@@ -263,10 +263,10 @@
|
||||
|
||||
ctor.prototype = { 'valueOf': 1, 'y': 1 };
|
||||
for (var prop in new ctor) { props.push(prop); }
|
||||
for (prop in arguments) { }
|
||||
|
||||
/**
|
||||
* Detect if `arguments` objects are `Object` objects
|
||||
* (all but Opera < 10.5).
|
||||
* Detect if `arguments` objects are `Object` objects (all but Opera < 10.5).
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type Boolean
|
||||
@@ -304,8 +304,7 @@
|
||||
support.fastBind = nativeBind && !isV8;
|
||||
|
||||
/**
|
||||
* Detect if `Object.keys` exists and is inferred to be fast
|
||||
* (Firefox, IE, Opera, V8).
|
||||
* Detect if `Object.keys` exists and is inferred to be fast (Firefox, IE, Opera, V8).
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type Boolean
|
||||
@@ -313,8 +312,7 @@
|
||||
support.fastKeys = nativeKeys && (isIeOpera || isV8 || !isJSC);
|
||||
|
||||
/**
|
||||
* Detect if own properties are iterated after inherited properties
|
||||
* (all but IE < 9).
|
||||
* Detect if own properties are iterated after inherited properties (all but IE < 9).
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type Boolean
|
||||
@@ -328,7 +326,7 @@
|
||||
* @memberOf _.support
|
||||
* @type Boolean
|
||||
*/
|
||||
support.nonEnumArgs = !arguments.propertyIsEnumerable(0);
|
||||
support.nonEnumArgs = prop != 0;
|
||||
|
||||
/**
|
||||
* Detect if properties shadowing those on `Object.prototype` are non-enumerable.
|
||||
@@ -342,8 +340,7 @@
|
||||
support.nonEnumShadows = !/valueOf/.test(props);
|
||||
|
||||
/**
|
||||
* Detect if `Array#shift` and `Array#splice` augment array-like
|
||||
* objects correctly.
|
||||
* Detect if `Array#shift` and `Array#splice` augment array-like objects correctly.
|
||||
*
|
||||
* Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()`
|
||||
* and `splice()` functions that fail to remove the last element, `value[0]`,
|
||||
@@ -1359,7 +1356,7 @@
|
||||
* @example
|
||||
*
|
||||
* _.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
* // => { 'moe': 'first', 'larry': 'second' } (order is not guaranteed)
|
||||
* // => { 'moe': 'first', 'larry': 'second' }
|
||||
*/
|
||||
function invert(object) {
|
||||
var index = -1,
|
||||
@@ -2109,27 +2106,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the given `value` into an integer of the specified `radix`.
|
||||
*
|
||||
* Note: This method avoids differences in native ES3 and ES5 `parseInt`
|
||||
* implementations. See http://es5.github.com/#E.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Mixed} value The value to parse.
|
||||
* @returns {Number} Returns the new integer value.
|
||||
* @example
|
||||
*
|
||||
* _.parseInt('08');
|
||||
* // => 8
|
||||
*/
|
||||
var parseInt = nativeParseInt('08') == 8 ? nativeParseInt : function(value, radix) {
|
||||
// Firefox and Opera still follow the ES3 specified implementation of `parseInt`
|
||||
return nativeParseInt(isString(value) ? value.replace(/^0+(?=.$)/, '') : value, radix || 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a shallow clone of `object` composed of the specified properties.
|
||||
* Property names may be specified as individual arguments or as arrays of property
|
||||
@@ -2190,7 +2166,7 @@
|
||||
* @example
|
||||
*
|
||||
* _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
* // => [1, 2, 3]
|
||||
* // => [1, 2, 3] (order is not guaranteed)
|
||||
*/
|
||||
function values(object) {
|
||||
var index = -1,
|
||||
@@ -4693,6 +4669,27 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the given `value` into an integer of the specified `radix`.
|
||||
*
|
||||
* Note: This method avoids differences in native ES3 and ES5 `parseInt`
|
||||
* implementations. See http://es5.github.com/#E.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {Mixed} value The value to parse.
|
||||
* @returns {Number} Returns the new integer value.
|
||||
* @example
|
||||
*
|
||||
* _.parseInt('08');
|
||||
* // => 8
|
||||
*/
|
||||
var parseInt = nativeParseInt('08') == 8 ? nativeParseInt : function(value, radix) {
|
||||
// Firefox and Opera still follow the ES3 specified implementation of `parseInt`
|
||||
return nativeParseInt(isString(value) ? value.replace(/^0+(?=.$)/, '') : value, radix || 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Produces a random number between `min` and `max` (inclusive). If only one
|
||||
* argument is passed, a number between `0` and the given number will be returned.
|
||||
@@ -4725,8 +4722,9 @@
|
||||
|
||||
/**
|
||||
* Resolves the value of `property` on `object`. If `property` is a function,
|
||||
* it will be invoked and its result returned, else the property value is
|
||||
* returned. If `object` is falsey, then `null` is returned.
|
||||
* 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.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
Reference in New Issue
Block a user