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 🙏

© 2024 – Pkg Stats / Ryan Hefner

workai-fingerprintjs

v3.0.3

Published

Modern & flexible browser fingerprinting library

Downloads

2

Readme

Makes a website visitor identifier from a browser fingerprint. Unlike cookies and local storage, fingerprint stays the same in incognito/private mode and even when browser data is purged. Demo.

Quick start

Install from CDN

<script>
  function initFingerprintJS() {
    FingerprintJS.load().then(fp => {
      // The FingerprintJS agent is ready.
      // Get a visitor identifier when you'd like to.
      fp.get().then(result => {
        // This is the visitor identifier:
        const visitorId = result.visitorId;
        console.log(visitorId);
      });
    });
  }
</script>
<script
  async
  src="//cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.min.js"
  onload="initFingerprintJS()"
></script>

Alternatively you can install from NPM to use with Webpack/Rollup/Browserify

npm i @fingerprintjs/fingerprintjs
# or
yarn add @fingerprintjs/fingerprintjs
import FingerprintJS from '@fingerprintjs/fingerprintjs';

(async () => {
  // We recommend to call `load` at application startup.
  const fp = await FingerprintJS.load();

  // The FingerprintJS agent is ready.
  // Get a visitor identifier when you'd like to.
  const result = await fp.get();

  // This is the visitor identifier:
  const visitorId = result.visitorId;
  console.log(visitorId);
})();

📕 Full documentation

Upgrade to Pro version to get 99.5% identification accuracy

Pro result example:

{
  "requestId": "HFMlljrzKEiZmhUNDx7Z",
  "visitorId": "kHqPGWS1Mj18sZFsP8Wl",
  "visitorFound": true,
  "incognito": false,
  "bot": { "probability": 0.96 },
  "browserName": "Chrome",
  "browserVersion": "85.0.4183",
  "os": "Mac OS X",
  "osVersion": "10.15.6",
  "device": "Other",
  "ip": "192.65.67.131",
  "ipLocation": {
    "accuracyRadius": 100,
    "latitude": 37.409657,
    "longitude": -121.965467
    // ...
  }
}

🍿 Live demo

How to upgrade from Open Source to Pro in 30 seconds

📕 FingerprintJS Pro documentation

Open-source version reference

Installation

The library is shipped in various formats:

  • Global variable

    <script>
      function initFingerprintJS() {
        // Start loading FingerprintJS here
      }
    </script>
    <script
      async
      src="//cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.min.js"
      onload="initFingerprintJS()"
    ></script>
  • UMD

    require(
      ['//cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.umd.min.js'],
      (FingerprintJS) => {
        // Start loading FingerprintJS here
      }
    );
  • ECMAScript module

    # Install the package first:
    npm i @fingerprintjs/fingerprintjs
    # or
    yarn add @fingerprintjs/fingerprintjs
    import FingerprintJS from '@fingerprintjs/fingerprintjs';
    
    // Start loading FingerprintJS here
  • CommonJS

    # Install the package first:
    npm i @fingerprintjs/fingerprintjs
    # or
    yarn add @fingerprintjs/fingerprintjs
    const FingerprintJS = require('@fingerprintjs/fingerprintjs');
    
    // Start loading FingerprintJS here

API

  • FingerprintJS.load({ delayFallback?: number }): Promise<Agent>

    Builds an instance of Agent and waits a delay required for a proper operation. delayFallback is an optional parameter that sets duration (milliseconds) of the fallback for browsers that don't support requestIdleCallback; it has a good default value which we don't recommend to change.

  • agent.get({ debug?: boolean }): Promise<{ visitorId: string, components: {/* ... */} }>

    Gets the visitor identifier. debug: true prints debug messages to the console. visitorId is the visitor identifier. components is a dictionary of components that have formed the identifier; each value is an object like { value: any, duration: number } in case of success and { error: object, duration: number } in case of an unexpected error during getting the component.

  • FingerprintJS.hashComponents(components: object): string

    Converts a dictionary of components (described above) into a short hash string a.k.a. a visitor identifier. Designed for extending the library with your own components.

  • FingerprintJS.componentsToDebugString(components: object): string

    Converts a dictionary of components (described above) into human-friendly format.

Migrating from v2

Version policy

The OSS version doesn't guarantee the same visitor identifier between versions, but will try to keep them the same as much as possible. To get identifiers that remain stable up to 1 year, please consider upgrading to pro.

The documented JS API follows Semantic Versioning. Use undocumented features at your own risk.

Browser support

npx browserslist "cover 95% in us, not IE < 10"

See more details and learn how to run the library in old browsers in the documentation article.

Contributing

See the contributing guidelines to learn how to start a playground, test and build.