@adamlui/geolocate 2.0.8 → 2.0.9

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
@@ -4,10 +4,11 @@
4
4
 
5
5
  <a href="https://www.npmjs.com/package/@adamlui/geolocate"><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>
6
6
  <a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
7
- <a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.0.8"><img height=31 src="https://img.shields.io/badge/Latest_Build-2.0.8-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
7
+ <a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.0.9"><img height=31 src="https://img.shields.io/badge/Latest_Build-2.0.9-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
8
8
  <a href="https://www.npmjs.com/package/@adamlui/geolocate?activeTab=code"><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>
9
- <a href="https://github.com/adamlui/js-utils/blob/geolocate-2.0.8/geolocate/dist/geolocate.min.js"><img height=31 src="https://img.shields.io/github/size/adamlui/js-utils/geolocate/dist/geolocate.min.js?branch=geolocate-2.0.8&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
9
+ <a href="https://github.com/adamlui/js-utils/blob/geolocate-2.0.9/geolocate/dist/geolocate.min.js"><img height=31 src="https://img.shields.io/github/size/adamlui/js-utils/geolocate/dist/geolocate.min.js?branch=geolocate-2.0.9&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
10
10
  <a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_js-utils:geolocate/src/geolocate.js"><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=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
11
+ <a href="https://github.com/toolleeo/cli-apps#networking"><img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-c4a2bd?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
11
12
 
12
13
  <br>
13
14
 
@@ -35,6 +36,8 @@ $ npm install @adamlui/geolocate
35
36
 
36
37
  <br>
37
38
 
39
+ <a href="https://github.com/sponsors/adamlui"><img src="https://media.js-utils.com/images/banners/sponsor/$10/banner1660x260.png?09f5d64"></a>
40
+
38
41
  <img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
39
42
 
40
43
  ## 💻 Command line usage
@@ -75,7 +78,7 @@ You can also import **geolocate** into your app to use its main API method.
75
78
  #### ECMAScript*:
76
79
 
77
80
  ```js
78
- import * as geo from '@adamlui/geolocate';
81
+ import geo from '@adamlui/geolocate';
79
82
  ```
80
83
 
81
84
  #### CommonJS:
@@ -91,14 +94,14 @@ const geo = require('@adamlui/geolocate');
91
94
  #### <> HTML script tag:
92
95
 
93
96
  ```html
94
- <script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.8/dist/geolocate.min.js"></script>
97
+ <script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.9/dist/geolocate.min.js"></script>
95
98
  ```
96
99
 
97
100
  #### ES6:
98
101
 
99
102
  ```js
100
103
  (async () => {
101
- await import('https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.8/dist/geolocate.min.js');
104
+ await import('https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.9/dist/geolocate.min.js');
102
105
  // Your code here...
103
106
  })();
104
107
  ```
@@ -107,7 +110,7 @@ const geo = require('@adamlui/geolocate');
107
110
 
