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

turnchunk

v0.4.1

Published

Chunking that understands who is speaking. Parse any transcript, chunk it without ever splitting a speaker turn. Zero dependencies.

Readme

turnchunk

Chunking that understands who is speaking. Parse any transcript, chunk it without ever splitting a speaker turn, and keep the speaker and timestamp on every chunk.

Zero dependencies. ESM + CJS + types. Runs on Node 18+, browsers, Deno, Bun and edge runtimes — there is no node:crypto, no filesystem access and no platform-specific code anywhere in it.

npm install turnchunk
import { parse, chunk } from "turnchunk";

const turns  = parse(vttText);       // format auto-detected from content
const chunks = chunk(turns, { target: 2000, overlap: 200 });

for (const c of chunks) {
  console.log(c.primarySpeaker, c.startMs, c.text.slice(0, 80));
}

Every chunk carries what you need to cite it:

c.id               // stable, content-addressed - usable as a vector-store key
c.speakers         // ["Dana Okafor"]
c.primarySpeaker   // "Dana Okafor"  (overlap excluded)
c.startMs          // 41600   -> jump a player to the moment it was said
c.turnStart        // 5       -> index back into the transcript
c.overlapIndices   // [0]     -> turns carried from the previous chunk

Reads WebVTT (Teams <v> spans, Zoom inline names, YouTube rolling captions), SubRip, six plain-text conventions, and JSON from Whisper/WhisperX, Deepgram, AssemblyAI, Rev.ai and Speechmatics.

parse() takes a string rather than a path, because the same build has to run where there is no filesystem. Read the file yourself and pass the contents.

This package is byte-for-byte identical to the Python package of the same name, verified in CI against a shared conformance corpus — including the chunk ids.

Full documentation: https://github.com/pavangupta352/turnchunk

MIT.