npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@quotientjs/browser-fingerprint

v0.1.3

Published

A lightweight, privacy-conscious browser fingerprinting library for identifying unique browsers.

Readme

@quotientjs/browser-fingerprint

A lightweight, privacy-conscious browser fingerprinting library for identifying unique browsers.

Features

  • Create unique browser fingerprints based on browser characteristics
  • High-entropy components for reliable identification
  • Handle fingerprint storage and tracking
  • Compare fingerprints for similarity
  • Configurable collection options
  • Supports both localStorage and sessionStorage

Installation

pnpm add @quotientjs/browser-fingerprint

Usage

import BrowserFingerprint from "@quotientjs/browser-fingerprint";

// Create a new fingerprinter
const fingerprinter = new BrowserFingerprint();

// Get the fingerprint (automatically saved to localStorage)
const fingerprint = fingerprinter.get();

console.log("Fingerprint hash:", fingerprint.hash);

Advanced Options

// More options
const fingerprinter = new BrowserFingerprint(
  {
    // Fingerprint options
    excludeComponents: ["canvas", "webgl"], // Exclude privacy-sensitive components
    includeAudio: true,
    includeCanvas: true,
    includeWebGL: true,
    includeFonts: true,
    detectScreenOrientation: true,
  },
  {
    // Storage options
    storageKey: "my_app_fingerprint",
    useSessionStorage: false, // Use localStorage by default
    maxFingerprints: 10,
    similarityThreshold: 0.85,
  },
);

Working with Fingerprints

// Get fingerprint without saving
const fingerprint = fingerprinter.get(false);

// Access all stored fingerprints
const allFingerprints = fingerprinter.getAll();

// Access the storage for more advanced operations
const storage = fingerprinter.getStorage();

// Find the most common fingerprint
const mostFrequent = storage.getMostFrequent();

// Find the most recent fingerprint
const mostRecent = storage.getMostRecent();

// Find a specific fingerprint by hash
const specificFingerprint = storage.findByHash(fingerprint.hash);

// Find a similar fingerprint
const similarFingerprint = storage.findSimilar(fingerprint);

// Clear all fingerprints
fingerprinter.clear();

API Reference

BrowserFingerprint

The main class for fingerprinting operations.

Methods

  • get(save = true): Gets or creates a fingerprint
  • getAll(): Returns all stored fingerprints
  • clear(): Clears all stored fingerprints
  • getStorage(): Returns the storage instance

FingerprintStorage

Handles storing and retrieving fingerprints.

Methods

  • getAll(): Returns all stored fingerprints
  • save(fingerprint, source): Saves a fingerprint
  • clear(): Clears all stored fingerprints
  • getMostRecent(): Gets the most recently seen fingerprint
  • getMostFrequent(): Gets the most frequently seen fingerprint
  • findByHash(hash): Finds a fingerprint by hash
  • findSimilar(fingerprint): Finds a similar fingerprint

Utility Functions

  • createFingerprint(options): Creates a new fingerprint
  • calculateSimilarity(fp1, fp2): Calculates similarity between fingerprints
  • isSameFingerprint(fp1, fp2, threshold): Determines if two fingerprints match

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build
pnpm build

License

Internal use only.