generate-ip 2.9.2 → 2.9.3
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 +6 -6
- package/dist/cli/lib/language.js +2 -9
- package/docs/README.md +6 -6
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
<a href="https://npmstar.com/compare/generate-ip">
|
|
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.3">
|
|
14
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.9.3-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">
|
|
@@ -87,14 +87,14 @@ const { ipv4, ipv6, mac } = require('generate-ip')
|
|
|
87
87
|
#### <> HTML script tag:
|
|
88
88
|
|
|
89
89
|
```html
|
|
90
|
-
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2.9.
|
|
90
|
+
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js"></script>
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
#### ES6:
|
|
94
94
|
|
|
95
95
|
```js
|
|
96
96
|
(async () => {
|
|
97
|
-
await import('https://cdn.jsdelivr.net/npm/generate-ip@2.9.
|
|
97
|
+
await import('https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js')
|
|
98
98
|
// Your code here...
|
|
99
99
|
})()
|
|
100
100
|
```
|
|
@@ -103,7 +103,7 @@ const { ipv4, ipv6, mac } = require('generate-ip')
|
|
|
103
103
|
|
|
104
104
|
```js
|
|
105
105
|
...
|
|
106
|
-
// @require https://cdn.jsdelivr.net/npm/generate-ip@2.9.
|
|
106
|
+
// @require https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js
|
|
107
107
|
// ==/UserScript==
|
|
108
108
|
|
|
109
109
|
// Your code here...
|
|
@@ -111,7 +111,7 @@ const { ipv4, ipv6, mac } = require('generate-ip')
|
|
|
111
111
|
|
|
112
112
|
<br>
|
|
113
113
|
|
|
114
|
-
📝 **Note:** To always import the latest version (not recommended in production!) remove the `@2.9.
|
|
114
|
+
📝 **Note:** To always import the latest version (not recommended in production!) remove the `@2.9.3` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/generate-ip/dist/generate-ip.min.js`
|
|
115
115
|
|
|
116
116
|
<br>
|
|
117
117
|
|
package/dist/cli/lib/language.js
CHANGED
|
@@ -51,15 +51,8 @@ module.exports = {
|
|
|
51
51
|
require(`../../${ env.modes.dev ? '../_locales/en' : 'data' }/messages.json`))
|
|
52
52
|
|
|
53
53
|
if (!langCode.startsWith('en')) { // fetch non-English msgs from jsDelivr
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`${cli.urls.jsdelivr}@${cli.commitHashes.data}/assets/data/non-latin-locales.json`
|
|
57
|
-
)).json()
|
|
58
|
-
if (nonLatinLocales.includes(langCode.split('-')[0]) && !env.supports.unicode)
|
|
59
|
-
return msgs // en ones
|
|
60
|
-
} catch (err) {
|
|
61
|
-
log.debug(`Failed to fetch non-Latin locales: ${err}`)
|
|
62
|
-
}
|
|
54
|
+
if (require('non-latin-locales').includes(langCode.split('_')[0]) && !env.supports.unicode)
|
|
55
|
+
return msgs // EN ones
|
|
63
56
|
const msgBaseURL = `${require('./jsdelivr').getCommitURL(cli.commitHashes.locales)}/_locales`
|
|
64
57
|
let msgURL = `${msgBaseURL}/${langCode}/messages.json`, msgFetchesTried = 0
|
|
65
58
|
while (msgFetchesTried < 3)
|
package/docs/README.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
<a href="https://npmstar.com/compare/generate-ip">
|
|
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.3">
|
|
14
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.9.3-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">
|
|
@@ -87,14 +87,14 @@ const { ipv4, ipv6, mac } = require('generate-ip')
|
|
|
87
87
|
#### <> HTML script tag:
|
|
88
88
|
|
|
89
89
|
```html
|
|
90
|
-
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2.9.
|
|
90
|
+
<script src="https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js"></script>
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
#### ES6:
|
|
94
94
|
|
|
95
95
|
```js
|
|
96
96
|
(async () => {
|
|
97
|
-
await import('https://cdn.jsdelivr.net/npm/generate-ip@2.9.
|
|
97
|
+
await import('https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js')
|
|
98
98
|
// Your code here...
|
|
99
99
|
})()
|
|
100
100
|
```
|
|
@@ -103,7 +103,7 @@ const { ipv4, ipv6, mac } = require('generate-ip')
|
|
|
103
103
|
|
|
104
104
|
```js
|
|
105
105
|
...
|
|
106
|
-
// @require https://cdn.jsdelivr.net/npm/generate-ip@2.9.
|
|
106
|
+
// @require https://cdn.jsdelivr.net/npm/generate-ip@2.9.3/dist/generate-ip.min.js
|
|
107
107
|
// ==/UserScript==
|
|
108
108
|
|
|
109
109
|
// Your code here...
|
|
@@ -111,7 +111,7 @@ const { ipv4, ipv6, mac } = require('generate-ip')
|
|
|
111
111
|
|
|
112
112
|
<br>
|
|
113
113
|
|
|
114
|
-
📝 **Note:** To always import the latest version (not recommended in production!) remove the `@2.9.
|
|
114
|
+
📝 **Note:** To always import the latest version (not recommended in production!) remove the `@2.9.3` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/generate-ip/dist/generate-ip.min.js`
|
|
115
115
|
|
|
116
116
|
<br>
|
|
117
117
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generate-ip",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.3",
|
|
4
4
|
"description": "Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Lui",
|
|
@@ -74,10 +74,11 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"console-table-printer": "^2.15.0",
|
|
76
76
|
"is-unicode-supported": "^2.1.0",
|
|
77
|
-
"node-clipboardy": "^1.0.3"
|
|
77
|
+
"node-clipboardy": "^1.0.3",
|
|
78
|
+
"non-latin-locales": "^1.0.1"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
|
-
"@adamlui/minify.js": "^2.5.
|
|
81
|
+
"@adamlui/minify.js": "^2.5.2",
|
|
81
82
|
"@eslint/json": "^1.2.0",
|
|
82
83
|
"@eslint/markdown": "^8.0.1",
|
|
83
84
|
"@stylistic/eslint-plugin": "^5.10.0",
|