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

Side by Side Diff: lib/punycode.js

Issue 29371995: Issue 4803 - Fix punycode module exports (Closed)
Patch Set: Created Jan. 16, 2017, 8:58 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011-2016 Mathias Bynens <https://mathiasbynens.be/> 2 * Copyright (C) 2011-2016 Mathias Bynens <https://mathiasbynens.be/>
3 * Copyright (C) 2016 Eyeo GmbH (Minor modifications for compatibility.) 3 * Copyright (C) 2016 Eyeo GmbH (Minor modifications for compatibility.)
4 * 4 *
5 * Permission is hereby granted, free of charge, to any person obtaining 5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the 6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including 7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish, 8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to 9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * 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
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 return mapDomain(input, function(string) { 430 return mapDomain(input, function(string) {
431 return regexNonASCII.test(string) 431 return regexNonASCII.test(string)
432 ? 'xn--' + encode(string) 432 ? 'xn--' + encode(string)
433 : string; 433 : string;
434 }); 434 });
435 }; 435 };
436 436
437 /*--------------------------------------------------------------------------*/ 437 /*--------------------------------------------------------------------------*/
438 438
439 /** Define the public API */ 439 /** Define the public API */
440 exports = { 440 module.exports = {
441 /** 441 /**
442 * A string representing the current Punycode.js version number. 442 * A string representing the current Punycode.js version number.
443 * @memberOf punycode 443 * @memberOf punycode
444 * @type String 444 * @type String
445 */ 445 */
446 'version': '2.0.0', 446 'version': '2.0.0',
447 /** 447 /**
448 * An object of methods to convert from JavaScript's internal character 448 * An object of methods to convert from JavaScript's internal character
449 * representation (UCS-2) to Unicode code points, and back. 449 * representation (UCS-2) to Unicode code points, and back.
450 * @see <https://mathiasbynens.be/notes/javascript-encoding> 450 * @see <https://mathiasbynens.be/notes/javascript-encoding>
451 * @memberOf punycode 451 * @memberOf punycode
452 * @type Object 452 * @type Object
453 */ 453 */
454 'ucs2': { 454 'ucs2': {
455 'decode': ucs2decode, 455 'decode': ucs2decode,
456 'encode': ucs2encode 456 'encode': ucs2encode
457 }, 457 },
458 'decode': decode, 458 'decode': decode,
459 'encode': encode, 459 'encode': encode,
460 'toASCII': toASCII, 460 'toASCII': toASCII,
461 'toUnicode': toUnicode 461 'toUnicode': toUnicode
462 }; 462 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld