generate-pw 2.3.2 → 2.3.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 CHANGED
@@ -3,8 +3,8 @@
3
3
  <div align="right">
4
4
  <h6>
5
5
  <picture>
6
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@f2dc346/assets/images/icons/earth/white/icon32.svg">
7
- <img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@f2dc346/assets/images/icons/earth/black/icon32.svg">
6
+ <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/icons/earth/white/icon32.svg">
7
+ <img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/icons/earth/black/icon32.svg">
8
8
  </picture>
9
9
  &nbsp;English |
10
10
  <a href="https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/zh-cn/#readme">简体中文</a> |
@@ -21,22 +21,22 @@
21
21
 
22
22
  ### Randomly generate, strengthen, and validate cryptographically-secure passwords.
23
23
 
24
- <a href="https://npmstar.com/compare/generate-pw">
24
+ <a href="https://npm-compare.com/generate-pw/#timeRange=ALL">
25
25
  <img height=31 src="https://img.shields.io/npm/dm/generate-pw?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
- <a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-2.3.2">
27
- <img height=31 src="https://img.shields.io/badge/Latest_Build-2.3.2-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
+ <a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-2.3.4">
27
+ <img height=31 src="https://img.shields.io/badge/Latest_Build-2.3.4-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
28
28
  <a href="#%EF%B8%8F-mit-license">
29
29
  <img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
30
30
  <a href="https://www.npmjs.com/package/generate-pw?activeTab=code">
31
31
  <img height=31 src="https://img.shields.io/npm/unpacked-size/generate-pw?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
32
32
  <a href="https://sonarcloud.io/component_measures?metric=vulnerabilities&selected=adamlui_js-utils%3Agenerate-pw&id=adamlui_js-utils">
33
- <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-pw%2Fsrc%2Fgenerate-pw.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
33
+ <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-pw%2Fsrc%2Fgenerate-pw.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=ffef00"></a>
34
34
  <a href="https://github.com/toolleeo/cli-apps/#password-managers">
35
35
  <img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
36
36
 
37
37
  <br>
38
38
 
39
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
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
  ## 💡 About
42
42
 
@@ -47,7 +47,7 @@
47
47
  - **Multi-environment support —** Use in Node.js or the web browser
48
48
  - **Command line usable —** Just type `generate-pw`, that's it
49
49
 
50
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
50
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
51
51
 
52
52
  ## ⚡ Installation
53
53
 
@@ -63,64 +63,46 @@ As a **runtime dependency**, from your project root:
63
63
  $ npm install generate-pw
64
64
  ```
65
65
 
66
- <br>
67
-
68
- <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>
69
-
70
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
66
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
71
67
 
72
68
  ## 🔌 Importing the API
73
69
 
74
- ### <img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/node.js/icon25x28.png"> Node.js
75
-
76
- #### ECMAScript*:
70
+ #### <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):
77
71
 
78
72
  ```js
79
73
  import pw from 'generate-pw'
80
74
  ```
81
75
 
82
- #### CommonJS:
76
+ #### <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):
83
77
 
84
78
  ```js
85
79
  const pw = require('generate-pw')
86
80
  ```
87
81
 
88
- ###### _*Node.js version 14 or higher required_
82
+ #### [<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:
89
83
 
90
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/web/light/icon25.png"><img width=16 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/web/dark/icon25.png"></picture> Web
91
-
92
- #### <> HTML script tag:
84
+ [web-usage]: #-web
93
85
 
94
86
  ```html
95
- <script src="https://cdn.jsdelivr.net/npm/generate-pw@2.3.2/dist/generate-pw.min.js"></script>
87
+ <script src="https://cdn.jsdelivr.net/npm/generate-pw@2/dist/generate-pw.min.js"></script>
96
88
  ```
97
89
 
98
- #### ES6:
99
-
100
- ```js
101
- (async () => {
102
- await import('https://cdn.jsdelivr.net/npm/generate-pw@2.3.2/dist/generate-pw.min.js')
103
- // Your code here...
104
- })()
105
- ```
90
+ #### [<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:
106
91
 
107
- ### <img height=17 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/tampermonkey/icon28.png"><img height=17.5 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/violentmonkey/icon25.png"> Greasemonkey
92
+ [greasemonkey-usage]: #-greasemonkey-1
108
93
 
109
94
  ```js
110
95
  ...
111
- // @require https://cdn.jsdelivr.net/npm/generate-pw@2.3.2/dist/generate-pw.min.js
96
+ // @require https://cdn.jsdelivr.net/npm/generate-pw@2/dist/generate-pw.min.js
112
97
  // ==/UserScript==
113
-
114
- // Your code here...
98
+ ...
115
99
  ```
116
100
 
117
- <br>
101
+ <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>
118
102
 
119
- **💡 Note:** To always import the latest version (not recommended in production!) remove the `@2.3.2` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/generate-pw/dist/generate-pw.min.js`
103
+ <hr>
120
104
 
121
- <br>
122
-
123
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
105
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
124
106
 
125
107
  ## 📋 API usage
126
108
 
@@ -259,7 +241,7 @@ Name | Type | Description
259
241
 
260
242
  <br>
261
243
 
262
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
244
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
263
245
 
264
246
  ## 💻 Command line usage
265
247
 
@@ -269,7 +251,7 @@ Name | Type | Description
269
251
  $ generate-pw
270
252
  ```
271
253
 
272
- <img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d3424a/generate-pw/assets/images/screenshots/cli/generate-pw-cmd-output.png">
254
+ <img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-pw/assets/images/screenshots/cli/generate-pw-cmd-output.png">
273
255
 
274
256
  #
275
257
 
@@ -336,7 +318,7 @@ export default {
336
318
 
337
319
  <br>
338
320
 
339
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
321
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
340
322
 
341
323
  ## 🏛️ MIT License
342
324
 
@@ -350,11 +332,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
350
332
 
351
333
  <br>
352
334
 
353
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
335
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
354
336
 
355
337
  ## 🛠️ Related utilities
356
338
 
357
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@5c34563/generate-ip/assets/images/icons/node-graph/white/icon55x49.png"><img height=21 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@5c34563/generate-ip/assets/images/icons/node-graph/black/icon55x49.png"></picture> [generate-ip](https://github.com/adamlui/js-utils/tree/main/generate-ip/#readme) &nbsp;<a href="https://github.com/toolleeo/cli-apps/#networking"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/badges/awesome/badge.svg"></a>
339
+ ### <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 height=21 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/icons/node-graph/black/icon55x49.png"></picture> [generate-ip](https://github.com/adamlui/js-utils/tree/main/generate-ip/#readme) &nbsp;<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>
358
340
 
359
341
  > Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
360
342
  <br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-installation) /
@@ -363,7 +345,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
363
345
  [CLI usage](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-command-line-usage) /
364
346
  [Discuss](https://github.com/adamlui/js-utils/discussions)
365
347
 
366
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d3424a/geolocate/assets/images/icons/wire-globe/white/icon32.png"><img height=22 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d3424a/geolocate/assets/images/icons/wire-globe/black/icon32.png"></picture> [geolocate](https://github.com/adamlui/js-utils/tree/main/geolocate/#readme) &nbsp;<a href="https://github.com/toolleeo/cli-apps/#networking"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/badges/awesome/badge.svg"></a>
348
+ ### <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) &nbsp;<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>
367
349
 
368
350
  > Fetch IP geolocation data from the CLI.
369
351
  <br>[Install](https://github.com/adamlui/js-utils/tree/main/geolocate/docs/#-installation) /
@@ -374,10 +356,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
374
356
 
375
357
  <br>
376
358
 
377
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
359
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
378
360
 
379
- <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/home/white/icon32x27.png"><img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/home/dark-gray/icon32x27.png"></picture> <a href="https://github.com/adamlui/js-utils/#readme">**More JavaScript utilities**</a> /
361
+ [<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]
362
+ [**More JavaScript utilities**][js-utils] /
380
363
  <a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
381
364
  <a href="https://github.com/adamlui/js-utils/issues">Report bug</a> /
382
365
  <a href="mailto:security@tidelift.com">Report vulnerability</a> /
383
366
  <a href="#top">Back to top ↑</a>
367
+
368
+ [js-utils]: https://github.com/adamlui/js-utils/#readme
@@ -65,15 +65,8 @@ module.exports = {
65
65
  require(`../../${ env.modes.dev ? '../_locales/en' : 'data' }/messages.json`))
66
66
 
67
67
  if (!langCode.startsWith('en')) { // fetch non-English msgs from jsDelivr
68
- try { // check if terminal supports non-Latin scripts
69
- const nonLatinLocales = await (await data.fetch(
70
- `${cli.urls.jsdelivr}@${cli.commitHashes.data}/assets/data/non-latin-locales.json`
71
- )).json()
72
- if (nonLatinLocales.includes(langCode.split('-')[0]) && !env.supports.unicode)
73
- return msgs // en ones
74
- } catch (err) {
75
- log.debug(`Failed to fetch non-Latin locales: ${err}`)
76
- }
68
+ if (require('non-latin-locales').includes(langCode.split('_')[0]) && !env.supports.unicode)
69
+ return msgs // EN ones
77
70
  const msgBaseURL = `${require('./jsdelivr').getCommitURL(cli.commitHashes.locales)}/_locales`
78
71
  let msgURL = `${msgBaseURL}/${langCode}/messages.json`, msgFetchesTried = 0
79
72
  while (msgFetchesTried < 3)
@@ -13,7 +13,6 @@
13
13
  "src": "https://github.com/adamlui/js-utils/tree/main/generate-pw/src"
14
14
  },
15
15
  "commitHashes": {
16
- "data": "e7b36d1",
17
16
  "locales": "b93ea3a"
18
17
  }
19
18
  }
package/docs/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  <div align="right">
4
4
  <h6>
5
5
  <picture>
6
- <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@f2dc346/assets/images/icons/earth/white/icon32.svg">
7
- <img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@f2dc346/assets/images/icons/earth/black/icon32.svg">
6
+ <source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/icons/earth/white/icon32.svg">
7
+ <img height=14 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/icons/earth/black/icon32.svg">
8
8
  </picture>
9
9
  &nbsp;English |
10
10
  <a href="https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/zh-cn/#readme">简体中文</a> |
@@ -21,22 +21,22 @@
21
21
 
22
22
  ### Randomly generate, strengthen, and validate cryptographically-secure passwords.
23
23
 
24
- <a href="https://npmstar.com/compare/generate-pw">
24
+ <a href="https://npm-compare.com/generate-pw/#timeRange=ALL">
25
25
  <img height=31 src="https://img.shields.io/npm/dm/generate-pw?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
- <a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-2.3.2">
27
- <img height=31 src="https://img.shields.io/badge/Latest_Build-2.3.2-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
26
+ <a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-2.3.4">
27
+ <img height=31 src="https://img.shields.io/badge/Latest_Build-2.3.4-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
28
28
  <a href="#%EF%B8%8F-mit-license">
29
29
  <img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
30
30
  <a href="https://www.npmjs.com/package/generate-pw?activeTab=code">
31
31
  <img height=31 src="https://img.shields.io/npm/unpacked-size/generate-pw?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
32
32
  <a href="https://sonarcloud.io/component_measures?metric=vulnerabilities&selected=adamlui_js-utils%3Agenerate-pw&id=adamlui_js-utils">
33
- <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-pw%2Fsrc%2Fgenerate-pw.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
33
+ <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-pw%2Fsrc%2Fgenerate-pw.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=ffef00"></a>
34
34
  <a href="https://github.com/toolleeo/cli-apps/#password-managers">
35
35
  <img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
36
36
 
37
37
  <br>
38
38
 
39
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
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
  ## 💡 About
42
42
 
@@ -47,7 +47,7 @@
47
47
  - **Multi-environment support —** Use in Node.js or the web browser
48
48
  - **Command line usable —** Just type `generate-pw`, that's it
49
49
 
50
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
50
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
51
51
 
52
52
  ## ⚡ Installation
53
53
 
@@ -63,64 +63,46 @@ As a **runtime dependency**, from your project root:
63
63
  $ npm install generate-pw
64
64
  ```
65
65
 
66
- <br>
67
-
68
- <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>
69
-
70
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
66
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
71
67
 
72
68
  ## 🔌 Importing the API
73
69
 
74
- ### <img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/node.js/icon25x28.png"> Node.js
75
-
76
- #### ECMAScript*:
70
+ #### <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):
77
71
 
78
72
  ```js
79
73
  import pw from 'generate-pw'
80
74
  ```
81
75
 
82
- #### CommonJS:
76
+ #### <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):
83
77
 
84
78
  ```js
85
79
  const pw = require('generate-pw')
86
80
  ```
87
81
 
88
- ###### _*Node.js version 14 or higher required_
82
+ #### [<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:
89
83
 
90
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/web/light/icon25.png"><img width=16 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/web/dark/icon25.png"></picture> Web
91
-
92
- #### <> HTML script tag:
84
+ [web-usage]: #-web
93
85
 
94
86
  ```html
95
- <script src="https://cdn.jsdelivr.net/npm/generate-pw@2.3.2/dist/generate-pw.min.js"></script>
87
+ <script src="https://cdn.jsdelivr.net/npm/generate-pw@2/dist/generate-pw.min.js"></script>
96
88
  ```
97
89
 
98
- #### ES6:
99
-
100
- ```js
101
- (async () => {
102
- await import('https://cdn.jsdelivr.net/npm/generate-pw@2.3.2/dist/generate-pw.min.js')
103
- // Your code here...
104
- })()
105
- ```
90
+ #### [<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:
106
91
 
107
- ### <img height=17 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/tampermonkey/icon28.png"><img height=17.5 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/violentmonkey/icon25.png"> Greasemonkey
92
+ [greasemonkey-usage]: #-greasemonkey-1
108
93
 
109
94
  ```js
110
95
  ...
111
- // @require https://cdn.jsdelivr.net/npm/generate-pw@2.3.2/dist/generate-pw.min.js
96
+ // @require https://cdn.jsdelivr.net/npm/generate-pw@2/dist/generate-pw.min.js
112
97
  // ==/UserScript==
113
-
114
- // Your code here...
98
+ ...
115
99
  ```
