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

@softwareseva/list

v1.6.0

Published

Paginated, searchable, sortable lists for Cloudflare D1 and React: two-way keyset cursors on (sort_value, id), allowlisted sort keys, escaped LIKE search, an offset variant, the shared list-query contract, and a token-styled DataTable with URL-backed dire

Readme

@softwareseva/list

Server-side lists on Cloudflare D1 with search, sort, and paging that stay fast at any table size, plus a React DataTable that renders them.

Install

pnpm add @softwareseva/list hono zod

What's inside

  • @softwareseva/list/server: listKeyset() runs a two-way keyset query ((sort_value, id) cursors, allowlisted sort columns); keyset() + finishPage() when you compose the SQL yourself; listOffset() for small admin lists that need a total.
  • @softwareseva/list/contracts: listQuerySchema(sortKeys) (zod) and the Page<T> / OffsetPage<T> shapes for clients.
  • @softwareseva/list/react: DataTable (sortable headers, skeleton loading, empty state, card layout on phones), useDirectory() keeping q/sort/direction/limit/cursor in the URL with any router, DirectoryToolbar, CursorPagination. Add @source "../node_modules/@softwareseva/list/dist/react"; to your CSS.
  • kashi_list (pub.dev, Flutter): KDataList for server-driven lists with the same keyset paging. See the kashi-ui-flutter skill.

Example

const query = listQuerySchema(["title", "updatedAt"], { defaultSort: "updatedAt", defaultDirection: "desc" }).parse(c.req.query());
const page = await listKeyset<NoteRow, "title" | "updatedAt">({
  db: c.env.DB,
  sql: `SELECT id, title, updated_at AS updatedAt FROM notes WHERE ${likeAny(["title"])}`,
  bindings: [likePattern(query.q)],
  sortColumns: { title: "title", updatedAt: "updated_at" },
  ...query,
});
return ok(c, page);

Indexing

Add a composite index per sort key so keyset paging stays fast: CREATE INDEX notes_updated_at_id ON notes(updated_at, id).

See also

d1-list-pagination (server) and react-data-table (React) skills.