Skip to content

Commit

Permalink
Fix version RegExp
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Apr 22, 2021
1 parent b879a1a commit 1013a18
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ var QUERIES = [
select: sinceQuery
},
{
regexp: /^(>=?|<=?)\s*(d+|\d*\.\d+)%$/,
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%$/,
select: function (context, sign, popularity) {
popularity = parseFloat(popularity)
var usage = browserslist.usage.global
Expand All @@ -824,7 +824,7 @@ var QUERIES = [
}
},
{
regexp: /^(>=?|<=?)\s*(d+|\d*\.\d+)%\s+in\s+my\s+stats$/,
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+my\s+stats$/,
select: function (context, sign, popularity) {
popularity = parseFloat(popularity)
if (!context.customUsage) {
Expand Down Expand Up @@ -852,12 +852,12 @@ var QUERIES = [
}
},
{
regexp: /^(>=?|<=?)\s*(d+|\d*\.\d+)%\s+in\s+(\S+)\s+stats$/,
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+(\S+)\s+stats$/,
select: function (context, sign, popularity, name) {
popularity = parseFloat(popularity)
var stats = env.loadStat(context, name, browserslist.data)
if (stats) {
context.customUsage = { }
context.customUsage = {}
for (var browser in stats) {
fillUsage(context.customUsage, browser, stats[browser])
}
Expand Down Expand Up @@ -887,7 +887,7 @@ var QUERIES = [
}
},
{
regexp: /^(>=?|<=?)\s*(d+|\d*\.\d+)%\s+in\s+((alt-)?\w\w)$/,
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+((alt-)?\w\w)$/,
select: function (context, sign, popularity, place) {
popularity = parseFloat(popularity)
if (place.length === 2) {
Expand Down Expand Up @@ -918,11 +918,11 @@ var QUERIES = [
}
},
{
regexp: /^cover\s+(d+|\d*\.\d+)%$/,
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%$/,
select: coverQuery
},
{
regexp: /^cover\s+(d+|\d*\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/,
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/,
select: coverQuery
},
{
Expand Down

0 comments on commit 1013a18

Please sign in to comment.