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

Unified Diff: lib/punycode.js

Issue 29340571: Issue 3687 - Add experimental support for Safari content blockers (Closed)
Patch Set: Addressed Nits Created May 18, 2016, 11:30 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/prefs.js ('k') | lib/tldjs.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/punycode.js
diff --git a/lib/punycode.js b/lib/punycode.js
index 58769d3bc4a854ec1dcfa00c00b8765b3df940ee..922669a30f65eff8028b7c675c80a21b6902bc5c 100644
--- a/lib/punycode.js
+++ b/lib/punycode.js
@@ -1,16 +1,6 @@
/*! http://mths.be/punycode v1.2.3 by @mathias */
/* Used under GPL 2.0, see https://github.com/bestiejs/punycode.js/blob/master/LICENSE-GPL.txt */
-;(function(root) {
-
- /** Detect free variables */
- var freeExports = typeof exports == 'object' && exports;
- var freeModule = typeof module == 'object' && module &&
- module.exports == freeExports && module;
- var freeGlobal = typeof global == 'object' && global;
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
- root = freeGlobal;
- }
-
+;(function() {
/**
* The `punycode` object.
* @name punycode
@@ -459,7 +449,7 @@
/*--------------------------------------------------------------------------*/
/** Define the public API */
- punycode = {
+ exports = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
@@ -482,28 +472,4 @@
'toASCII': toASCII,
'toUnicode': toUnicode
};
-
- /** Expose `punycode` */
- // Some AMD build optimizers, like r.js, check for specific condition patterns
- // like the following:
- if (
- typeof define == 'function' &&
- typeof define.amd == 'object' &&
- define.amd
- ) {
- define(function() {
- return punycode;
- });
- } else if (freeExports && !freeExports.nodeType) {
- if (freeModule) { // in Node.js or RingoJS v0.8.0+
- freeModule.exports = punycode;
- } else { // in Narwhal or RingoJS v0.7.0-
- for (key in punycode) {
- punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
- }
- }
- } else { // in Rhino or a web browser
- root.punycode = punycode;
- }
-
-}(this));
+}());
« no previous file with comments | « lib/prefs.js ('k') | lib/tldjs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld