@adamlui/geolocate 2.4.2 → 2.4.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 +31 -44
- package/dist/cli/lib/language.js +2 -9
- package/dist/data/package-data.json +1 -2
- package/docs/README.md +31 -44
- package/docs/SECURITY.md +9 -2
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<a id="top"></a>
|
|
2
2
|
|
|
3
|
-
# <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
3
|
+
# <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=28 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/icons/wire-globe/black/icon32.png"></picture> geolocate
|
|
4
4
|
|
|
5
5
|
### Fetch IP geolocation data from the CLI.
|
|
6
6
|
|
|
7
|
-
<a href="https://
|
|
7
|
+
<a href="https://npm-compare.com/@adamlui/geolocate/#timeRange=ALL">
|
|
8
8
|
<img height=31 src="https://img.shields.io/npm/dm/@adamlui/geolocate?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
9
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.4.
|
|
10
|
-
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.4.
|
|
9
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.4.4">
|
|
10
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.4.4-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
11
11
|
<a href="#%EF%B8%8F-mit-license">
|
|
12
12
|
<img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/@adamlui/geolocate?activeTab=code">
|
|
14
14
|
<img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fgeolocate?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
|
|
15
15
|
<a href="https://sonarcloud.io/component_measures?metric=vulnerabilities&selected=adamlui_js-utils%3Ageolocate&id=adamlui_js-utils">
|
|
16
|
-
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Ageolocate%2Fsrc%2Fgeolocate.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=
|
|
16
|
+
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Ageolocate%2Fsrc%2Fgeolocate.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=ffef00"></a>
|
|
17
17
|
<a href="https://github.com/toolleeo/cli-apps/#networking">
|
|
18
18
|
<img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
19
19
|
|
|
20
20
|
<br>
|
|
21
21
|
|
|
22
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
22
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
23
23
|
|
|
24
24
|
## ⚡ Installation
|
|
25
25
|
|
|
@@ -43,9 +43,9 @@ $ npm install @adamlui/geolocate
|
|
|
43
43
|
|
|
44
44
|
<br>
|
|
45
45
|
|
|
46
|
-
<a href="https://github.com/sponsors/adamlui"><img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
46
|
+
<a href="https://github.com/sponsors/adamlui"><img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/banners/sponsor/$10/banner1660x260.png"></a>
|
|
47
47
|
|
|
48
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
48
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
49
49
|
|
|
50
50
|
## 💻 Command line usage
|
|
51
51
|
|
|
@@ -57,7 +57,7 @@ $ geolocate [ip1] [ip2] [...]
|
|
|
57
57
|
|
|
58
58
|
Sample output:
|
|
59
59
|
|
|
60
|
-
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
60
|
+
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/screenshots/cli/geolocate-8.8.8.8-cmd-output.png">
|
|
61
61
|
|
|
62
62
|
**📝 Note:** If no IPv4 address is passed, your own one will be used.
|
|
63
63
|
|
|
@@ -97,62 +97,46 @@ export default {
|
|
|
97
97
|
|
|
98
98
|
<br>
|
|
99
99
|
|
|
100
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
100
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
101
101
|
|
|
102
102
|
## 🔌 Importing the API
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### <img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/node.js/icon25x28.png"> Node.js
|
|
107
|
-
|
|
108
|
-
#### ECMAScript*:
|
|
104
|
+
#### <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):
|
|
109
105
|
|
|
110
106
|
```js
|
|
111
107
|
import geo from '@adamlui/geolocate'
|
|
112
108
|
```
|
|
113
109
|
|
|
114
|
-
#### CommonJS:
|
|
110
|
+
#### <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):
|
|
115
111
|
|
|
116
112
|
```js
|
|
117
113
|
const geo = require('@adamlui/geolocate')
|
|
118
114
|
```
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
#### [<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:
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
#### <> HTML script tag:
|
|
118
|
+
[web-usage]: #-web
|
|
125
119
|
|
|
126
120
|
```html
|
|
127
|
-
<script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2
|
|
121
|
+
<script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2/dist/geolocate.min.js"></script>
|
|
128
122
|
```
|
|
129
123
|
|
|
130
|
-
####
|
|
131
|
-
|
|
132
|
-
```js
|
|
133
|
-
(async () => {
|
|
134
|
-
await import('https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.4.2/dist/geolocate.min.js')
|
|
135
|
-
// Your code here...
|
|
136
|
-
})()
|
|
137
|
-
```
|
|
124
|
+
#### [<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:
|
|
138
125
|
|
|
139
|
-
|
|
126
|
+
[greasemonkey-usage]: #-greasemonkey-1
|
|
140
127
|
|
|
141
128
|
```js
|
|
142
129
|
...
|
|
143
|
-
// @require
|
|
130
|
+
// @require https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2/dist/geolocate.min.js
|
|
144
131
|
// ==/UserScript==
|
|
145
|
-
|
|
146
|
-
// Your code here...
|
|
132
|
+
...
|
|
147
133
|
```
|
|
148
134
|
|
|
149
|
-
<br>
|
|
135
|
+
<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>
|
|
150
136
|
|
|
151
|
-
|
|
137
|
+
<hr>
|
|
152
138
|
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
|
|
139
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
156
140
|
|
|
157
141
|
## 📋 API usage
|
|
158
142
|
|
|
@@ -203,7 +187,7 @@ Name | Type | Description | Default Value
|
|
|
203
187
|
|
|
204
188
|
<br>
|
|
205
189
|
|
|
206
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
190
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
207
191
|
|
|
208
192
|
## 🏛️ MIT License
|
|
209
193
|
|
|
@@ -217,11 +201,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
217
201
|
|
|
218
202
|
<br>
|
|
219
203
|
|
|
220
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
204
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
221
205
|
|
|
222
206
|
## 🛠️ Related utilities
|
|
223
207
|
|
|
224
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
208
|
+
### <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) <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>
|
|
225
209
|
|
|
226
210
|
> Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
|
|
227
211
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-installation) /
|
|
@@ -230,7 +214,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
230
214
|
[CLI usage](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-command-line-usage) /
|
|
231
215
|
[Discuss](https://github.com/adamlui/js-utils/discussions)
|
|
232
216
|
|
|
233
|
-
### [🔒 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@
|
|
217
|
+
### [🔒 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>
|
|
234
218
|
|
|
235
219
|
> Randomly generate, strengthen, and validate cryptographically-secure passwords.
|
|
236
220
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/#-installation) /
|
|
@@ -241,10 +225,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
241
225
|
|
|
242
226
|
<br>
|
|
243
227
|
|
|
244
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
228
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
245
229
|
|
|
246
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
230
|
+
[<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]
|
|
231
|
+
[**More JavaScript utilities**][js-utils] /
|
|
247
232
|
<a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
|
|
248
233
|
<a href="https://github.com/adamlui/js-utils/issues">Report bug</a> /
|
|
249
234
|
<a href="mailto:security@tidelift.com">Report vulnerability</a> /
|
|
250
235
|
<a href="#top">Back to top ↑</a>
|
|
236
|
+
|
|
237
|
+
[js-utils]: https://github.com/adamlui/js-utils/#readme
|
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)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"copyrightYear": "2024–2026",
|
|
6
6
|
"cmdFormat": "geolocate [ip1] [ip2] [...] [options|commands]",
|
|
7
7
|
"urls": {
|
|
8
|
-
"config": "https://github.com/adamlui/js-utils/blob/main/geolocate/geolocate
|
|
8
|
+
"config": "https://github.com/adamlui/js-utils/blob/main/geolocate/geolocate.config.mjs",
|
|
9
9
|
"docs": "https://github.com/adamlui/js-utils/tree/main/geolocate/docs",
|
|
10
10
|
"github": "https://github.com/adamlui/js-utils",
|
|
11
11
|
"jsdelivr": "https://cdn.jsdelivr.net/gh/adamlui/js-utils",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"src": "https://github.com/adamlui/js-utils/tree/main/geolocate/src"
|
|
14
14
|
},
|
|
15
15
|
"commitHashes": {
|
|
16
|
-
"data": "e7b36d1",
|
|
17
16
|
"locales": "b93ea3a"
|
|
18
17
|
}
|
|
19
18
|
}
|
package/docs/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<a id="top"></a>
|
|
2
2
|
|
|
3
|
-
# <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
3
|
+
# <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=28 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/icons/wire-globe/black/icon32.png"></picture> geolocate
|
|
4
4
|
|
|
5
5
|
### Fetch IP geolocation data from the CLI.
|
|
6
6
|
|
|
7
|
-
<a href="https://
|
|
7
|
+
<a href="https://npm-compare.com/@adamlui/geolocate/#timeRange=ALL">
|
|
8
8
|
<img height=31 src="https://img.shields.io/npm/dm/@adamlui/geolocate?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
9
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.4.
|
|
10
|
-
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.4.
|
|
9
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.4.4">
|
|
10
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-2.4.4-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
11
11
|
<a href="#%EF%B8%8F-mit-license">
|
|
12
12
|
<img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/@adamlui/geolocate?activeTab=code">
|
|
14
14
|
<img height=31 src="https://img.shields.io/npm/unpacked-size/%40adamlui%2Fgeolocate?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
|
|
15
15
|
<a href="https://sonarcloud.io/component_measures?metric=vulnerabilities&selected=adamlui_js-utils%3Ageolocate&id=adamlui_js-utils">
|
|
16
|
-
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Ageolocate%2Fsrc%2Fgeolocate.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=
|
|
16
|
+
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Ageolocate%2Fsrc%2Fgeolocate.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=ffef00"></a>
|
|
17
17
|
<a href="https://github.com/toolleeo/cli-apps/#networking">
|
|
18
18
|
<img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-ff69b4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
19
19
|
|
|
20
20
|
<br>
|
|
21
21
|
|
|
22
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
22
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
23
23
|
|
|
24
24
|
## ⚡ Installation
|
|
25
25
|
|
|
@@ -43,9 +43,9 @@ $ npm install @adamlui/geolocate
|
|
|
43
43
|
|
|
44
44
|
<br>
|
|
45
45
|
|
|
46
|
-
<a href="https://github.com/sponsors/adamlui"><img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
46
|
+
<a href="https://github.com/sponsors/adamlui"><img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/banners/sponsor/$10/banner1660x260.png"></a>
|
|
47
47
|
|
|
48
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
48
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
49
49
|
|
|
50
50
|
## 💻 Command line usage
|
|
51
51
|
|
|
@@ -57,7 +57,7 @@ $ geolocate [ip1] [ip2] [...]
|
|
|
57
57
|
|
|
58
58
|
Sample output:
|
|
59
59
|
|
|
60
|
-
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
60
|
+
<img src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/geolocate/assets/images/screenshots/cli/geolocate-8.8.8.8-cmd-output.png">
|
|
61
61
|
|
|
62
62
|
**📝 Note:** If no IPv4 address is passed, your own one will be used.
|
|
63
63
|
|
|
@@ -97,62 +97,46 @@ export default {
|
|
|
97
97
|
|
|
98
98
|
<br>
|
|
99
99
|
|
|
100
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
100
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
101
101
|
|
|
102
102
|
## 🔌 Importing the API
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### <img height=18 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/icons/platforms/node.js/icon25x28.png"> Node.js
|
|
107
|
-
|
|
108
|
-
#### ECMAScript*:
|
|
104
|
+
#### <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):
|
|
109
105
|
|
|
110
106
|
```js
|
|
111
107
|
import geo from '@adamlui/geolocate'
|
|
112
108
|
```
|
|
113
109
|
|
|
114
|
-
#### CommonJS:
|
|
110
|
+
#### <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):
|
|
115
111
|
|
|
116
112
|
```js
|
|
117
113
|
const geo = require('@adamlui/geolocate')
|
|
118
114
|
```
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
#### [<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:
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
#### <> HTML script tag:
|
|
118
|
+
[web-usage]: #-web
|
|
125
119
|
|
|
126
120
|
```html
|
|
127
|
-
<script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2
|
|
121
|
+
<script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2/dist/geolocate.min.js"></script>
|
|
128
122
|
```
|
|
129
123
|
|
|
130
|
-
####
|
|
131
|
-
|
|
132
|
-
```js
|
|
133
|
-
(async () => {
|
|
134
|
-
await import('https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.4.2/dist/geolocate.min.js')
|
|
135
|
-
// Your code here...
|
|
136
|
-
})()
|
|
137
|
-
```
|
|
124
|
+
#### [<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:
|
|
138
125
|
|
|
139
|
-
|
|
126
|
+
[greasemonkey-usage]: #-greasemonkey-1
|
|
140
127
|
|
|
141
128
|
```js
|
|
142
129
|
...
|
|
143
|
-
// @require
|
|
130
|
+
// @require https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2/dist/geolocate.min.js
|
|
144
131
|
// ==/UserScript==
|
|
145
|
-
|
|
146
|
-
// Your code here...
|
|
132
|
+
...
|
|
147
133
|
```
|
|
148
134
|
|
|
149
|
-
<br>
|
|
135
|
+
<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>
|
|
150
136
|
|
|
151
|
-
|
|
137
|
+
<hr>
|
|
152
138
|
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@0d36e26/assets/images/separators/aqua-gradient.png">
|
|
139
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
156
140
|
|
|
157
141
|
## 📋 API usage
|
|
158
142
|
|
|
@@ -203,7 +187,7 @@ Name | Type | Description | Default Value
|
|
|
203
187
|
|
|
204
188
|
<br>
|
|
205
189
|
|
|
206
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
190
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
207
191
|
|
|
208
192
|
## 🏛️ MIT License
|
|
209
193
|
|
|
@@ -217,11 +201,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
217
201
|
|
|
218
202
|
<br>
|
|
219
203
|
|
|
220
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
204
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
221
205
|
|
|
222
206
|
## 🛠️ Related utilities
|
|
223
207
|
|
|
224
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
208
|
+
### <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) <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>
|
|
225
209
|
|
|
226
210
|
> Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
|
|
227
211
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-installation) /
|
|
@@ -230,7 +214,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
230
214
|
[CLI usage](https://github.com/adamlui/js-utils/tree/main/generate-ip/docs/#-command-line-usage) /
|
|
231
215
|
[Discuss](https://github.com/adamlui/js-utils/discussions)
|
|
232
216
|
|
|
233
|
-
### [🔒 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@
|
|
217
|
+
### [🔒 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>
|
|
234
218
|
|
|
235
219
|
> Randomly generate, strengthen, and validate cryptographically-secure passwords.
|
|
236
220
|
<br>[Install](https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/#-installation) /
|
|
@@ -241,10 +225,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
241
225
|
|
|
242
226
|
<br>
|
|
243
227
|
|
|
244
|
-
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
228
|
+
<img height=6px width="100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@6b0d399/assets/images/separators/aqua-gradient.png">
|
|
245
229
|
|
|
246
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@
|
|
230
|
+
[<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]
|
|
231
|
+
[**More JavaScript utilities**][js-utils] /
|
|
247
232
|
<a href="https://github.com/adamlui/js-utils/discussions">Discuss</a> /
|
|
248
233
|
<a href="https://github.com/adamlui/js-utils/issues">Report bug</a> /
|
|
249
234
|
<a href="mailto:security@tidelift.com">Report vulnerability</a> /
|
|
250
235
|
<a href="#top">Back to top ↑</a>
|
|
236
|
+
|
|
237
|
+
[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": "@adamlui/geolocate",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "Fetch IP geolocation data from the CLI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Lui",
|
|
@@ -69,10 +69,11 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"console-table-printer": "^2.15.0",
|
|
71
71
|
"is-unicode-supported": "^2.1.0",
|
|
72
|
-
"node-clipboardy": "^1.0.3"
|
|
72
|
+
"node-clipboardy": "^1.0.3",
|
|
73
|
+
"non-latin-locales": "^1.0.1"
|
|
73
74
|
},
|
|
74
75
|
"devDependencies": {
|
|
75
|
-
"@adamlui/minify.js": "^2.5.
|
|
76
|
+
"@adamlui/minify.js": "^2.5.3",
|
|
76
77
|
"@eslint/json": "^1.2.0",
|
|
77
78
|
"@eslint/markdown": "^8.0.1",
|
|
78
79
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
@@ -80,6 +81,6 @@
|
|
|
80
81
|
"eslint": "^9.39.4",
|
|
81
82
|
"eslint-plugin-import": "^2.32.0",
|
|
82
83
|
"eslint-plugin-regexp": "^3.1.0",
|
|
83
|
-
"generate-ip": "^2.9.
|
|
84
|
+
"generate-ip": "^2.9.3"
|
|
84
85
|
}
|
|
85
86
|
}
|