108
111
  ```js
109
112
  ...
110
- // @require https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.8/dist/geolocate.min.js
113
+ // @require https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.9/dist/geolocate.min.js
111
114
  // ==/UserScript==
112
115
 
113
116
  // Your code here...
@@ -115,7 +118,7 @@ const geo = require('@adamlui/geolocate');
115
118
 
116
119
  <br>
117
120
 
118
- **📝 Note:** To always import the latest version (not recommended in production!) remove the `@2.0.8` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/@adamlui/geolocate/dist/geolocate.min.js`
121
+ **📝 Note:** To always import the latest version (not recommended in production!) remove the `@2.0.9` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/@adamlui/geolocate/dist/geolocate.min.js`
119
122
 
120
123
  <br>
121
124
 
@@ -188,7 +191,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
188
191
 
189
192
  ## 🛠️ Related utilities
190
193
 
191
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.generate-ip.org/images/icons/node-graph/white/icon55x49.png?b4eb06e"><img height=21 src="https://media.generate-ip.org/images/icons/node-graph/black/icon55x49.png?b4eb06e"></picture> [generate-ip](https://js-utils.com/generate-ip) <a href="https://github.com/toolleeo/cli-apps#networking"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
194
+ ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.generate-ip.org/images/icons/node-graph/white/icon55x49.png?b4eb06e"><img height=21 src="https://media.generate-ip.org/images/icons/node-graph/black/icon55x49.png?b4eb06e"></picture> [generate-ip](https://js-utils.com/generate-ip) &nbsp;<a href="https://github.com/toolleeo/cli-apps#networking"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
192
195
 
193
196
  > Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
194
197
  <br>[Install](https://docs.generate-ip.org/#-installation) /
@@ -197,7 +200,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
197
200
  [CLI usage](https://docs.generate-ip.org/#-command-line-usage) /
198
201
  [Discuss](https://github.js-utils.com/discussions)
199
202
 
200
- ### [🔒 generate-pw](../generate-pw) <a href="https://github.com/toolleeo/cli-apps#password-managers"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
203
+ ### [🔒 generate-pw](../generate-pw) &nbsp;<a href="https://github.com/toolleeo/cli-apps#password-managers"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
201
204
 
202
205
  > Randomly generate, strengthen, and validate cryptographically-secure passwords.
203
206
  <br>[Install](https://docs.generatepw.org/#-installation) /
package/dist/cli.min.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Source: https://code.geolocatejs.org
5
5
  * Documentation: https://docs.geolocatejs.org
6
6
  */
7
- const pkgName="@adamlui/geolocate",copyright="© 2024 Adam Lui under the MIT license.",cmdFormat="geolocate [ip1] [ip2] [...] [options|commands]",srcURL="https://code.geolocatejs.org",docURL="https://docs.geolocatejs.org/#-command-line-usage";(async()=>{const e=require(__dirname.match(/src/)?"./geolocate":"./geolocate.min"),n=require("fs"),s=require("path"),i=require("child_process")["execSync"],t="",r="";let p="en";if("win32"==process.platform)try{p=i("(Get-Culture).TwoLetterISOLanguageName",{shell:"powershell",encoding:"utf-8"}).trim()}catch(e){}else{var c=process.env;p=(c.LANG||c.LANGUAGE||c.LC_ALL||c.LC_MESSAGES||c.LC_NAME||"en").split(".")[0]}let a={};var o,c=new Promise((t,r)=>{const c="https://cdn.jsdelivr.net/gh/adamlui/js-utils@a5c8e2226bf51470166791e66238cb4e3ed0e2d8/geolocate/_locales/",e=(p?p.replace("-","_"):"en")+"/";let a=c+e+"messages.json",l=0;h(a).then(async function o(e){try{const n=await e.json(),s={};for(const i in n)"object"==typeof n[i]&&"message"in n[i]&&(s[i]=n[i].message);t(s)}catch(e){if(3==++l)return t({});h(a=p.includes("-")&&1==l?a.replace(/([^_]*)_[^/]*(\/.*)/,"$1$2"):c+"en/messages.json").then(o).catch(r)}}).catch(r)});try{a=await c}catch(e){}const l={},g={flags:{quietMode:/^--?q(?:uiet)?(?:-?mode)?$/},infoCmds:{help:/^--?h(?:elp)?$/,version:/^--?ve?r?s?i?o?n?$/}};if(process.argv.forEach(o=>{var e,n;o.startsWith("-")&&(e=Object.keys(g.flags).find(e=>g.flags[e].test(o)),n=Object.keys(g.infoCmds).find(e=>g.infoCmds[e].test(o)),e?l[e]=!0:n||(console.error(`
7
+ const pkgName="@adamlui/geolocate",copyright="© 2024 Adam Lui under the MIT license.",cmdFormat="geolocate [ip1] [ip2] [...] [options|commands]",srcURL="https://code.geolocatejs.org",docURL="https://docs.geolocatejs.org/#-command-line-usage";(async()=>{const e=require(__dirname.match(/src/)?"./geolocate":"./geolocate.min"),n=require("fs"),s=require("path"),i=require("child_process")["execSync"],t="",r="";let p="en";if("win32"==process.platform)try{p=i("(Get-Culture).TwoLetterISOLanguageName",{shell:"powershell",encoding:"utf-8"}).trim()}catch(e){}else{var c=process.env;p=(c.LANG||c.LANGUAGE||c.LC_ALL||c.LC_MESSAGES||c.LC_NAME||"en").split(".")[0]}let a={};var o,c=new Promise((t,r)=>{const c="https://cdn.jsdelivr.net/gh/adamlui/js-utils@3751d3acf7269b5e1e5ae414c7695cacd4eb8bbb/geolocate/_locales/",e=(p?p.replace("-","_"):"en")+"/";let a=c+e+"messages.json",l=0;h(a).then(async function o(e){try{const n=await e.json(),s={};for(const i in n)"object"==typeof n[i]&&"message"in n[i]&&(s[i]=n[i].message);t(s)}catch(e){if(3==++l)return t({});h(a=p.includes("-")&&1==l?a.replace(/([^_]*)_[^/]*(\/.*)/,"$1$2"):c+"en/messages.json").then(o).catch(r)}}).catch(r)});try{a=await c}catch(e){}const l={},g={flags:{quietMode:/^--?q(?:uiet)?(?:-?mode)?$/},infoCmds:{help:/^--?h(?:elp)?$/,version:/^--?ve?r?s?i?o?n?$/}};if(process.argv.forEach(o=>{var e,n;o.startsWith("-")&&(e=Object.keys(g.flags).find(e=>g.flags[e].test(o)),n=Object.keys(g.infoCmds).find(e=>g.infoCmds[e].test(o)),e?l[e]=!0:n||(console.error(`
8
8
  ${""+(a.prefix_error||"ERROR")}: `+`Arg [${o}] ${a.error_notRecognized||"not recognized"}.`),console.info(`
9
9
  ${""+(a.info_validArgs||"Valid arguments are below")}.`),u(["configOptions","infoCmds"]),process.exit(1)))}),process.argv.some(e=>g.infoCmds.help.test(e)))u();else if(process.argv.some(e=>g.infoCmds.version.test(e))){c=i(`npm view ${pkgName} version`).toString().trim()||"none";let e,o=process.cwd();for(;"/"!=o;){var m=s.join(o,"package.json");if(n.existsSync(m)){m=require(m);e=(m.dependencies?.[pkgName]||m.devDependencies?.[pkgName])?.match(/(\d+\.\d+\.\d+)/)[0]||"none";break}o=s.dirname(o)}console.info(`
10
10
  ${a.prefix_globalVer||"Global version"}: `+c),console.info(`${a.prefix_localVer||"Local version"}: `+e)}else{var f,d=[];for(const $ of process.argv.slice(2))$.startsWith("-")||(f=$.replace(/[[\]]/g,""),d.push(f));c=await e.locate(d,{verbose:!l.quietMode});c||process.exit(1),l.quietMode||1!=c.length||(console.info(`
@@ -3,4 +3,4 @@
3
3
  * Source: https://code.geolocatejs.org
4
4
  * Documentation: https://docs.geolocatejs.org
5
5
  */
6
- async function geolocate(e,n={}){var o={verbose:!0};(e=Array.isArray(e)?e:[e])[0]=e[0]||await fetch("https://ifconfig.me/ip").then(e=>e.text()).catch(()=>fetch("http://ip-api.com/json/").then(e=>e.json()).then(e=>e.query)).catch(async()=>{try{var e=require("child_process")["exec"],o=require("util")["promisify"],{stdout:t,stderr:r}=await o(e)("curl -s ifconfig.me");return r?console.error("geolocate() »",r):t.trim()}catch(e){console.error("geolocate() »",e)}});for(const t of e){n.verbose&&console.info(`geolocate() » Validating ${t}...`);let o;try{o=require("generate-ip").ipv4.validate}catch(e){await import("https://cdn.jsdelivr.net/npm/generate-ip/dist/generate-ip.min.js"),o=ipv4.validate}if(o&&!o(t,{verbose:!1}))return console.error(`geolocate() » ERROR: ${t} is not a valid IPv4 address.`)}if(validateOptions(n,o,"https://docs.geolocatejs.org/#locateips-options","geolocate('8.8.8.8', { verbose: false })")){n={...o,...n};try{var c=[];for(const i of e){n.verbose&&console.info(`geolocate() » Fetching geolocation data for ${i}...`);let{status:e,org:o,as:t,query:r,...a}=await(await fetchData("http://ip-api.com/json/"+i)).json();a={ip:i,...a},c.push(a)}return!n.verbose||"undefined"!=typeof require&&/cli(?:\.min)?\.js$/.test(require.main.filename)||console.info("geolocate() » Success! Check returned array."),c}catch(e){console.error("geolocate() » ERROR:",e.message)}}}function fetchData(r){return"undefined"==typeof fetch?new Promise((t,o)=>{try{var e=r.match(/^([^:]+):\/\//)[1];/^https?$/.test(e)||o(new Error("Invalid fetchData() URL.")),require(e).get(r,e=>{let o="";e.on("data",e=>o+=e),e.on("end",()=>t({json:()=>JSON.parse(o)}))}).on("error",e=>o(new Error(e.message)))}catch(e){o(new Error("Environment not supported."))}}):fetch(r)}function validateOptions(e,o,t,r){const a=JSON.stringify(o,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'").replace(/\n\s*/g," "),n=Object.keys(o).join(", "),c=Object.keys(o).filter(e=>"boolean"==typeof o[e]);let i="validateOptions() » ";try{i=validateOptions.caller?.name+"() » "}catch(e){}var s=r.split(",").findIndex(e=>e.trim().startsWith("{"))+1,l=(s+=["st","nd","rd"][s-1]||"th",()=>{console.info(`${i}Valid options: [ ${n} ]`),console.info(i+"If omitted, default settings are: "+a)}),f=()=>{console.info(i+"For more help, please visit "+t)};if("object"!=typeof e)return console.error(i+`ERROR: ${"0th"==s?"[O":s+" arg [o"}ptions] can only be an object of key/values.`),console.info(i+"Example valid call: "+r),l(),f(),!1;for(const p in e){if(!Object.prototype.hasOwnProperty.call(o,p))return console.error(`${i}ERROR: \`${p}\` is an invalid option.`),l(),f(),!1;if(c.includes(p)&&"boolean"!=typeof e[p])return console.error(`${i}ERROR: [${p}] option can only be \`true\` or \`false\`.`),f(),!1}return!0}const funcAliases={geolocate:["Geolocate","geoLocate","GeoLocate","locate","Locate"]};try{module.exports={geolocate:geolocate}}catch(e){}try{window.geo={geolocate:geolocate}}catch(e){}for(const _ in funcAliases){try{funcAliases[_].forEach(e=>module.exports[e]=module.exports[_])}catch(e){}try{funcAliases[_].forEach(e=>window.geo[e]=window.geo[_])}catch(e){}}
6
+ async function geolocate(e,n={}){var o={verbose:!0};(e=Array.isArray(e)?e:[e])[0]=e[0]||await fetch("https://ifconfig.me/ip").then(e=>e.text()).catch(()=>fetch("http://ip-api.com/json/").then(e=>e.json()).then(e=>e.query)).catch(async()=>{try{var e=require("child_process")["exec"],o=require("util")["promisify"],{stdout:t,stderr:r}=await o(e)("curl -s ifconfig.me");return r?console.error("geolocate() »",r):t.trim()}catch(e){console.error("geolocate() »",e)}});for(const t of e){n.verbose&&console.info(`geolocate() » Validating ${t}...`);let o;try{o=require("generate-ip").ipv4.validate}catch(e){await import("https://cdn.jsdelivr.net/npm/generate-ip/dist/generate-ip.min.js"),o=ipv4.validate}if(o&&!o(t,{verbose:!1}))return console.error(`geolocate() » ERROR: ${t} is not a valid IPv4 address.`)}if(validateOptions(n,o,"https://docs.geolocatejs.org/#locateips-options","geolocate('8.8.8.8', { verbose: false })")){n={...o,...n};try{var c=[];for(const i of e){n.verbose&&console.info(`geolocate() » Fetching geolocation data for ${i}...`);let{status:e,org:o,as:t,query:r,...a}=await(await fetchData("http://ip-api.com/json/"+i)).json();a={ip:i,...a},c.push(a)}return n.verbose&&"undefined"!=typeof window&&console.info("geolocate() » Success! Check returned array."),c}catch(e){console.error("geolocate() » ERROR:",e.message)}}}function fetchData(r){return"undefined"==typeof fetch?new Promise((t,o)=>{try{var e=r.match(/^([^:]+):\/\//)[1];/^https?$/.test(e)||o(new Error("Invalid fetchData() URL.")),require(e).get(r,e=>{let o="";e.on("data",e=>o+=e),e.on("end",()=>t({json:()=>JSON.parse(o)}))}).on("error",e=>o(new Error(e.message)))}catch(e){o(new Error("Environment not supported."))}}):fetch(r)}function validateOptions(e,o,t,r){const a=JSON.stringify(o,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'").replace(/\n\s*/g," "),n=Object.keys(o).join(", "),c=Object.keys(o).filter(e=>"boolean"==typeof o[e]);let i="validateOptions() » ";try{i=validateOptions.caller?.name+"() » "}catch(e){}var s=r.split(",").findIndex(e=>e.trim().startsWith("{"))+1,l=(s+=["st","nd","rd"][s-1]||"th",()=>{console.info(`${i}Valid options: [ ${n} ]`),console.info(i+"If omitted, default settings are: "+a)}),p=()=>{console.info(i+"For more help, please visit "+t)};if("object"!=typeof e)return console.error(i+`ERROR: ${"0th"==s?"[O":s+" arg [o"}ptions] can only be an object of key/values.`),console.info(i+"Example valid call: "+r),l(),p(),!1;for(const f in e){if(!Object.prototype.hasOwnProperty.call(o,f))return console.error(`${i}ERROR: \`${f}\` is an invalid option.`),l(),p(),!1;if(c.includes(f)&&"boolean"!=typeof e[f])return console.error(`${i}ERROR: [${f}] option can only be \`true\` or \`false\`.`),p(),!1}return!0}const geoAliases={geolocate:["Geolocate","geoLocate","GeoLocate","locate","Locate"]};try{module.exports={geolocate:geolocate}}catch(e){}try{window.geo={geolocate:geolocate}}catch(e){}for(const _ in geoAliases){try{geoAliases[_].forEach(e=>module.exports[e]=module.exports[_])}catch(e){}try{geoAliases[_].forEach(e=>window.geo[e]=window.geo[_])}catch(e){}}
package/docs/README.md CHANGED
@@ -4,10 +4,11 @@
4
4
 
5
5
  <a href="https://www.npmjs.com/package/@adamlui/geolocate"><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>
6
6
  <a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
7
- <a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.0.8"><img height=31 src="https://img.shields.io/badge/Latest_Build-2.0.8-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
7
+ <a href="https://github.com/adamlui/js-utils/releases/tag/geolocate-2.0.9"><img height=31 src="https://img.shields.io/badge/Latest_Build-2.0.9-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
8
8
  <a href="https://www.npmjs.com/package/@adamlui/geolocate?activeTab=code"><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>
9
- <a href="https://github.com/adamlui/js-utils/blob/geolocate-2.0.8/geolocate/dist/geolocate.min.js"><img height=31 src="https://img.shields.io/github/size/adamlui/js-utils/geolocate/dist/geolocate.min.js?branch=geolocate-2.0.8&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
9
+ <a href="https://github.com/adamlui/js-utils/blob/geolocate-2.0.9/geolocate/dist/geolocate.min.js"><img height=31 src="https://img.shields.io/github/size/adamlui/js-utils/geolocate/dist/geolocate.min.js?branch=geolocate-2.0.9&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
10
10
  <a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_js-utils:geolocate/src/geolocate.js"><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=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
11
+ <a href="https://github.com/toolleeo/cli-apps#networking"><img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-c4a2bd?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
11
12
 
12
13
  <br>
13
14
 
@@ -35,6 +36,8 @@ $ npm install @adamlui/geolocate
35
36
 
36
37
  <br>
37
38
 
39
+ <a href="https://github.com/sponsors/adamlui"><img src="https://media.js-utils.com/images/banners/sponsor/$10/banner1660x260.png?09f5d64"></a>
40
+
38
41
  <img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
39
42
 
40
43
  ## 💻 Command line usage
@@ -75,7 +78,7 @@ You can also import **geolocate** into your app to use its main API method.
75
78
  #### ECMAScript*:
76
79
 
77
80
  ```js
78
- import * as geo from '@adamlui/geolocate';
81
+ import geo from '@adamlui/geolocate';
79
82
  ```
80
83
 
81
84
  #### CommonJS:
@@ -91,14 +94,14 @@ const geo = require('@adamlui/geolocate');
91
94
  #### <> HTML script tag:
92
95
 
93
96
  ```html
94
- <script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.8/dist/geolocate.min.js"></script>
97
+ <script src="https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.9/dist/geolocate.min.js"></script>
95
98
  ```
96
99
 
97
100
  #### ES6:
98
101
 
99
102
  ```js
100
103
  (async () => {
101
- await import('https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.8/dist/geolocate.min.js');
104
+ await import('https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.9/dist/geolocate.min.js');
102
105
  // Your code here...
103
106
  })();
104
107
  ```
@@ -107,7 +110,7 @@ const geo = require('@adamlui/geolocate');
107
110
 
108
111
  ```js
109
112
  ...
110
- // @require https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.8/dist/geolocate.min.js
113
+ // @require https://cdn.jsdelivr.net/npm/@adamlui/geolocate@2.0.9/dist/geolocate.min.js
111
114
  // ==/UserScript==
112
115
 
113
116
  // Your code here...
@@ -115,7 +118,7 @@ const geo = require('@adamlui/geolocate');
115
118
 
116
119
  <br>
117
120
 
118
- **📝 Note:** To always import the latest version (not recommended in production!) remove the `@2.0.8` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/@adamlui/geolocate/dist/geolocate.min.js`
121
+ **📝 Note:** To always import the latest version (not recommended in production!) remove the `@2.0.9` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/@adamlui/geolocate/dist/geolocate.min.js`
119
122
 
120
123
  <br>
121
124
 
@@ -188,7 +191,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
188
191
 
189
192
  ## 🛠️ Related utilities
190
193
 
191
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.generate-ip.org/images/icons/node-graph/white/icon55x49.png?b4eb06e"><img height=21 src="https://media.generate-ip.org/images/icons/node-graph/black/icon55x49.png?b4eb06e"></picture> [generate-ip](https://js-utils.com/generate-ip) <a href="https://github.com/toolleeo/cli-apps#networking"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
194
+ ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.generate-ip.org/images/icons/node-graph/white/icon55x49.png?b4eb06e"><img height=21 src="https://media.generate-ip.org/images/icons/node-graph/black/icon55x49.png?b4eb06e"></picture> [generate-ip](https://js-utils.com/generate-ip) &nbsp;<a href="https://github.com/toolleeo/cli-apps#networking"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
192
195
 
193
196
  > Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
194
197
  <br>[Install](https://docs.generate-ip.org/#-installation) /
@@ -197,7 +200,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
197
200
  [CLI usage](https://docs.generate-ip.org/#-command-line-usage) /
198
201
  [Discuss](https://github.js-utils.com/discussions)
199
202
 
200
- ### [🔒 generate-pw](../generate-pw) <a href="https://github.com/toolleeo/cli-apps#password-managers"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
203
+ ### [🔒 generate-pw](../generate-pw) &nbsp;<a href="https://github.com/toolleeo/cli-apps#password-managers"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
201
204
 
202
205
  > Randomly generate, strengthen, and validate cryptographically-secure passwords.
203
206
  <br>[Install](https://docs.generatepw.org/#-installation) /
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamlui/geolocate",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "Fetch IP geolocation data from the CLI.",
5
5
  "author": {
6
6
  "name": "Adam Lui",
@@ -11,7 +11,6 @@
11
11
  "license": "MIT",
12
12
  "main": "dist/geolocate.min.js",
13
13
  "files": [
14
- "dist",
15
14
  "docs/"
16
15
  ],
17
16
  "bin": {
@@ -47,9 +46,9 @@
47
46
  "url": "https://github.com/adamlui/js-utils/issues"
48
47
  },
49
48
  "dependencies": {
50
- "generate-ip": "^2.3.0"
49
+ "generate-ip": "^2.4.2"
51
50
  },
52
51
  "devDependencies": {
53
- "@adamlui/minify.js": "^1.6.1"
52
+ "@adamlui/minify.js": "^1.8.0"
54
53
  }
55
54
  }