Comparing version 1.0.3 to 1.0.4
16
index.ts
@@ -43,4 +43,14 @@ const cyrb53 = (str: string, seed = 0) => { | ||
"theoldreader", | ||
"rss-parrot-bot", | ||
"nextcloud-news", | ||
"blogtrottr", | ||
"feedmail.org", | ||
"spacecowboys android rss reader", | ||
]; | ||
let replacements = { | ||
"spacecowboys android rss reader": "feeder", | ||
"rss-parrot-bot": "rss parrot", | ||
}; | ||
export function countRss(userAgent: string, feedUrl: string, ip: string) { | ||
@@ -57,6 +67,8 @@ let subscriberCountT = userAgent.match(/([0-9]+) subscriber/); | ||
readers.find((r) => userAgent.toLowerCase().includes(r)) || null; | ||
readerName = | ||
(replacements[readerName] ? replacements[readerName] : readerName) || null; | ||
let version = | ||
readers.filter((r) => | ||
userAgent.toLowerCase().match(new RegExp(r + "\\/[^;) ]*")) | ||
userAgent.toLowerCase().match(new RegExp(r + " ?\\/ ?([^;) ]*)")) | ||
)[0] || null; | ||
@@ -66,3 +78,3 @@ if (version) | ||
.toLowerCase() | ||
.match(new RegExp(version + "\\/[^;) ]*"))![1]; | ||
.match(new RegExp(version + " ?\\/ ?([^;) ]*)"))![1]; | ||
@@ -69,0 +81,0 @@ let entry: LogEntry = { |
{ | ||
"name": "rsslytics", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Analytics for RSS", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5739
171