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

shard-tsdb

v0.2.5

Published

Slid Phi Labs — pure-JS time-series database with Blackjack V2 compressed blocks. Memory + IndexedDB backends.

Downloads

974

Readme

shard-tsdb

npm License: MIT site

Pure-JS time-series database with Blackjack V2 compressed blocks — built for sensors, walks, and smooth deltas where generic stores waste space. Backends: in-memory (default) or IndexedDB (browser).

| | | |--|--| | npm | [email protected] | | site | slidphilabs.vercel.app | | license | MIT |


Why this exists

Time-series from sensors and game/telemetry counters often look like runs, ±1 walks, and smooth deltas. Storing them as raw floats or gzipped JSON is easy — and bulky. shard-tsdb packs points into Blackjack V2 blocks so you get a small pure-JS TSDB without native codecs or a server.

For record-class integer sequence ratios (zeros / ramps / walks), see sibling Zero Range Wave.


Install

npm i shard-tsdb

Node ≥ 18. Works in the browser with the IndexedDB backend.


Quick start

import { ShardTSDB } from "shard-tsdb";

const db = new ShardTSDB({ backend: "memory", blockSize: 256 });

const tags = { sensor: "temp-1" };
await db.put("room", tags, Date.now(), 21.5);
await db.putBatch(
  "room",
  tags,
  [1, 2, 3, 4, 5].map((i) => Date.now() + i * 1000),
  [21.5, 21.6, 21.6, 21.7, 21.5],
);
await db.flushAll();

const { tss, vals } = await db.range("room", tags, 0, Date.now() + 1e12);
const last = await db.last("room", tags, 10);
const st = await db.stats("room", tags);
// { blocks, points, bytes, avgBitsPerPoint }

Browser:

const db = new ShardTSDB({ backend: "indexeddb" });

API (ShardTSDB)

| Method | Description | |--------|-------------| | constructor({ backend?, blockSize? }) | backend: 'memory' | 'indexeddb' | | put(name, tags, ts, val) | Append one point | | putBatch(name, tags, tss[], vals[]) | Append many | | flushAll() | Force block flush | | range(name, tags, start, end) | Points in time range | | last(name, tags, n) | Last n points | | stats(name, tags) | Block/point/byte stats |

Also exports BlackjackV2 / BlackjackCodec for direct series coding.


Donate to Slid Phi Labs

Donate $29.99 · Support $199


Related packages

| Package | Role | |---------|------| | zero-range-wave-compression | ZRW v5 — beats gzip/brotli on zeros/ramps/walks | | blackjack-compression | Blackjack v4 general int/byte/file compressor | | shard-zip | Adaptive Fib + Blackjack V2 + CLI | | slid-phi | Omni-Dormant integer pathways | | CuNi Studio | Exact multi-target code playground |

Brand home: slidphilabs.vercel.app


License

MIT