| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright Mathias Bynens <https://mathiasbynens.be/> | 2 * Copyright (C) 2011-2016 Mathias Bynens <https://mathiasbynens.be/> |
|
Sebastian Noack
2016/08/23 16:27:06
The MIT license header seems to require a copyrigh
kzar
2016/08/23 16:51:13
Done. (I put 2011-2016 after looking at his reposi
| |
| 3 * Copyright (C) 2016 Eyeo GmbH (Minor modifications for compatibility.) | |
| 3 * | 4 * |
| 4 * Permission is hereby granted, free of charge, to any person obtaining | 5 * Permission is hereby granted, free of charge, to any person obtaining |
| 5 * a copy of this software and associated documentation files (the | 6 * a copy of this software and associated documentation files (the |
| 6 * "Software"), to deal in the Software without restriction, including | 7 * "Software"), to deal in the Software without restriction, including |
| 7 * without limitation the rights to use, copy, modify, merge, publish, | 8 * without limitation the rights to use, copy, modify, merge, publish, |
| 8 * distribute, sublicense, and/or sell copies of the Software, and to | 9 * distribute, sublicense, and/or sell copies of the Software, and to |
| 9 * permit persons to whom the Software is furnished to do so, subject to | 10 * permit persons to whom the Software is furnished to do so, subject to |
| 10 * the following conditions: | 11 * the following conditions: |
| 11 * | 12 * |
| 12 * The above copyright notice and this permission notice shall be | 13 * The above copyright notice and this permission notice shall be |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 return mapDomain(input, function(string) { | 430 return mapDomain(input, function(string) { |
| 430 return regexNonASCII.test(string) | 431 return regexNonASCII.test(string) |
| 431 ? 'xn--' + encode(string) | 432 ? 'xn--' + encode(string) |
| 432 : string; | 433 : string; |
| 433 }); | 434 }); |
| 434 }; | 435 }; |
| 435 | 436 |
| 436 /*--------------------------------------------------------------------------*/ | 437 /*--------------------------------------------------------------------------*/ |
| 437 | 438 |
| 438 /** Define the public API */ | 439 /** Define the public API */ |
| 439 const punycode = exports = { | 440 exports = { |
|
Sebastian Noack
2016/08/23 16:27:06
It seems the punycode object isn't used anywhere i
kzar
2016/08/23 16:51:13
Done.
| |
| 440 /** | 441 /** |
| 441 * A string representing the current Punycode.js version number. | 442 * A string representing the current Punycode.js version number. |
| 442 * @memberOf punycode | 443 * @memberOf punycode |
| 443 * @type String | 444 * @type String |
| 444 */ | 445 */ |
| 445 'version': '2.0.0', | 446 'version': '2.0.0', |
| 446 /** | 447 /** |
| 447 * An object of methods to convert from JavaScript's internal character | 448 * An object of methods to convert from JavaScript's internal character |
| 448 * representation (UCS-2) to Unicode code points, and back. | 449 * representation (UCS-2) to Unicode code points, and back. |
| 449 * @see <https://mathiasbynens.be/notes/javascript-encoding> | 450 * @see <https://mathiasbynens.be/notes/javascript-encoding> |
| 450 * @memberOf punycode | 451 * @memberOf punycode |
| 451 * @type Object | 452 * @type Object |
| 452 */ | 453 */ |
| 453 'ucs2': { | 454 'ucs2': { |
| 454 'decode': ucs2decode, | 455 'decode': ucs2decode, |
| 455 'encode': ucs2encode | 456 'encode': ucs2encode |
| 456 }, | 457 }, |
| 457 'decode': decode, | 458 'decode': decode, |
| 458 'encode': encode, | 459 'encode': encode, |
| 459 'toASCII': toASCII, | 460 'toASCII': toASCII, |
| 460 'toUnicode': toUnicode | 461 'toUnicode': toUnicode |
| 461 }; | 462 }; |
| LEFT | RIGHT |