mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
define(['../internal/baseToString', '../internal/deburrLetter'], function(baseToString, deburrLetter) {
|
||||
|
||||
/**
|
||||
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
||||
*/
|
||||
var reComboMarks = /[\u0300-\u036f\ufe20-\ufe23]/g;
|
||||
/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
|
||||
var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
|
||||
|
||||
/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
|
||||
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
|
||||
@@ -24,7 +22,7 @@ define(['../internal/baseToString', '../internal/deburrLetter'], function(baseTo
|
||||
*/
|
||||
function deburr(string) {
|
||||
string = baseToString(string);
|
||||
return string && string.replace(reLatin1, deburrLetter).replace(reComboMarks, '');
|
||||
return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
|
||||
}
|
||||
|
||||
return deburr;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
define(['../internal/baseToString'], function(baseToString) {
|
||||
|
||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||
var undefined;
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMin = Math.min;
|
||||
|
||||
@@ -29,7 +32,7 @@ define(['../internal/baseToString'], function(baseToString) {
|
||||
target = (target + '');
|
||||
|
||||
var length = string.length;
|
||||
position = typeof position == 'undefined'
|
||||
position = position === undefined
|
||||
? length
|
||||
: nativeMin(position < 0 ? 0 : (+position || 0), length);
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@ define(['../internal/baseToString', '../internal/escapeHtmlChar'], function(base
|
||||
* (under "semi-related fun fact") for more details.
|
||||
*
|
||||
* Backticks are escaped because in Internet Explorer < 9, they can break out
|
||||
* of attribute values or HTML comments. See [#102](https://html5sec.org/#102),
|
||||
* [#108](https://html5sec.org/#108), and [#133](https://html5sec.org/#133) of
|
||||
* the [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
|
||||
* of attribute values or HTML comments. See [#59](https://html5sec.org/#59),
|
||||
* [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
|
||||
* [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
|
||||
* for more details.
|
||||
*
|
||||
* When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
|
||||
* to reduce XSS vectors.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
define(['../internal/isIterateeCall', '../internal/root', './trim'], function(isIterateeCall, root, trim) {
|
||||
|
||||
/** Used to detect hexadecimal string values. */
|
||||
var reHexPrefix = /^0[xX]/;
|
||||
var reHasHexPrefix = /^0[xX]/;
|
||||
|
||||
/** Used to detect and test for whitespace. */
|
||||
var whitespace = (
|
||||
@@ -59,7 +59,7 @@ define(['../internal/isIterateeCall', '../internal/root', './trim'], function(is
|
||||
radix = +radix;
|
||||
}
|
||||
string = trim(string);
|
||||
return nativeParseInt(string, radix || (reHexPrefix.test(string) ? 16 : 10));
|
||||
return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
define(['../internal/assignOwnDefaults', '../utility/attempt', '../internal/baseAssign', '../internal/baseToString', '../internal/baseValues', '../internal/escapeStringChar', '../lang/isError', '../internal/isIterateeCall', '../object/keys', '../internal/reInterpolate', './templateSettings'], function(assignOwnDefaults, attempt, baseAssign, baseToString, baseValues, escapeStringChar, isError, isIterateeCall, keys, reInterpolate, templateSettings) {
|
||||
define(['../internal/assignOwnDefaults', '../internal/assignWith', '../utility/attempt', '../internal/baseAssign', '../internal/baseToString', '../internal/baseValues', '../internal/escapeStringChar', '../lang/isError', '../internal/isIterateeCall', '../object/keys', '../internal/reInterpolate', './templateSettings'], function(assignOwnDefaults, assignWith, attempt, baseAssign, baseToString, baseValues, escapeStringChar, isError, isIterateeCall, keys, reInterpolate, templateSettings) {
|
||||
|
||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||
var undefined;
|
||||
@@ -8,9 +8,7 @@ define(['../internal/assignOwnDefaults', '../utility/attempt', '../internal/base
|
||||
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
||||
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
||||
|
||||
/**
|
||||
* Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components).
|
||||
*/
|
||||
/** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */
|
||||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
||||
|
||||
/** Used to ensure capturing order of template delimiters. */
|
||||
@@ -124,9 +122,9 @@ define(['../internal/assignOwnDefaults', '../utility/attempt', '../internal/base
|
||||
options = otherOptions = null;
|
||||
}
|
||||
string = baseToString(string);
|
||||
options = baseAssign(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
||||
options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
||||
|
||||
var imports = baseAssign(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
|
||||
var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
|
||||
importsKeys = keys(imports),
|
||||
importsValues = baseValues(imports, importsKeys);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user