Bump to v3.7.0.

This commit is contained in:
jdalton
2015-04-15 20:56:31 -07:00
parent 801ffd8adf
commit 5eb8db31d7
121 changed files with 897 additions and 413 deletions

View File

@@ -1,10 +1,8 @@
import baseToString from '../internal/baseToString';
import deburrLetter from '../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, '');
}
export default deburr;

View File

@@ -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);

View File

@@ -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.

View File

@@ -3,7 +3,7 @@ import root from '../internal/root';
import trim from './trim';
/** Used to detect hexadecimal string values. */
var reHexPrefix = /^0[xX]/;
var reHasHexPrefix = /^0[xX]/;
/** Used to detect and test for whitespace. */
var whitespace = (
@@ -61,7 +61,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));
};
}

View File

@@ -1,4 +1,5 @@
import assignOwnDefaults from '../internal/assignOwnDefaults';
import assignWith from '../internal/assignWith';
import attempt from '../utility/attempt';
import baseAssign from '../internal/baseAssign';
import baseToString from '../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);