UNPKG
@athrva/get-ip
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
Get public IP from api.athrva.in
@athrva/get-ip
/
bin
/
get-ip.js
7 lines
(5 loc)
•
172 B
JavaScript
View Raw
1
2
3
4
5
6
7
#!/usr/bin/env node
import
ip
from
'../index.js'
;
// Top-level await works in ES modules in Node ≥ 14
const
ipAddress =
await
ip.
address
();
console
.
log
(ipAddress);