rand-user-agent 2.0.2 → 2.0.4
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.
- package/README.md +4 -3
- package/data/user-agents.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,11 +11,12 @@ Run the following command in the main folder of your project:
|
|
|
11
11
|
```
|
|
12
12
|
npm i rand-user-agent
|
|
13
13
|
```
|
|
14
|
-
|
|
14
|
+
| :memo: | Starting from version 2.0.0 onwards, this package is migrating to ESM.|
|
|
15
|
+
|---------------|:------------------------|
|
|
15
16
|
## Usage Example
|
|
16
17
|
|
|
17
18
|
```
|
|
18
|
-
|
|
19
|
+
import randUserAgent from "rand-user-agent";
|
|
19
20
|
const agent = randUserAgent("desktop");
|
|
20
21
|
|
|
21
22
|
console.log(agent);
|
|
@@ -25,7 +26,7 @@ console.log(agent);
|
|
|
25
26
|
You can also provide a browser and an operating system in the parameters of randUserAgent in order to filter out the user agents:
|
|
26
27
|
|
|
27
28
|
```
|
|
28
|
-
|
|
29
|
+
import randUserAgent from "rand-user-agent";
|
|
29
30
|
const agent = randUserAgent("desktop", "chrome", "linux");
|
|
30
31
|
|
|
31
32
|
console.log(agent);
|