
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
browser-user-data
Advanced tools
browser-user-data is a Javascript library that helps you collect common and not-so-common informations about your application user.
Data | Available |
---|---|
Hardware information | :heavy_check_mark: |
Platform information | :heavy_check_mark: |
Referrer | :heavy_check_mark: |
Geolocation | :heavy_check_mark: |
Connected social media | :heavy_check_mark: |
Geolocation without permission prompt | :construction: |
Automatic geocoding | :construction: |
Use the package manager npm to install browser-user-data.
npm i browser-user-data --save
Alternatively, you can also import directly into your html.
<script src="https://raw.githubusercontent.com/CaioRolla/browser-user-data/master/bundles/browser-user-data-1.0.7.js"></script>
If you are using browser-user-data with Typescript, you can import the package with the import sintax
import { extractData } from 'browser-user-data';
The usage will be the same no matter how you installed the package:
browserUserData
.extractData()
.then(data => console.log(data))
The above method will for permission to collect the user Geolocation. If you don't need, just pass the extractLocation atribute of the configuration object has false:
browserUserData
.extractData({
extractLocation: false
})
.then(data => console.log(data))
This is the complete output:
{
"connectedSocialMedias": [
"Google",
"Facebook",
"Twitter"
],
"location": {
"latitude": -59.86851,
"longitude": -144.17642
},
"referrer": "https://www.npmjs.com/package/browser-user-data",
"platform": {
"name": "Chrome",
"version": "84.0.4147.125",
"layout": "Blink",
"os": {
"architecture": 64,
"family": "Windows",
"version": "10"
},
"description": "Chrome 84.0.4147.125 on Windows 10 64-bit",
"product": null,
"manufacturer": null
},
"hardware": {
"vendor": "Google Inc.",
"renderer": "ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)",
"screenWidth": 2560,
"screenHeight": 1080,
"battery": {
"level": 1,
"charging": true
}
}
}
Caio Rolla |
caio.cesar.rolla@gmail.com |
You don't need state management if you use global variables. :bug: |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
Get all available informations about your application user.
The npm package browser-user-data receives a total of 22 weekly downloads. As such, browser-user-data popularity was classified as not popular.
We found that browser-user-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.