Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: lib/punycode.js

Issue 29350076: Issue 4350 - Update punycode.js to 2.0.0 (Closed)
Left Patch Set: Add license header and fix for our use Created Aug. 23, 2016, 3:29 p.m.
Right Patch Set: Addressed feedback Created Aug. 23, 2016, 4:49 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 };
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld