Wondering what’s next for npm?Check out our public roadmap! »

    simple-fingerprint

    1.1.1 • Public • Published

    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.

    Install

    npm i simple-fingerprint

    DownloadsWeekly Downloads

    3

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    588 kB

    Total Files

    24

    Last publish

    Collaborators

    • avatar