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

@authored/tracker

v1.0.0

Published

Privacy-preserving keystroke biometrics tracker for human verification

Readme

@authored/tracker

Privacy-preserving keystroke biometrics tracker for human verification.

Features

  • 🔒 Privacy-first: Captures ONLY timing data and key categories, never actual content
  • Real-time metrics: WPM, pause distribution, error patterns
  • 🎯 Biometric data: Dwell times, flight times, digraph/trigraph analysis
  • 📦 Zero dependencies: Lightweight (~10KB minified)
  • 🌐 Browser-based: Works with any text input or editor

Installation

npm install @authored/tracker

Quick Start

import { KeystrokeTracker } from '@authored/tracker';

const tracker = new KeystrokeTracker({
  // Called when events buffer is full or on interval
  onFlush: async (events) => {
    await fetch('/api/events', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(events)
    });
  },
  
  // Real-time metrics updates
  onMetricsUpdate: (metrics) => {
    console.log('WPM:', metrics.wpm);
    console.log('Backspace ratio:', metrics.backspaceRatio);
  },
  
  // Called when user stops typing
  onIdle: (metrics) => {
    console.log('User idle, final metrics:', metrics);
  }
});

// Start tracking on an element
const editor = document.getElementById('editor');
tracker.start(editor);

// When done
tracker.stop();

API

KeystrokeTracker

Constructor Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | bufferSize | number | 50 | Events to buffer before flush | | flushInterval | number | 5000 | Auto-flush interval in ms | | idleTimeout | number | 3000 | Idle detection timeout in ms | | onFlush | function | - | Callback when events are flushed | | onMetricsUpdate | function | - | Callback for real-time metrics | | onIdle | function | - | Callback when user becomes idle |

Methods

  • start(element: HTMLElement) - Start tracking on an element
  • stop() - Stop tracking and flush remaining events
  • reset() - Reset all tracking data
  • flush() - Manually flush buffered events
  • forceFlush() - Async flush with completion wait
  • getMetrics() - Get current metrics snapshot
  • getBiometricData() - Get complete biometric data for ML
  • isActive() - Check if tracker is running
  • getBufferSize() - Get current buffer size

Types

interface KeystrokeEvent {
  type: 'keydown' | 'keyup' | 'paste';
  timestamp: number;
  keyCategory: KeyCategory;
  flightTime?: number;
  dwellTime?: number;
  // ...
}

interface KeystrokeMetrics {
  totalKeystrokes: number;
  totalBackspaces: number;
  backspaceRatio: number;
  avgDwellTime: number;
  avgFlightTime: number;
  wpm: number;
  pauseDistribution: PauseBuckets;
  errorPatterns: ErrorPatterns;
}

Privacy

This library is designed with privacy as a core principle:

  • ✅ Captures timing (dwell time, flight time)
  • ✅ Captures key categories (letter, number, space, backspace)
  • ❌ Never captures actual characters typed
  • ❌ Never captures text content
  • ❌ Never stores or transmits readable text

License

MIT License - Copyright (c) 2024-2026 Authored Technologies S.r.l.

Links

  • Website: https://authored.tech
  • Documentation: https://docs.authored.tech