@mr687/reqeust-info
v1.0.1
Published
get user info from request headers
Downloads
2
Readme
@mr687/reqeust-info
get user info from request IP
actually, if you curious about my miss-spelling package name, that is intentionally the name!
install
$ npm install @mr687/reqeust-info
usage
const requestInfo = require('@mr687/reqeust-info')
async function run() {
const ip = '8.8.8.8'
const info = await requestInfo(ip)
console.log(info)
}
run()
// it will returns
{
title: '8.8.8.8 Tracking Report',
info: {
ip_address: '8.8.8.8',
hostname: 'dns.google',
latitude: '37.751',
longtitude: '-97.822',
continent: 'North America',
continent_code: 'NA',
country: 'United States',
country_code: 'US',
region: 'Not Detected',
city: 'Not Detected',
organization: 'GOOGLE',
internet_service_provider: 'GOOGLE',
asn: 'AS15169 GOOGLE',
monetary_currency: 'United States Dollar($) (USD)',
dial_out_code: '+1',
language: 'English',
blacklist: 'Not Detected',
proxy: 'Detected',
gmt: '09',
sunrise_time: '06',
greenwich_mean_time_zone: '-18000',
timezone: 'America/North_Dakota/Center'
}
}
api
params
ip
: ip address