generate-ip 2.9.3 → 2.9.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 +32 -47
- package/dist/data/package-data.json +0 -1
- package/docs/README.md +32 -47
- package/docs/SECURITY.md +9 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
5
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/logos/generate-ip/white-logo.png"><img width=700 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/logos/generate-ip/black-logo.png"></picture>
|
|
6
6
|
|
|
7
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
7
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/icons/node-graph/white/icon55x49.png"><img width=23 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/icons/node-graph/black/icon55x49.png"></picture> Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
|
|
8
8
|
|
|
9
9
|
<br>
|
|
10
10
|
|
|
11
|
-
<a href="https://
|
|
11
|
+
<a href="https://npm-compare.com/generate-ip/#timeRange=ALL">
|
|
12
12
|
<img height=31 src="https://img.shields.io/npm/dm/generate-ip?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
13
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-ip-2.9.
|
|
14
|
-
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.9.
|
|
13
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-ip-2.9.4">
|
|
14
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.9.4-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
15
15
|
<a href="#%EF%B8%8F-mit-license">
|
|
16
16
|
<img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
17
17
|
<a href="https://www.npmjs.com/package/generate-ip?activeTab=code">
|
|
18
18
|
<img height=31 src="https://img.shields.io/npm/unpacked-size/generate-ip?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
|
|
19
19
|
<a href="https://sonarcloud.io/component_measures?metric=vulnerabilities&selected=adamlui_js-utils%3Agenerate-ip&id=adamlui_js-utils">
|
|
20
|
-
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Agenerate-ip%2Fsrc%2Fgenerate-ip.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=
|
|
20
|
+
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Agenerate-ip%2Fsrc%2Fgenerate-ip.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=ffef00"></a>
|
|
21
21
|
<a href="https://github.com/toolleeo/cli-apps/#networking">
|
|
22
22
|
<img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
23
23
|
<a href="https://www.jsdelivr.com/package/npm/generate-ip?tab=stats">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
28
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
29
29
|
|
|
30
30
|
## 💡 About
|
|
31
31
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
- **Multi-environment support —** Use in Node.js or the web browser
|
|
37
37
|
- **Command line usable —** Just type `generate-ip`, that's it
|
|
38
38
|
|
|
39
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
39
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
40
40
|
|
|
41
41
|
## ⚡ Installation
|
|
42
42
|
|
|
@@ -58,64 +58,46 @@ As a **runtime dependency**, from your project root:
|
|
|
58
58
|
$ npm install generate-ip
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
<a href="https://github.com/sponsors/adamlui"><img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/banners/sponsor/$10/banner1660x260.png"></a>
|
|
64
|
-
|
|
65
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
|
|
61
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
66
62
|
|
|
67
63
|
## 🔌 Importing the APIs
|
|
68
64
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
#### ECMAScript*:
|
|
65
|
+
#### <a href="#-es-modules-esm"><img height=13 width="auto" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@dbdea4b/assets/images/icons/module-systems/esm/icon32.png"></a> ES Modules (ESM):
|
|
72
66
|
|
|
73
67
|
```js
|
|
74
68
|
import { ipv4, ipv6, mac } from 'generate-ip'
|
|
75
69
|
```
|
|
76
70
|
|
|
77
|
-
#### CommonJS:
|
|
71
|
+
#### <a href="#-commonjs-cjs"><img height=13 width="auto" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@dbdea4b/assets/images/icons/module-systems/cjs/icon32.png"></a> CommonJS (CJS):
|
|
78
72
|
|
|
79
73
|
```js
|
|
80
74
|
const { ipv4, ipv6, mac } = require('generate-ip')
|
|
81
75
|
```
|
|
82
76
|
|
|
83
|
-
|
|
77
|
+
#### [<img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/chrome/icon16.png" title="Chrome">][web-usage][<img height=13.5 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/edge/icon16.png" title="Edge">][web-usage][<img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/firefox/icon16.png" title="Firefox">][web-usage][<img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/safari/icon16.png" title="Safari">][web-usage][<img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/qq/3d/icon-32x33.png" title="QQ Browser">][web-usage] Web:
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
#### <> HTML script tag:
|
|
79
|
+
[web-usage]: #-web
|
|
88
80
|
|
|
89
81
|
```html
|
|
90
|
-
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2
|
|
82
|
+
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2/dist/generate-ip.min.js"></script>
|
|
91
83
|
```
|
|
92
84
|
|
|
93
|
-
####
|
|
94
|
-
|
|
95
|
-
```js
|
|
96
|
-
(async () => {
|
|
97
|
-
await import('https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js')
|
|
98
|
-
// Your code here...
|
|
99
|
-
})()
|
|
100
|
-
```
|
|
85
|
+
#### [<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/tampermonkey/icon28.png" title="Tampermonkey">][greasemonkey-usage][<img height="15" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/violentmonkey/icon25.png" title="Violentmonkey">][greasemonkey-usage][<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/scriptcat/icon32.png" title="ScriptCat">][greasemonkey-usage][<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/orangemonkey/icon16.png" title="OrangeMonkey">][greasemonkey-usage][<img height="14" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/stay/icon32.png" title="Stay">][greasemonkey-usage][<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/userscripts/icon32.png" title="Userscripts">][greasemonkey-usage] Greasemonkey:
|
|
101
86
|
|
|
102
|
-
|
|
87
|
+
[greasemonkey-usage]: #-greasemonkey-1
|
|
103
88
|
|
|
104
89
|
```js
|
|
105
90
|
...
|
|
106
|
-
// @require
|
|
91
|
+
// @require https://cdn.jsdelivr.net/npm/generate-ip@2/dist/generate-ip.min.js
|
|
107
92
|
// ==/UserScript==
|
|
108
|
-
|
|
109
|
-
// Your code here...
|
|
93
|
+
...
|
|
110
94
|
```
|
|
111
95
|
|
|
112
|
-
<br>
|
|
96
|
+
<br><a href="https://github.com/sponsors/KudoAI"><img src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@e53b001/assets/images/banners/sponsor/$10/banner1660x260.png"></a>
|
|
113
97
|
|
|
114
|
-
|
|
98
|
+
<hr>
|
|
115
99
|
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
|
|
100
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
119
101
|
|
|
120
102
|
## 📋 API usage
|
|
121
103
|
|
|
@@ -352,7 +334,7 @@ Name | Type | Description | Default Value
|
|
|
352
334
|
|
|
353
335
|
<br>
|
|
354
336
|
|
|
355
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
337
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
356
338
|
|
|
357
339
|
## 💻 Command line usage
|
|
358
340
|
|
|
@@ -364,7 +346,7 @@ $ generate-ip
|
|
|
364
346
|
|
|
365
347
|
Sample output:
|
|
366
348
|
|
|
367
|
-
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
349
|
+
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/screenshots/cli/generate-ip-cmd-output.png">
|
|
368
350
|
|
|
369
351
|
📝 **Note:** To generate other address types, type `generate-ipv6` or `generate-mac`
|
|
370
352
|
|
|
@@ -414,7 +396,7 @@ export default {
|
|
|
414
396
|
|
|
415
397
|
<br>
|
|
416
398
|
|
|
417
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
399
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
418
400
|
|
|
419
401
|
## 🏛️ MIT License
|
|
420
402
|
|
|
@@ -428,11 +410,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
428
410
|
|
|
429
411
|
<br>
|
|
430
412
|
|
|
431
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
413
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
432
414
|
|
|
433
415
|
## 🛠️ Related utilities
|
|
434
416
|
|
|
435
|
-
### [🔒 generate-pw](https://github.com/adamlui/js-utils/tree/main/generate-pw/#readme) <a href="https://github.com/toolleeo/cli-apps/#password-managers"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
417
|
+
### [🔒 generate-pw](https://github.com/adamlui/js-utils/tree/main/generate-pw/#readme) <a href="https://github.com/toolleeo/cli-apps/#password-managers"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/badges/awesome/badge.svg"></a>
|
|
436
418
|
|
|
437
419
|
> Randomly generate, strengthen, and validate cryptographically-secure passwords.
|
|
438
420
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/#-installation) /
|
|
@@ -441,7 +423,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
441
423
|
[CLI usage](https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/#-command-line-usage) /
|
|
442
424
|
[Discuss](https://github.com/adamlui/js-utils/discussions)
|
|
443
425
|
|
|
444
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
426
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/icons/wire-globe/white/icon32.png"><img height=22 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/icons/wire-globe/black/icon32.png"></picture> [geolocate](https://github.com/adamlui/js-utils/tree/main/geolocate/#readme) <a href="https://github.com/toolleeo/cli-apps/#networking"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/badges/awesome/badge.svg"></a>
|
|
445
427
|
|
|
446
428
|
> Fetch IP geolocation data from the CLI.
|
|
447
429
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/geolocate/docs/#-installation) /
|
|
@@ -452,10 +434,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
452
434
|
|
|
453
435
|
<br>
|
|
454
436
|
|
|
455
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
437
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
456
438
|
|
|
457
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
439
|
+
[<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@21bf981/assets/images/icons/home/white/icon32x27.png"><img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@21bf981/assets/images/icons/home/dark-gray/icon32x27.png"></picture>][js-utils]
|
|
440
|
+
[**More JavaScript utilities**][js-utils] /
|
|
458
441
|
<a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
|
|
459
442
|
<a href="https://github.com/adamlui/js-utils/issues">Report bug</a> /
|
|
460
443
|
<a href="mailto:security@tidelift.com">Report vulnerability</a> /
|
|
461
444
|
<a href="#top">Back to top ↑</a>
|
|
445
|
+
|
|
446
|
+
[js-utils]: https://github.com/adamlui/js-utils/#readme
|
package/docs/README.md
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
5
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/logos/generate-ip/white-logo.png"><img width=700 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/logos/generate-ip/black-logo.png"></picture>
|
|
6
6
|
|
|
7
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
7
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/icons/node-graph/white/icon55x49.png"><img width=23 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/icons/node-graph/black/icon55x49.png"></picture> Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
|
|
8
8
|
|
|
9
9
|
<br>
|
|
10
10
|
|
|
11
|
-
<a href="https://
|
|
11
|
+
<a href="https://npm-compare.com/generate-ip/#timeRange=ALL">
|
|
12
12
|
<img height=31 src="https://img.shields.io/npm/dm/generate-ip?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
13
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-ip-2.9.
|
|
14
|
-
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.9.
|
|
13
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-ip-2.9.4">
|
|
14
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.9.4-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
15
15
|
<a href="#%EF%B8%8F-mit-license">
|
|
16
16
|
<img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
17
17
|
<a href="https://www.npmjs.com/package/generate-ip?activeTab=code">
|
|
18
18
|
<img height=31 src="https://img.shields.io/npm/unpacked-size/generate-ip?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
|
|
19
19
|
<a href="https://sonarcloud.io/component_measures?metric=vulnerabilities&selected=adamlui_js-utils%3Agenerate-ip&id=adamlui_js-utils">
|
|
20
|
-
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Agenerate-ip%2Fsrc%2Fgenerate-ip.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=
|
|
20
|
+
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Agenerate-ip%2Fsrc%2Fgenerate-ip.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=ffef00"></a>
|
|
21
21
|
<a href="https://github.com/toolleeo/cli-apps/#networking">
|
|
22
22
|
<img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
23
23
|
<a href="https://www.jsdelivr.com/package/npm/generate-ip?tab=stats">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
28
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
29
29
|
|
|
30
30
|
## 💡 About
|
|
31
31
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
- **Multi-environment support —** Use in Node.js or the web browser
|
|
37
37
|
- **Command line usable —** Just type `generate-ip`, that's it
|
|
38
38
|
|
|
39
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
39
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
40
40
|
|
|
41
41
|
## ⚡ Installation
|
|
42
42
|
|
|
@@ -58,64 +58,46 @@ As a **runtime dependency**, from your project root:
|
|
|
58
58
|
$ npm install generate-ip
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
<a href="https://github.com/sponsors/adamlui"><img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/banners/sponsor/$10/banner1660x260.png"></a>
|
|
64
|
-
|
|
65
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
|
|
61
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
66
62
|
|
|
67
63
|
## 🔌 Importing the APIs
|
|
68
64
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
#### ECMAScript*:
|
|
65
|
+
#### <a href="#-es-modules-esm"><img height=13 width="auto" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@dbdea4b/assets/images/icons/module-systems/esm/icon32.png"></a> ES Modules (ESM):
|
|
72
66
|
|
|
73
67
|
```js
|
|
74
68
|
import { ipv4, ipv6, mac } from 'generate-ip'
|
|
75
69
|
```
|
|
76
70
|
|
|
77
|
-
#### CommonJS:
|
|
71
|
+
#### <a href="#-commonjs-cjs"><img height=13 width="auto" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@dbdea4b/assets/images/icons/module-systems/cjs/icon32.png"></a> CommonJS (CJS):
|
|
78
72
|
|
|
79
73
|
```js
|
|
80
74
|
const { ipv4, ipv6, mac } = require('generate-ip')
|
|
81
75
|
```
|
|
82
76
|
|
|
83
|
-
|
|
77
|
+
#### [<img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/chrome/icon16.png" title="Chrome">][web-usage][<img height=13.5 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/edge/icon16.png" title="Edge">][web-usage][<img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/firefox/icon16.png" title="Firefox">][web-usage][<img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/safari/icon16.png" title="Safari">][web-usage][<img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@c226de5/assets/images/icons/browsers/qq/3d/icon-32x33.png" title="QQ Browser">][web-usage] Web:
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
#### <> HTML script tag:
|
|
79
|
+
[web-usage]: #-web
|
|
88
80
|
|
|
89
81
|
```html
|
|
90
|
-
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2
|
|
82
|
+
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2/dist/generate-ip.min.js"></script>
|
|
91
83
|
```
|
|
92
84
|
|
|
93
|
-
####
|
|
94
|
-
|
|
95
|
-
```js
|
|
96
|
-
(async () => {
|
|
97
|
-
await import('https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js')
|
|
98
|
-
// Your code here...
|
|
99
|
-
})()
|
|
100
|
-
```
|
|
85
|
+
#### [<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/tampermonkey/icon28.png" title="Tampermonkey">][greasemonkey-usage][<img height="15" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/violentmonkey/icon25.png" title="Violentmonkey">][greasemonkey-usage][<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/scriptcat/icon32.png" title="ScriptCat">][greasemonkey-usage][<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/orangemonkey/icon16.png" title="OrangeMonkey">][greasemonkey-usage][<img height="14" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/stay/icon32.png" title="Stay">][greasemonkey-usage][<img height="13" src="https://cdn.jsdelivr.net/gh/adamlui/userscripts@2793398/assets/images/icons/userscript-managers/userscripts/icon32.png" title="Userscripts">][greasemonkey-usage] Greasemonkey:
|
|
101
86
|
|
|
102
|
-
|
|
87
|
+
[greasemonkey-usage]: #-greasemonkey-1
|
|
103
88
|
|
|
104
89
|
```js
|
|
105
90
|
...
|
|
106
|
-
// @require
|
|
91
|
+
// @require https://cdn.jsdelivr.net/npm/generate-ip@2/dist/generate-ip.min.js
|
|
107
92
|
// ==/UserScript==
|
|
108
|
-
|
|
109
|
-
// Your code here...
|
|
93
|
+
...
|
|
110
94
|
```
|
|
111
95
|
|
|
112
|
-
<br>
|
|
96
|
+
<br><a href="https://github.com/sponsors/KudoAI"><img src="https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@e53b001/assets/images/banners/sponsor/$10/banner1660x260.png"></a>
|
|
113
97
|
|
|
114
|
-
|
|
98
|
+
<hr>
|
|
115
99
|
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
|
|
100
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
119
101
|
|
|
120
102
|
## 📋 API usage
|
|
121
103
|
|
|
@@ -352,7 +334,7 @@ Name | Type | Description | Default Value
|
|
|
352
334
|
|
|
353
335
|
<br>
|
|
354
336
|
|
|
355
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
337
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
356
338
|
|
|
357
339
|
## 💻 Command line usage
|
|
358
340
|
|
|
@@ -364,7 +346,7 @@ $ generate-ip
|
|
|
364
346
|
|
|
365
347
|
Sample output:
|
|
366
348
|
|
|
367
|
-
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
349
|
+
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/screenshots/cli/generate-ip-cmd-output.png">
|
|
368
350
|
|
|
369
351
|
📝 **Note:** To generate other address types, type `generate-ipv6` or `generate-mac`
|
|
370
352
|
|
|
@@ -414,7 +396,7 @@ export default {
|
|
|
414
396
|
|
|
415
397
|
<br>
|
|
416
398
|
|
|
417
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
399
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
418
400
|
|
|
419
401
|
## 🏛️ MIT License
|
|
420
402
|
|
|
@@ -428,11 +410,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
428
410
|
|
|
429
411
|
<br>
|
|
430
412
|
|
|
431
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
413
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
432
414
|
|
|
433
415
|
## 🛠️ Related utilities
|
|
434
416
|
|
|
435
|
-
### [🔒 generate-pw](https://github.com/adamlui/js-utils/tree/main/generate-pw/#readme) <a href="https://github.com/toolleeo/cli-apps/#password-managers"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
417
|
+
### [🔒 generate-pw](https://github.com/adamlui/js-utils/tree/main/generate-pw/#readme) <a href="https://github.com/toolleeo/cli-apps/#password-managers"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/badges/awesome/badge.svg"></a>
|
|
436
418
|
|
|
437
419
|
> Randomly generate, strengthen, and validate cryptographically-secure passwords.
|
|
438
420
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/#-installation) /
|
|
@@ -441,7 +423,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
441
423
|
[CLI usage](https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/#-command-line-usage) /
|
|
442
424
|
[Discuss](https://github.com/adamlui/js-utils/discussions)
|
|
443
425
|
|
|
444
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
426
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/icons/wire-globe/white/icon32.png"><img height=22 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/icons/wire-globe/black/icon32.png"></picture> [geolocate](https://github.com/adamlui/js-utils/tree/main/geolocate/#readme) <a href="https://github.com/toolleeo/cli-apps/#networking"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/badges/awesome/badge.svg"></a>
|
|
445
427
|
|
|
446
428
|
> Fetch IP geolocation data from the CLI.
|
|
447
429
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/geolocate/docs/#-installation) /
|
|
@@ -452,10 +434,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
452
434
|
|
|
453
435
|
<br>
|
|
454
436
|
|
|
455
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
437
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
456
438
|
|
|
457
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
439
|
+
[<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@21bf981/assets/images/icons/home/white/icon32x27.png"><img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@21bf981/assets/images/icons/home/dark-gray/icon32x27.png"></picture>][js-utils]
|
|
440
|
+
[**More JavaScript utilities**][js-utils] /
|
|
458
441
|
<a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
|
|
459
442
|
<a href="https://github.com/adamlui/js-utils/issues">Report bug</a> /
|
|
460
443
|
<a href="mailto:security@tidelift.com">Report vulnerability</a> /
|
|
461
444
|
<a href="#top">Back to top ↑</a>
|
|
445
|
+
|
|
446
|
+
[js-utils]: https://github.com/adamlui/js-utils/#readme
|
package/docs/SECURITY.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
# 🛡️ Security
|
|
1
|
+
# 🛡️ Security policy
|
|
2
2
|
|
|
3
|
-
If you find a vulnerability, please e-mail <security@
|
|
3
|
+
If you find a vulnerability, please e-mail <security@kudoai.com>.
|
|
4
|
+
|
|
5
|
+
<!-- FOOTER -->
|
|
6
|
+
|
|
7
|
+
<hr>
|
|
8
|
+
|
|
9
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@97977cb/assets/images/icons/home/white/icon32x27.png"><img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@97977cb/assets/images/icons/home/dark-gray/icon32x27.png"></picture> <a href=https://github.com/adamlui/js-utils/#readme>**js-utils**</a> /
|
|
10
|
+
<a href="mailto:security@kudoai.com">Report vulnerability</a>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generate-ip",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.4",
|
|
4
4
|
"description": "Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Lui",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"non-latin-locales": "^1.0.1"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@adamlui/minify.js": "^2.5.
|
|
81
|
+
"@adamlui/minify.js": "^2.5.3",
|
|
82
82
|
"@eslint/json": "^1.2.0",
|
|
83
83
|
"@eslint/markdown": "^8.0.1",
|
|
84
84
|
"@stylistic/eslint-plugin": "^5.10.0",
|