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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@2stars/verifai-web

v3.1.0

Published

Zero-knowledge device-trust SDK for browsers. Signal hashes + behavioral biometrics (mouse, keystroke, scroll) — pairs with the 2Stars VerifAI backend on api.2stars.io/verifai/v1.

Readme

@2stars/verifai-web

Zero-knowledge device trust for browser apps. Same surface as com.github.2stars-io:verifai-android — pairs with the same backend at https://api.2stars.io/verifai/v1.

import { VerifAI } from '@2stars/verifai-web';

VerifAI.init({ apiKey: 'hbs_live_…' });
VerifAI.attachPasswordField(document.getElementById('password'));

const r = await VerifAI.verify(userEmail);
switch (r.status) {
  case 'TRUSTED':    allow(); break;
  case 'NEW_DEVICE': showApprovalPending(r.sessionId); break;
  case 'REJECTED':   blockWith(r.reason); break;
  default:           retryOrError();
}

Install

npm install @2stars/verifai-web

Or via <script type="module"> if you prefer no bundler:

<script type="module">
  import { VerifAI } from 'https://unpkg.com/@2stars/verifai-web/src/index.js';
  VerifAI.init({ apiKey: 'hbs_live_…' });
</script>

Pure ESM. No build step. Works in every evergreen browser. Node ≥ 18 for the test harness.

What this SDK does

Three independent axes of trust, each opt-in by your API key's feature flags:

| Axis | Catches | Feature flag | |---|---|---| | Device fingerprint (11 signal categories — UA, locale, canvas, WebGL, audio, hardware, etc.) | Different browser / device | verifai-patterns + verifai-verification | | Behavioral biometrics (mouse velocity / curvature, click rhythm, cursor region, scroll velocity, keystroke flight time + bigram timing) | Wrong human on right browser | verifai-behavioral | | Server-side patterns | Re-registration cadence, multi-user device, long absence, impossible travel | always-on alongside verification |

Everything is hashed in the browser. The server only ever sees opaque SHA-256 fingerprints.

Full API surface

| Method | Purpose | |---|---| | init(opts) | One-time SDK init. opts = { apiKey, baseUrl?, timeoutMs? } | | register(userId) | First-ever login on this browser | | verify(userId) | Every subsequent login | | getTrustScore(userId) | Lookup current trust level + score | | listDevices(userId) | All trusted devices for the user | | removeDevice(deviceId) | Forget a device | | approveDevice(sessionId, approvedBy?) | Approve another device from this trusted one | | rejectDevice(sessionId, reason?) | Reject a pending session | | isSameNetwork(remoteIP) | Local IP comparison for proximity gates | | attachPasswordField(input) | Capture keystroke timing on a password field | | getBehavioralCapture() | Live counts of captured gestures (debug UI) |

Response shape (verify)

{
  status: 'TRUSTED' | 'NEW_DEVICE' | 'PENDING' | 'REJECTED' | 'FEATURE_DISABLED' | 'ERROR',
  trustScore: number,                         // 0-100 composite (3.2.0+ server)
  trustLevel: 'BASELINE' | 'MEDIUM' | 'HIGH' | 'VERY_HIGH',
  deviceId: string,
  sessionId: string | null,                   // present on NEW_DEVICE
  scoreBreakdown?: Record<string, number>,    // per-axis 0-100 (3.2.0+ server)
  behavioral?: BehavioralReport,
  patterns?: PatternsReport,
  strictMode?: StrictModeReport,
  advanced?: AdvancedReport,                  // 3.2.0+ server
  reason?: string,
  error?: string,
}

Versioning

Current: 3.1.0 — 11 signal categories, 6 mouse-behavioral categories + 3 keystroke categories. Mirror of the Android SDK's behavioral coverage adapted to web inputs.

Privacy

  • No raw signals leave the browser. Every signal is hashed locally with a per-device salt.
  • No tracking pixels. Calls go only to the API base you configure (default https://api.2stars.io/verifai/v1).
  • No third-party deps at runtime. Pure browser APIs.

Companion SDKs

License

MIT — see LICENSE.