Figure out node ip

This commit is contained in:
maciejhirsz
2018-07-06 19:12:24 +02:00
parent 538a30ccc3
commit 3259bc67a3
7 changed files with 53 additions and 11 deletions
+24
View File
@@ -0,0 +1,24 @@
declare module 'iplocation' {
namespace iplocation {
export interface LocationData {
as?: string;
city?: string;
country?: string;
countryCode?: string;
isp?: string;
lat: number;
lon: number;
org?: string;
query?: string;
region?: string;
regionName?: string;
status: string;
timezone?: string;
zip?: string;
}
}
function iplocation(ip: string, callback: (err: Error, result: iplocation.LocationData) => void): void;
export = iplocation;
}