mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
var baseToString = require('../internal/baseToString'),
|
||||
deburrLetter = require('../internal/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;
|
||||
@@ -25,7 +23,7 @@ var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
|
||||
*/
|
||||
function deburr(string) {
|
||||
string = baseToString(string);
|
||||
return string && string.replace(reLatin1, deburrLetter).replace(reComboMarks, '');
|
||||
return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
|
||||
}
|
||||
|
||||
module.exports = deburr;
|
||||
|
||||
@@ -29,7 +29,7 @@ function endsWith(string, target, position) {
|
||||
target = (target + '');
|
||||
|
||||
var length = string.length;
|
||||
position = typeof position == 'undefined'
|
||||
position = position === undefined
|
||||
? length
|
||||
: nativeMin(position < 0 ? 0 : (+position || 0), length);
|
||||
|
||||
|
||||
@@ -19,9 +19,10 @@ var reUnescapedHtml = /[&<>"'`]/g,
|
||||
* (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.
|
||||
|
||||
@@ -2,7 +2,7 @@ var isIterateeCall = require('../internal/isIterateeCall'),
|
||||
trim = require('./trim');
|
||||
|
||||
/** Used to detect hexadecimal string values. */
|
||||
var reHexPrefix = /^0[xX]/;
|
||||
var reHasHexPrefix = /^0[xX]/;
|
||||
|
||||
/** Used to detect and test for whitespace. */
|
||||
var whitespace = (
|
||||
@@ -60,7 +60,7 @@ if (nativeParseInt(whitespace + '08') != 8) {
|
||||
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,5 @@
|
||||
var assignOwnDefaults = require('../internal/assignOwnDefaults'),
|
||||
assignWith = require('../internal/assignWith'),
|
||||
attempt = require('../utility/attempt'),
|
||||
baseAssign = require('../internal/baseAssign'),
|
||||
baseToString = require('../internal/baseToString'),
|
||||
@@ -15,9 +16,7 @@ var reEmptyStringLeading = /\b__p \+= '';/g,
|
||||
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. */
|
||||
@@ -131,9 +130,9 @@ function template(string, options, otherOptions) {
|
||||
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