mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Use https in links where supported. [ci skip]
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
;(function() {
|
;(function() {
|
||||||
|
|
||||||
/** Used as a safe reference for `undefined` in pre ES5 environments. */
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||||
var undefined;
|
var undefined;
|
||||||
|
|
||||||
/** Used as the semantic version number. */
|
/** Used as the semantic version number. */
|
||||||
@@ -445,11 +445,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
||||||
// that causes it, under certain circumstances, to provide the same value
|
// that causes it, under certain circumstances, to provide the same value for
|
||||||
// for `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247.
|
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
|
||||||
|
// for more details.
|
||||||
//
|
//
|
||||||
// This also ensures a stable sort in V8 and other engines.
|
// This also ensures a stable sort in V8 and other engines.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=90.
|
// See https://code.google.com/p/v8/issues/detail?id=90 for more details.
|
||||||
return object.index - other.index;
|
return object.index - other.index;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,7 +690,7 @@
|
|||||||
// Avoid issues with some ES3 environments that attempt to use values, named
|
// Avoid issues with some ES3 environments that attempt to use values, named
|
||||||
// after built-in constructors like `Object`, for the creation of literals.
|
// after built-in constructors like `Object`, for the creation of literals.
|
||||||
// ES5 clears this up by stating that literals must use built-in constructors.
|
// ES5 clears this up by stating that literals must use built-in constructors.
|
||||||
// See http://es5.github.io/#x11.1.5.
|
// See https://es5.github.io/#x11.1.5 for more details.
|
||||||
context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root;
|
context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root;
|
||||||
|
|
||||||
/** Native constructor references. */
|
/** Native constructor references. */
|
||||||
@@ -2328,9 +2329,8 @@
|
|||||||
if (!isSameTag) {
|
if (!isSameTag) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Assume cyclic structures are equal.
|
// Assume cyclic values are equal.
|
||||||
// The algorithm for detecting cyclic structures is adapted from ES 5.1
|
// For more information on detecting circular references see https://es5.github.io/#JO.
|
||||||
// section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3).
|
|
||||||
stackA || (stackA = []);
|
stackA || (stackA = []);
|
||||||
stackB || (stackB = []);
|
stackB || (stackB = []);
|
||||||
|
|
||||||
@@ -3122,7 +3122,7 @@
|
|||||||
result = Ctor.apply(thisBinding, arguments);
|
result = Ctor.apply(thisBinding, arguments);
|
||||||
|
|
||||||
// Mimic the constructor's `return` behavior.
|
// Mimic the constructor's `return` behavior.
|
||||||
// See http://es5.github.io/#x13.2.2.
|
// See https://es5.github.io/#x13.2.2 for more details.
|
||||||
return isObject(result) ? result : thisBinding;
|
return isObject(result) ? result : thisBinding;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -3453,8 +3453,8 @@
|
|||||||
|
|
||||||
case regexpTag:
|
case regexpTag:
|
||||||
case stringTag:
|
case stringTag:
|
||||||
// Coerce regexes to strings (http://es5.github.io/#x15.10.6.4) and
|
// Coerce regexes to strings and treat strings primitives and string
|
||||||
// treat strings primitives and string objects as equal.
|
// objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
|
||||||
return object == baseToString(other);
|
return object == baseToString(other);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -3932,7 +3932,8 @@
|
|||||||
*
|
*
|
||||||
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
|
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
|
||||||
* period of time, it will trip its breaker and transition to an identity function
|
* period of time, it will trip its breaker and transition to an identity function
|
||||||
* to avoid garbage collection pauses in V8. See https://code.google.com/p/v8/issues/detail?id=2070.
|
* to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)
|
||||||
|
* for more details.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function} func The function to associate metadata with.
|
* @param {Function} func The function to associate metadata with.
|
||||||
@@ -5221,7 +5222,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is like `_.zip` except that it accepts an array of grouped
|
* This method is like `_.zip` except that it accepts an array of grouped
|
||||||
* elements and creates an array regrouping the elements to their pre `_.zip`
|
* elements and creates an array regrouping the elements to their pre-`_.zip`
|
||||||
* configuration.
|
* configuration.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -5274,7 +5275,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an array that is the symmetric difference of the provided arrays.
|
* Creates an array that is the symmetric difference of the provided arrays.
|
||||||
* See [Wikipedia](http://en.wikipedia.org/wiki/Symmetric_difference) for
|
* See [Wikipedia](https://en.wikipedia.org/wiki/Symmetric_difference) for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -6364,7 +6365,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an array of shuffled values, using a version of the Fisher-Yates
|
* Creates an array of shuffled values, using a version of the Fisher-Yates
|
||||||
* shuffle. See [Wikipedia](http://en.wikipedia.org/wiki/Fisher-Yates_shuffle)
|
* shuffle. See [Wikipedia](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle)
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -7957,7 +7958,7 @@
|
|||||||
*/
|
*/
|
||||||
function isFunction(value) {
|
function isFunction(value) {
|
||||||
// Avoid a Chakra JIT bug in compatibility modes of IE 11.
|
// Avoid a Chakra JIT bug in compatibility modes of IE 11.
|
||||||
// See https://github.com/jashkenas/underscore/issues/1621.
|
// See https://github.com/jashkenas/underscore/issues/1621 for more details.
|
||||||
return typeof value == 'function' || false;
|
return typeof value == 'function' || false;
|
||||||
}
|
}
|
||||||
// Fallback for environments that return incorrect `typeof` operator results.
|
// Fallback for environments that return incorrect `typeof` operator results.
|
||||||
@@ -7974,7 +7975,7 @@
|
|||||||
* Checks if `value` is the language type of `Object`.
|
* Checks if `value` is the language type of `Object`.
|
||||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||||
*
|
*
|
||||||
* **Note:** See the [ES5 spec](http://es5.github.io/#x8) for more details.
|
* **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -7994,7 +7995,7 @@
|
|||||||
*/
|
*/
|
||||||
function isObject(value) {
|
function isObject(value) {
|
||||||
// Avoid a V8 JIT bug in Chrome 19-20.
|
// Avoid a V8 JIT bug in Chrome 19-20.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=2291.
|
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return type == 'function' || (value && type == 'object') || false;
|
return type == 'function' || (value && type == 'object') || false;
|
||||||
}
|
}
|
||||||
@@ -8065,7 +8066,7 @@
|
|||||||
* Checks if `value` is `NaN`.
|
* Checks if `value` is `NaN`.
|
||||||
*
|
*
|
||||||
* **Note:** This method is not the same as native `isNaN` which returns `true`
|
* **Note:** This method is not the same as native `isNaN` which returns `true`
|
||||||
* for `undefined` and other non-numeric values. See the [ES5 spec](http://es5.github.io/#x15.1.2.4)
|
* for `undefined` and other non-numeric values. See the [ES5 spec](https://es5.github.io/#x15.1.2.4)
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -9263,7 +9264,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `string` to camel case.
|
* Converts `string` to camel case.
|
||||||
* See [Wikipedia](http://en.wikipedia.org/wiki/CamelCase) for more details.
|
* See [Wikipedia](https://en.wikipedia.org/wiki/CamelCase) for more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -9306,7 +9307,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Deburrs `string` by converting latin-1 supplementary letters to basic latin letters.
|
* Deburrs `string` by converting latin-1 supplementary letters to basic latin letters.
|
||||||
* See [Wikipedia](http://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
* See [Wikipedia](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -9359,18 +9360,18 @@
|
|||||||
* their corresponding HTML entities.
|
* their corresponding HTML entities.
|
||||||
*
|
*
|
||||||
* **Note:** No other characters are escaped. To escape additional characters
|
* **Note:** No other characters are escaped. To escape additional characters
|
||||||
* use a third-party library like [_he_](http://mths.be/he).
|
* use a third-party library like [_he_](https://mths.be/he).
|
||||||
*
|
*
|
||||||
* Though the ">" character is escaped for symmetry, characters like
|
* Though the ">" character is escaped for symmetry, characters like
|
||||||
* ">" and "/" don't require escaping in HTML and have no special meaning
|
* ">" and "/" don't require escaping in HTML and have no special meaning
|
||||||
* unless they're part of a tag or unquoted attribute value.
|
* unless they're part of a tag or unquoted attribute value.
|
||||||
* See [Mathias Bynens's article](http://mathiasbynens.be/notes/ambiguous-ampersands)
|
* See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
|
||||||
* (under "semi-related fun fact") for more details.
|
* (under "semi-related fun fact") for more details.
|
||||||
*
|
*
|
||||||
* Backticks are escaped because in Internet Explorer < 9, they can break out
|
* Backticks are escaped because in Internet Explorer < 9, they can break out
|
||||||
* of attribute values or HTML comments. See [#102](http://html5sec.org/#102),
|
* of attribute values or HTML comments. See [#102](https://html5sec.org/#102),
|
||||||
* [#108](http://html5sec.org/#108), and [#133](http://html5sec.org/#133) of
|
* [#108](https://html5sec.org/#108), and [#133](https://html5sec.org/#133) of
|
||||||
* the [HTML5 Security Cheatsheet](http://html5sec.org/) for more details.
|
* the [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
|
||||||
*
|
*
|
||||||
* When working with HTML you should always quote attribute values to reduce
|
* When working with HTML you should always quote attribute values to reduce
|
||||||
* XSS vectors. See [Ryan Grove's article](http://wonko.com/post/html-escaping)
|
* XSS vectors. See [Ryan Grove's article](http://wonko.com/post/html-escaping)
|
||||||
@@ -9417,7 +9418,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `string` to kebab case (a.k.a. spinal case).
|
* Converts `string` to kebab case (a.k.a. spinal case).
|
||||||
* See [Wikipedia](http://en.wikipedia.org/wiki/Letter_case#Computers) for
|
* See [Wikipedia](https://en.wikipedia.org/wiki/Letter_case#Computers) for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -9541,7 +9542,7 @@
|
|||||||
* in which case a `radix` of `16` is used.
|
* in which case a `radix` of `16` is used.
|
||||||
*
|
*
|
||||||
* **Note:** This method aligns with the ES5 implementation of `parseInt`.
|
* **Note:** This method aligns with the ES5 implementation of `parseInt`.
|
||||||
* See the [ES5 spec](http://es5.github.io/#E) for more details.
|
* See the [ES5 spec](https://es5.github.io/#E) for more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -9567,9 +9568,9 @@
|
|||||||
// Fallback for environments with pre-ES5 implementations.
|
// Fallback for environments with pre-ES5 implementations.
|
||||||
if (nativeParseInt(whitespace + '08') != 8) {
|
if (nativeParseInt(whitespace + '08') != 8) {
|
||||||
parseInt = function(string, radix, guard) {
|
parseInt = function(string, radix, guard) {
|
||||||
// Firefox < 21 and Opera < 15 follow ES3 for `parseInt` and
|
// Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.
|
||||||
// Chrome fails to trim leading <BOM> whitespace characters.
|
// Chrome fails to trim leading <BOM> whitespace characters.
|
||||||
// See https://code.google.com/p/v8/issues/detail?id=3109.
|
// See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
|
||||||
if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
|
if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
|
||||||
radix = 0;
|
radix = 0;
|
||||||
} else if (radix) {
|
} else if (radix) {
|
||||||
@@ -9608,7 +9609,7 @@
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
||||||
// See http://en.wikipedia.org/wiki/Exponentiation_by_squaring.
|
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
|
||||||
do {
|
do {
|
||||||
if (n % 2) {
|
if (n % 2) {
|
||||||
result += string;
|
result += string;
|
||||||
@@ -9622,7 +9623,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `string` to snake case.
|
* Converts `string` to snake case.
|
||||||
* See [Wikipedia](http://en.wikipedia.org/wiki/Snake_case) for more details.
|
* See [Wikipedia](https://en.wikipedia.org/wiki/Snake_case) for more details.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -9797,7 +9798,6 @@
|
|||||||
, 'g');
|
, 'g');
|
||||||
|
|
||||||
// Use a sourceURL for easier debugging.
|
// Use a sourceURL for easier debugging.
|
||||||
// See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl.
|
|
||||||
var sourceURL = '//# sourceURL=' +
|
var sourceURL = '//# sourceURL=' +
|
||||||
('sourceURL' in options
|
('sourceURL' in options
|
||||||
? options.sourceURL
|
? options.sourceURL
|
||||||
@@ -10058,7 +10058,7 @@
|
|||||||
* corresponding characters.
|
* corresponding characters.
|
||||||
*
|
*
|
||||||
* **Note:** No other HTML entities are unescaped. To unescape additional HTML
|
* **Note:** No other HTML entities are unescaped. To unescape additional HTML
|
||||||
* entities use a third-party library like [_he_](http://mths.be/he).
|
* entities use a third-party library like [_he_](https://mths.be/he).
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -10458,7 +10458,7 @@
|
|||||||
end = +end || 0;
|
end = +end || 0;
|
||||||
}
|
}
|
||||||
// Use `Array(length)` so engines like Chakra and V8 avoid slower modes.
|
// Use `Array(length)` so engines like Chakra and V8 avoid slower modes.
|
||||||
// See http://youtu.be/XAqIpGU8ZZk#t=17m25s.
|
// See https://youtu.be/XAqIpGU8ZZk#t=17m25s for more details.
|
||||||
var index = -1,
|
var index = -1,
|
||||||
length = nativeMax(ceil((end - start) / (step || 1)), 0),
|
length = nativeMax(ceil((end - start) / (step || 1)), 0),
|
||||||
result = Array(length);
|
result = Array(length);
|
||||||
@@ -10993,7 +10993,8 @@
|
|||||||
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
|
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
|
||||||
// Expose lodash to the global object when an AMD loader is present to avoid
|
// Expose lodash to the global object when an AMD loader is present to avoid
|
||||||
// errors in cases where lodash is loaded by a script tag and not intended
|
// errors in cases where lodash is loaded by a script tag and not intended
|
||||||
// as an AMD module. See http://requirejs.org/docs/errors.html#mismatch.
|
// as an AMD module. See http://requirejs.org/docs/errors.html#mismatch for
|
||||||
|
// more details.
|
||||||
root._ = _;
|
root._ = _;
|
||||||
|
|
||||||
// Define as an anonymous module so, through path mapping, it can be
|
// Define as an anonymous module so, through path mapping, it can be
|
||||||
|
|||||||
Reference in New Issue
Block a user