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

simple-fingerprint

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-fingerprint

Simple browser fingerprinting library

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41
increased by46.43%
Maintainers
1
Weekly downloads
 
Created
Source

simple-fingerprint

Simple browser fingerprinting library


Demo: https://pjanczyk.github.io/simple-fingerprint/

Installing

npm install simple-fingerprint
yarn add simple-fingerprint

Usage

Simple usage

Compute a stable browser fingerprint:

import { computeFingerprint } from "simple-fingerprint";

let fingerprint = await computeFingerprint();

computeFingerprint() returns an SHA1 hash of a fingerprint, e.g., "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12".

Advanced usage

Compute components of a fingerprint:

import { computeFingerprintComponents } from "simple-fingerprint";

let components = await computeFingerprintComponents();

computeFingerprintComponents() returns an object with the following properties:

{
  devicePixelRatio: number | null
  userAgent: string | null
  platform: string | null
  plugins: string | null
  headers: string | null
  dateFormat: string | null
  fonts: string | null
  batteryCharging: boolean | null
  batteryLevel: number | null
  canvas2dRender: string | null
  webglRenderer: string | null
  webglRender: string | null
}

Note that batteryCharging and batteryLevel are not stable and may change over time.

Keywords

FAQs

Package last updated on 14 Jun 2020

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