mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-30 17:27:44 +03:00
Add new helper method: isFromEU()
to detect whether user comes from an EU country
This commit is contained in:
@@ -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 => {
|
||||
|
Reference in New Issue
Block a user