|
|
@ -1,4 +1,4 @@ |
|
|
|
/*! http://mths.be/punycode by @mathias */ |
|
|
|
/*! http://mths.be/punycode v1.2.0 by @mathias */ |
|
|
|
;(function(root) { |
|
|
|
|
|
|
|
/** |
|
|
@ -29,12 +29,13 @@ |
|
|
|
delimiter = '-', // '\x2D'
|
|
|
|
|
|
|
|
/** Regular expressions */ |
|
|
|
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
|
|
|
|
regexPunycode = /^xn--/, |
|
|
|
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
|
|
|
|
regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
|
|
|
|
|
|
|
|
/** Error messages */ |
|
|
|
errors = { |
|
|
|
'overflow': 'Overflow: input needs wider integers to process.', |
|
|
|
'overflow': 'Overflow: input needs wider integers to process', |
|
|
|
'not-basic': 'Illegal input >= 0x80 (not a basic code point)', |
|
|
|
'invalid-input': 'Invalid input' |
|
|
|
}, |
|
|
@ -85,8 +86,7 @@ |
|
|
|
* function. |
|
|
|
*/ |
|
|
|
function mapDomain(string, fn) { |
|
|
|
var glue = '.'; |
|
|
|
return map(string.split(glue), fn).join(glue); |
|
|
|
return map(string.split(regexSeparators), fn).join('.'); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -198,7 +198,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Converts a basic code point to lowercase is `flag` is falsy, or to |
|
|
|
* Converts a basic code point to lowercase if `flag` is falsy, or to |
|
|
|
* uppercase if `flag` is truthy. The code point is unchanged if it's |
|
|
|
* caseless. The behavior is undefined if `codePoint` is not a basic code |
|
|
|
* point. |
|
|
@ -470,7 +470,7 @@ |
|
|
|
* @memberOf punycode |
|
|
|
* @type String |
|
|
|
*/ |
|
|
|
'version': '1.1.1', |
|
|
|
'version': '1.2.0', |
|
|
|
/** |
|
|
|
* An object of methods to convert from JavaScript's internal character |
|
|
|
* representation (UCS-2) to decimal Unicode code points, and back. |
|
|
|