Get your public IP address Details in Deno.
Import the getAllDetails
function and use it:
import { getAllDetails } from "https://deno.land/x/ip_details/mod.ts";
const getDetails = async () => {
console.log(`Ip details are: `);
console.log(await getAllDetails())
}
getDetails();
Alternatively, you can use it directly from the CLI by using deno run
:
deno run --allow-net https://deno.land/x/ip_details/cli.ts
You can also install it globally using the following:
deno install --allow-net -n ip-details https://deno.land/x/ip_details/cli.ts
Then, the package is available to run:
ip_details
Required permissions:
--allow-net
-
Success
* IP Address * Country * Country Code * TimeZone * City * Service Provider * Zip Code * Continent * Starting of Week (Sunday / Monday) * Currency Code * Languages Spoken * Mobile Number Length * Calling Code
-
Fail
* Invalid Query, Try again !!.
Run tests:
deno test --allow-net
The ip_details
is open-sourced software licensed under the MIT license.