find-my-location
Version:
Find user location from their ip
21 lines (20 loc) • 471 B
TypeScript
export interface ILocation {
ip: string;
country_code: string;
country_name: string;
region_code: string;
region_name: string;
city: string;
zip_code: string;
time_zone: string;
latitude: number;
longitude: number;
metro_code: number;
}
/**
* Get user's location from their IP
* @param {string} ipv4
* @returns {ILocation} user's location
*/
declare function get(ip: string): Promise<ILocation | null>;
export default get;