@alitu/user-agents-v2-api 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ import type { OPAWGPatternEntry } from './user-agents-v2';
2
+ type ParseUserAgentResult = (OPAWGPatternEntry & {
3
+ filename: string;
4
+ }) | undefined;
5
+ /**
6
+ * Search OPAWG user-agent-v2 lists for User-Agent string.
7
+ * @param {string} userAgent User-Agent string
8
+ * @returns {OPAWGPatternEntry | undefined} OPAWG pattern entry, undefined if not found
9
+ */
10
+ export default function parseUserAgent(userAgent: string): ParseUserAgentResult;
11
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,74 @@
1
+ import type { OPAWGPatternsFile } from './patterns';
2
+ type Entry = NonNullable<OPAWGPatternsFile['entries']>[number];
3
+ export interface OPAWGPatternEntry extends Entry {
4
+ regexp: RegExp;
5
+ }
6
+ declare const _default: {
7
+ apps: {
8
+ regexp: RegExp;
9
+ name: string;
10
+ pattern: string;
11
+ description?: string;
12
+ svg?: string;
13
+ comments?: string;
14
+ examples?: string[];
15
+ urls?: string[];
16
+ category?: string;
17
+ }[];
18
+ bots: {
19
+ regexp: RegExp;
20
+ name: string;
21
+ pattern: string;
22
+ description?: string;
23
+ svg?: string;
24
+ comments?: string;
25
+ examples?: string[];
26
+ urls?: string[];
27
+ category?: string;
28
+ }[];
29
+ browsers: {
30
+ regexp: RegExp;
31
+ name: string;
32
+ pattern: string;
33
+ description?: string;
34
+ svg?: string;
35
+ comments?: string;
36
+ examples?: string[];
37
+ urls?: string[];
38
+ category?: string;
39
+ }[];
40
+ devices: {
41
+ regexp: RegExp;
42
+ name: string;
43
+ pattern: string;
44
+ description?: string;
45
+ svg?: string;
46
+ comments?: string;
47
+ examples?: string[];
48
+ urls?: string[];
49
+ category?: string;
50
+ }[];
51
+ libraries: {
52
+ regexp: RegExp;
53
+ name: string;
54
+ pattern: string;
55
+ description?: string;
56
+ svg?: string;
57
+ comments?: string;
58
+ examples?: string[];
59
+ urls?: string[];
60
+ category?: string;
61
+ }[];
62
+ referrers: {
63
+ regexp: RegExp;
64
+ name: string;
65
+ pattern: string;
66
+ description?: string;
67
+ svg?: string;
68
+ comments?: string;
69
+ examples?: string[];
70
+ urls?: string[];
71
+ category?: string;
72
+ }[];
73
+ };
74
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alitu/user-agents-v2-api",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "API for identifying User-Agent strings using OPAWG's user-agents-v2 lists.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {