rbs-timezone
v1.1.0
Published
> Get ip info by user's ip or proxy. CommonJS support and ES Modules support.
Downloads
72
Readme
rbs-timezone
Get ip info by user's ip or proxy. CommonJS support and ES Modules support.
Installation
npm install rbs-timezone --save
Build
npm run build
Usage
// ES6
// import timezone from 'rbs-timezone';
const timezone = require('rbs-timezone');
// Get timezone by default
const opts = null;
// Get timezone with proxy params (timezone info of proxy)
const opts = {
proxy: 'http://ODuQc79d:[email protected]:16011'
// proxy: 'socks://d6OKt1FU:[email protected]:14104'
};
// Get timezone with ip params (timezone info of ip)
const opts = {
ip: '116.108.245.71'
};
const tz = await timezone(opts);
console.log(tz);
// Result: {
// ip: '2402:800:61b3:da9d:cc4d:a73a:df4e:187c',
// country: 'VN',
// stateProv: 'Hanoi',
// city: 'Hanoi',
// ll: [ 21.0292, 105.8526 ],
// timezone: 'Asia/Bangkok',
// languages: 'vi',
// accuracy: 100
// }
Release History
1.1.0 - 02/11/2024
- Updates:
- Get timezone with ip params.
- Testing.
1.0.5 - 11/06/2024
- Fix:
- Error stateProv read of undefined 0.
- Readme
1.0.4
Fix:
- Could not get the public IP address (using new list APIs for get ip address).
Updates:
- Testing.
1.0.3
1.0.2
1.0.1
1.0.0
- Get timezone