-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more academic mail,fix checkAcademic
- Loading branch information
Showing
12 changed files
with
210 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sortEmailDomains = sortEmailDomains; | ||
const fs_1 = __importDefault(require("fs")); | ||
const path_1 = __importDefault(require("path")); | ||
// Path to the emails.json file | ||
const filePath = path_1.default.join(__dirname, "emails.json"); | ||
// Function to read, sort, and write the emails.json file | ||
function sortEmailDomains() { | ||
// Read the file | ||
fs_1.default.readFile(filePath, "utf8", (err, data) => { | ||
if (err) { | ||
console.error("Error reading file:", err); | ||
return; | ||
} | ||
// Parse the JSON data | ||
let domains; | ||
try { | ||
domains = JSON.parse(data); | ||
} | ||
catch (err) { | ||
console.error("Error parsing JSON:", err); | ||
return; | ||
} | ||
// Sort the array in place | ||
domains.sort(); | ||
// Convert the array back to JSON | ||
const sortedData = JSON.stringify(domains, null, 2); | ||
// Write the sorted array back to the file | ||
fs_1.default.writeFile(filePath, sortedData, "utf8", (err) => { | ||
if (err) { | ||
console.error("Error writing file:", err); | ||
return; | ||
} | ||
console.log("File sorted successfully."); | ||
}); | ||
}); | ||
} | ||
// Call the function to sort the email domains | ||
sortEmailDomains(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.