is-academic-email 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data.json +1 -0
- package/dist/index.js +7 -24
- package/dist/swot-metadata.d.ts +1 -1
- package/dist/swot-metadata.js +2 -7
- package/package.json +2 -2
- package/data.json.br +0 -0
package/dist/index.js
CHANGED
|
@@ -1,27 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let packed;
|
|
9
|
-
try {
|
|
10
|
-
const compressed = fs.readFileSync(dataPath);
|
|
11
|
-
const decompressed = brotliDecompressSync(compressed);
|
|
12
|
-
packed = JSON.parse(decompressed.toString('utf8'));
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
console.error(`Error loading SWOT data from ${dataPath}:`, err);
|
|
16
|
-
packed = { institutions: {}, stoplist: [], tlds: [] };
|
|
17
|
-
}
|
|
18
|
-
return {
|
|
19
|
-
institutions: new Map(Object.entries(packed.institutions)),
|
|
20
|
-
stoplist: new Set(packed.stoplist.map((s) => s.toLowerCase())),
|
|
21
|
-
tlds: new Set(packed.tlds.map((s) => s.toLowerCase())),
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
const DATA = loadData();
|
|
1
|
+
import dataRaw from '../data.json' assert { type: 'json' };
|
|
2
|
+
const packed = dataRaw;
|
|
3
|
+
const DATA = {
|
|
4
|
+
institutions: new Map(Object.entries(packed.institutions)),
|
|
5
|
+
stoplist: new Set(packed.stoplist.map((s) => s.toLowerCase())),
|
|
6
|
+
tlds: new Set(packed.tlds.map((s) => s.toLowerCase())),
|
|
7
|
+
};
|
|
25
8
|
function domainParts(emailOrDomain) {
|
|
26
9
|
const raw = emailOrDomain.trim().toLowerCase();
|
|
27
10
|
const host = raw
|
package/dist/swot-metadata.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export declare const SWOT_METADATA: {
|
|
|
2
2
|
readonly commit: "7ff3d9b7dfef8febdda73117fc6729740a597265";
|
|
3
3
|
readonly date: "2025-09-25 16:53:34 +0300";
|
|
4
4
|
readonly url: "https://github.com/jetbrains/swot";
|
|
5
|
-
readonly updatedAt: "2025-09-25T14:
|
|
5
|
+
readonly updatedAt: "2025-09-25T14:44:01.188Z";
|
|
6
6
|
};
|
package/dist/swot-metadata.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
// This file was automatically generated on 2025-09-25T14:
|
|
2
|
-
export const SWOT_METADATA = {
|
|
3
|
-
"commit": "7ff3d9b7dfef8febdda73117fc6729740a597265",
|
|
4
|
-
"date": "2025-09-25 16:53:34 +0300",
|
|
5
|
-
"url": "https://github.com/jetbrains/swot",
|
|
6
|
-
"updatedAt": "2025-09-25T14:23:05.546Z"
|
|
7
|
-
};
|
|
1
|
+
// This file was automatically generated on 2025-09-25T14:44:01.220Z
|
|
2
|
+
export const SWOT_METADATA = { "commit": "7ff3d9b7dfef8febdda73117fc6729740a597265", "date": "2025-09-25 16:53:34 +0300", "url": "https://github.com/jetbrains/swot", "updatedAt": "2025-09-25T14:44:01.188Z" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "is-academic-email",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Fast academic email validation using the JetBrains swot database",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "git+https://github.com/amplitudesxd/is-academic-email.git"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
|
-
"data.json
|
|
20
|
+
"data.json"
|
|
21
21
|
],
|
|
22
22
|
"keywords": [
|
|
23
23
|
"academic-email",
|
package/data.json.br
DELETED
|
Binary file
|