Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove @financial-times/polyfill-useragent-normaliser dependency #92

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

romainmenke
Copy link
Member

@romainmenke romainmenke commented Dec 14, 2024

Resolves: #86

@romainmenke romainmenke enabled auto-merge (squash) December 14, 2024 10:32
@@ -1,11 +1,35 @@
const semver = require('semver');
const uap = require('ua-parser-js');

const SHORT_UA_REGEX = /^(android|bb|chrome|edge|edge_mob|firefox|firefox_mob|ie|ie_mob|safari|ios_saf|opera|op_mob|op_mini|samsung_mob|other)\/((?:\d+\.)*\d+)$/i;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ios_saf/10.0 format is not parseable by ua-parser-js. But a simple regex is sufficient to handle those cases.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UA Financial Times library has disappeared
1 participant