Skip to content

Commit ddd7380

Browse files
committed
no need for a closure in the end, I decided no need for private vars since not a lib to be published
1 parent a325083 commit ddd7380

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

js/uritools.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929

3030
/******************************************************************************/
3131

32-
var uriTools = (function() {
33-
3432
/******************************************************************************/
3533

3634
var uriTools = {
@@ -438,7 +436,8 @@ var uriTools = {
438436
_path: '',
439437
_query: '',
440438
_fragment: '',
441-
_publicSuffixList: null,
439+
440+
_publicSuffixList: publicSuffixList,
442441

443442
/*--------------------------------------------------------------------*/
444443

@@ -474,15 +473,5 @@ var uriTools = {
474473
uriTools.authorityBit = (uriTools.userBit | uriTools.passwordBit | uriTools.hostnameBit | uriTools.portBit);
475474
uriTools.normalizeBits = (uriTools.schemeBit | uriTools.hostnameBit | uriTools.pathBit | uriTools.queryBit);
476475

477-
if ( !publicSuffixList ) {
478-
throw 'publicSuffixList not defined!';
479-
}
480-
481-
uriTools._publicSuffixList = publicSuffixList;
482-
483476
/******************************************************************************/
484477

485-
return uriTools;
486-
487-
})();
488-

0 commit comments

Comments
 (0)