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

@rederive/colors

v0.1.0

Published

Re-derived [email protected] — zero-dependency core, behavior-locked to a held-out oracle. Ships its contract (SIR spec + oracle); verify or re-derive locally with the rdv CLI.

Downloads

94

Readme

@rederive/colors

A verified-recompose of [email protected] (github.com/Marak/colors.js) — the last release before the maintainer's Jan-2022 sabotage. Zero-dependency core; every unit behavior-locked to a held-out oracle and quorum-verified with the original deleted. Ships its contract (sir/ + oracles/); verify or rebuild with rdv.

Units

| unit | kind | sig | verified | zero-dep | |---|---|---|---|---| | strip (alias stripColors) | FUNCTIONAL | (str) => string | quorum 3/3 · 10 frozen / 10 held-out | ✓ |

import { strip } from '@rederive/colors';
strip('\x1b[31mhello\x1b[39m'); // 'hello'

⚠ Known limitation (documented in the oracle, not hidden)

strip removes only single-parameter SGR color codes of the form ESC[<digits>m. By design it does not remove:

  • combined / multi-parameter SGR (ESC[1;31m — the leading code survives),
  • CSI non-SGR (cursor moves, ESC[2J clear-screen),
  • OSC sequences (ESC]0;…BEL window-title, ESC]8;;url BEL hyperlinks).

So do not use strip to sanitize untrusted terminal output — title-spoofing, fake hyperlinks, and cursor/screen manipulation pass straight through. This matches the original [email protected] behavior exactly (it's a color stripper, not a terminal sanitizer). The held-out oracle pins this on purpose (ho_csi_clear_screen, ho_osc_set_title, ho_osc_hyperlink), so the contract is honest about it. A hardened sanitize unit that strips all CSI/OSC is a candidate future unit — a deliberate behavior change, not a silent one.

Verify / rebuild

rdv check .          # held-out oracle + content hashes  → ✓ VERIFIED  (deterministic, no tokens)
rdv resynth . --n 3  # rebuild src/ locally from sir/ + oracles/  (torches tokens, quorum-verified)
rdv vis .            # regenerate vis.html

Provenance, hashes, and verify status: sir.manifest.json. The oracle's expecteds were stamped by executing [email protected] (never hand-authored).