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

writetrack

v0.4.3

Published

Lightweight keystroke telemetry capture for web applications

Readme

WriteTrack

Detect AI-generated and pasted text through keystroke dynamics.

WriteTrack analyzes how text was entered, not what was written. Human typing has natural variation in timing, rhythm, and corrections. Pasted or AI-generated text arrives all at once with no behavioral fingerprint. WriteTrack captures the difference.

  • <8KB gzipped
  • 0 dependencies
  • <1ms per keystroke
  • 100% client-side

Installation

npm install writetrack

Quick Start

import { WriteTrack } from 'writetrack';

const responseField = document.getElementById('response-field')!;
const tracker = new WriteTrack(responseField);

tracker.start();

// User types...

// Collect captured data
const events = tracker.getRawEvents();
const pastes = tracker.getClipboardEvents();

tracker.stop();

Works with any text input, textarea, or contenteditable element. First-party integrations for React, Vue, TipTap, CKEditor 5, ProseMirror, and Quill. Output sinks for webhooks, Datadog, Segment, and OpenTelemetry. TypeScript definitions included.

What it captures

WriteTrack instruments your text inputs and records the behavioral signals behind every keystroke:

  • Timing intervals — milliseconds between each keystroke
  • Rhythm variance — consistency or erratic cadence
  • Correction patterns — backspaces, rewrites, hesitation
  • Clipboard events — paste, copy, cut with content and context
  • Selection events — text selections via mouse, keyboard, or programmatic

Use cases

Education — Flag essays that were pasted rather than composed. Give instructors behavioral context alongside content.

Research — Distinguish survey respondents who engaged thoughtfully from those who copy-pasted boilerplate.

Compliance — Add a behavioral layer to form submissions. Know when attestations were typed versus pasted.

API

Constructor

new WriteTrack(options: WriteTrackOptions | HTMLElement)

Methods

| Method | Returns | Description | | ---------------------- | ------------------ | ----------------------------- | | start() | void | Begin capturing events | | stop() | void | Stop capturing and clean up | | getRawEvents() | KeystrokeEvent[] | All captured keystroke events | | getClipboardEvents() | ClipboardEvent[] | Paste/copy/cut events | | getSelectionEvents() | SelectionEvent[] | Text selection events | | getUndoRedoEvents() | UndoRedoEvent[] | Undo/redo events | | getSessionDuration() | number | Session duration in ms | | getKeystrokeCount() | number | Total keystrokes captured | | getText() | string | Current text content |

Types

interface WriteTrackOptions {
  target: HTMLElement;
  license?: string; // Omit for development/demo mode
}

Full type definitions for KeystrokeEvent, ClipboardEvent, SelectionEvent, and UndoRedoEvent are included in the package.

Browser Support

| Browser | Version | | ------- | ------- | | Chrome | 62+ | | Firefox | 56+ | | Safari | 14.1+ | | Edge | 79+ |

All features including license verification work at these versions. License validation uses ECDSA P-256 via crypto.subtle, which has been supported since Chrome 37+, Firefox 34+, Safari 11+, and Edge 79+.

Privacy

WriteTrack runs entirely client-side. Keystroke data never leaves the browser. No servers, no tracking, no external requests.

License

See LICENSE for details.