Socket
Book a DemoInstallSign in
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

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
195
31.76%
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

fingerprint

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.