New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

visitor-info

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

visitor-info

Gather information about user

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
252
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

visitor-info

Build Status

Tiny library that wraps other modules useful to gather information about a visitor in Javascript, such as browser, timezone, country, OS, etc...

It is useful in case you want to find fast information about the user without making requests to a third-party API service, but relying on the capabilities of the browser.

How to use

Add visitor-info as a dependency:

npm install visitor-info

Import it in your project as an ES6 module:

import visitorInfo from 'visitor-info'

console.log(visitorInfo())

/*
Result:
{
  browser: {...}
  country: {...}
  cpu: {...}
  device: {...}
  engine: {...}
  os: {...}
  ua: "..."
}
*/

or with require:

var visitorInfo = require('visitor-info')

console.log(visitorInfo())

/*
Result:
{
  browser: {...}
  country: {...}
  cpu: {...}
  device: {...}
  engine: {...}
  os: {...}
  ua: "..."
}
*/

Keywords

FAQs

Package last updated on 11 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc