req-useragent
v2.0.1
Published
Receive request information from REST API and show client information
Downloads
90
Maintainers
Readme
req-userAgent
Receive request information from REST API and show client information
Install
$ npm i req-useragent
Example
import { GetClientInfo } from 'req-useragent';
app.use('/', async (req, res, next) => {
const userData = GetClientInfo(req);
console.log(userData);
});
/* console
{ ip: '127.0.0.1',
browser: 'Whale',
browserVersion: '2.9.115.16',
os: 'Mac OS X',
osVersion: '11_0_0' }
*/
Output Data
ip
: The client ipbrower
: The client browerbroweVersionr
: The client brower versionos
: The client ososVersion
: The client os version
TODO
- Other required information to be added