Add new helper method: isFromEU() to detect whether user comes from an EU country

This commit is contained in:
Faisal Salman
2024-09-14 12:38:51 +07:00
parent b9f1bf6223
commit db1612401f
5 changed files with 31 additions and 1 deletions

View File

@@ -7,7 +7,8 @@ const generateMJS = (module) => {
let text = fs.readFileSync(src, 'utf-8');
replacements.push(
[/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2.mjs\''],
[/const (.+?)\s*=\s*require\(\'\.(.+)\'\)/ig, 'import $1 from \'$2.mjs\''],
[/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2\''],
[/module\.exports =/ig, 'export']
);
replacements.forEach(rep => {