diff --git a/utils/getJSON.js b/utils/getJSON.js index 14909ea..c6de376 100644 --- a/utils/getJSON.js +++ b/utils/getJSON.js @@ -1,28 +1,10 @@ const fs = require("fs"); +const invalidDomains = require("./invalid-domains.json"); function getFileExtension(filename) { return (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined; } -const invalidDomains = [ - "_acme-challenge", - "_github-challenge-is-a-good-dev", - "_github-pages-challenge-is-a-good-dev", - "help", - "no-reply", - "noreply", - "notification", - "notifications", - "support", - "ww", - "ww1", - "ww2", - "ww3", - "ww4", - "wwww", - "your-domain-name" -] - function getJSON(file, filename) { const path = `${process.env.actions_path}/${file}`; // File path. const ext = getFileExtension(file); diff --git a/utils/invalid-domains.json b/utils/invalid-domains.json new file mode 100644 index 0000000..2bc21a6 --- /dev/null +++ b/utils/invalid-domains.json @@ -0,0 +1,18 @@ +[ + "_acme-challenge", + "_github-challenge-is-a-good-dev", + "_github-pages-challenge-is-a-good-dev", + "help", + "no-reply", + "noreply", + "notification", + "notifications", + "support", + "ww", + "ww1", + "ww2", + "ww3", + "ww4", + "wwww", + "your-domain-name" +] \ No newline at end of file