Skip to content

Commit 60d1820

Browse files
committed
Update PUBLIC_DOMAINS to PUBLIC_DOMAINS_SET to improve performance
1 parent b5d9485 commit 60d1820

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/CONST.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ const UI = {
990990
} as const;
991991

992992
// List of most frequently used public domains
993-
const PUBLIC_DOMAINS = [
993+
const PUBLIC_DOMAINS_SET = new Set<string>([
994994
'accountant.com',
995995
'afis.ch',
996996
'aol.com',
@@ -1062,6 +1062,6 @@ const PUBLIC_DOMAINS = [
10621062
'yahoo.com',
10631063
'yahoo.com.br',
10641064
'ymail.com',
1065-
] as const;
1065+
]);
10661066

1067-
export {g_cloudFront, g_cloudFrontImg, CONST, UI, PUBLIC_DOMAINS};
1067+
export {g_cloudFront, g_cloudFrontImg, CONST, UI, PUBLIC_DOMAINS_SET};

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export {default as API} from './API';
33
export {default as APIDeferred} from './APIDeferred';
44
export {default as BrowserDetect} from './BrowserDetect';
5-
export {g_cloudFront, g_cloudFrontImg, CONST, UI, PUBLIC_DOMAINS} from './CONST';
5+
export {g_cloudFront, g_cloudFrontImg, CONST, UI, PUBLIC_DOMAINS_SET} from './CONST';
66

77
export {default as Cookie} from './Cookie';
88
export {default as CredentialsWrapper, LOGIN_PARTNER_DETAILS} from './CredentialsWrapper';

0 commit comments

Comments
 (0)