diff --git a/publicsuffixlist.js b/publicsuffixlist.js index 6a8fbe8..4eb865a 100644 --- a/publicsuffixlist.js +++ b/publicsuffixlist.js @@ -301,7 +301,7 @@ function fromSelfie(selfie) { root = root || window; -module.exports = { +root.publicSuffixList = { 'version': '1.0', 'parse': parse, 'getDomain': getDomain, @@ -310,7 +310,11 @@ module.exports = { 'fromSelfie': fromSelfie }; -root.publicSuffixList = module.exports; +if ( typeof module !== "undefined" ) { + module.exports = root.publicSuffixList; +} else if ( typeof exports !== "undefined" ) { + exports = root.publicSuffixList; +} /******************************************************************************/