Skip to content

Commit

Permalink
feat: support RE2
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypkhantc committed Dec 18, 2024
1 parent c68c2f0 commit 4c584fb
Show file tree
Hide file tree
Showing 4 changed files with 3,505 additions and 2,325 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export const regexes = [
* Ignore Edge with EdgeHTML engine.
*/
{
regex: /Chrom(ium|e)\/(\d+)\.(\d+)(\.(\d+)|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/,
// Equivalent to /Chrom(ium|e)\/(\d+)\.(\d+)(\.(\d+)|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/
regex: /Chrom(ium|e)\/(\d+)\.(\d+)(\.(\d+)|)(\.\d+|)([\d.]+$|.*([^e]|[^g]e|[^d]ge|[^E]dge)\/[\d.]+$)/,
family: 'chrome',
maxVersion: [
70,
Expand Down Expand Up @@ -183,7 +184,8 @@ export const regexes = [
* Ignore IE Mobile 11
*/
{
regex: /Android:?[ /-](\d+)(\.(\d+)|)(\.(\d+)|);(?! ARM; Trident)/,
// Equivalent to /Android:?[ /-](\d+)(\.(\d+)|)(\.(\d+)|);(?! ARM; Trident)/
regex: /Android:?[ /-](\d+)(\.(\d+)|)(\.(\d+)|); ([^A]|A[^R]|AR[^M]|ARM[^;]|ARM;[^ ]|ARM; [^T]|ARM; T[^r]|ARM; Tr[^i]|ARM; Tri[^d]|ARM; Trid[^e]|ARM; Tride[^n]|ARM; Triden[^t])/,
family: 'android',
version: [
4,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"del-cli": "^5.0.0",
"eslint": "^8.25.0",
"nano-staged": "^0.8.0",
"re2": "^1.21.4",
"simple-git-hooks": "^2.8.0",
"simple-github-release": "^1.0.0",
"standard-version": "^9.5.0"
Expand Down
Loading

0 comments on commit 4c584fb

Please sign in to comment.