116
100
 
117
- <br>
101
+ <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>
118
102
 
119
- **💡 Note:** To always import the latest version (not recommended in production!) remove the `@2.3.2` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/generate-pw/dist/generate-pw.min.js`
103
+ <hr>
120
104
 
121
- <br>
122
-
123
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
105
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
124
106
 
125
107
  ## 📋 API usage
126
108
 
@@ -259,7 +241,7 @@ Name | Type | Description
259
241
 
260
242
  <br>
261
243
 
262
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
244
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
263
245
 
264
246
  ## 💻 Command line usage
265
247
 
@@ -269,7 +251,7 @@ Name | Type | Description
269
251
  $ generate-pw
270
252
  ```
271
253
 
272
- <img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d3424a/generate-pw/assets/images/screenshots/cli/generate-pw-cmd-output.png">
254
+ <img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-pw/assets/images/screenshots/cli/generate-pw-cmd-output.png">
273
255
 
274
256
  #
275
257
 
@@ -336,7 +318,7 @@ export default {
336
318
 
337
319
  <br>
338
320
 
339
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
321
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
340
322
 
341
323
  ## 🏛️ MIT License
342
324
 
@@ -350,11 +332,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
350
332
 
351
333
  <br>
352
334
 
353
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
335
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
354
336
 
355
337
  ## 🛠️ Related utilities
356
338
 
357
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@5c34563/generate-ip/assets/images/icons/node-graph/white/icon55x49.png"><img height=21 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@5c34563/generate-ip/assets/images/icons/node-graph/black/icon55x49.png"></picture> [generate-ip](https://github.com/adamlui/js-utils/tree/main/generate-ip/#readme) &nbsp;<a href="https://github.com/toolleeo/cli-apps/#networking"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/badges/awesome/badge.svg"></a>
339
+ ### <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 height=21 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/generate-ip/assets/images/icons/node-graph/black/icon55x49.png"></picture> [generate-ip](https://github.com/adamlui/js-utils/tree/main/generate-ip/#readme) &nbsp;<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>
358
340
 
359
341
  > Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
360
342
  <br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-installation) /
@@ -363,7 +345,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
363
345
  [CLI usage](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-command-line-usage) /
364
346
  [Discuss](https://github.com/adamlui/js-utils/discussions)
365
347
 
366
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d3424a/geolocate/assets/images/icons/wire-globe/white/icon32.png"><img height=22 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d3424a/geolocate/assets/images/icons/wire-globe/black/icon32.png"></picture> [geolocate](https://github.com/adamlui/js-utils/tree/main/geolocate/#readme) &nbsp;<a href="https://github.com/toolleeo/cli-apps/#networking"><img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/badges/awesome/badge.svg"></a>
348
+ ### <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) &nbsp;<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>
367
349
 
368
350
  > Fetch IP geolocation data from the CLI.
369
351
  <br>[Install](https://github.com/adamlui/js-utils/tree/main/geolocate/docs/#-installation) /
@@ -374,10 +356,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
374
356
 
375
357
  <br>
376
358
 
377
- <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
359
+ <img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
378
360
 
379
- <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/home/white/icon32x27.png"><img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/home/dark-gray/icon32x27.png"></picture> <a href="https://github.com/adamlui/js-utils/#readme">**More JavaScript utilities**</a> /
361
+ [<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]
362
+ [**More JavaScript utilities**][js-utils] /
380
363
  <a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
381
364
  <a href="https://github.com/adamlui/js-utils/issues">Report bug</a> /
382
365
  <a href="mailto:security@tidelift.com">Report vulnerability</a> /
383
366
  <a href="#top">Back to top ↑</a>
367
+
368
+ [js-utils]: https://github.com/adamlui/js-utils/#readme
package/docs/SECURITY.md CHANGED
@@ -15,6 +15,13 @@
15
15
  </h6>
16
16
  </div>
17
17
 
18
- # 🛡️ Security Policy
18
+ # 🛡️ Security policy
19
19
 
20
- If you find a vulnerability, please e-mail <security@tidelift.com> and a fix will be coordinated within 2 business days.
20
+ If you find a vulnerability, please e-mail <security@kudoai.com>.
21
+
22
+ <!-- FOOTER -->
23
+
24
+ <hr>
25
+
26
+ <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> /
27
+ <a href="mailto:security@kudoai.com">Report vulnerability</a>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generate-pw",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "Randomly generate, strengthen, and validate cryptographically-secure passwords.",
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.1",
81
+ "@adamlui/minify.js": "^2.5.3",
81
82
  "@eslint/json": "^1.2.0",
82
83
  "@eslint/markdown": "^8.0.1",
83
84
  "@stylistic/eslint-plugin": "^5.10.0",