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

@topaisaas/sqltwin-stream

v1.0.1

Published

Deterministic, streaming SQL dump anonymizer (PostgreSQL, MySQL, SQLite) preserving 100% of FOREIGN KEY joins and UNIQUE constraints with zero memory overhead.

Readme

SQLTwin Stream (@topaisaas/sqltwin-stream)

Deterministic, Zero-Memory SQL Dump Anonymizer for PostgreSQL, MySQL & SQLite.
Preserves 100% of FOREIGN KEY joins, UNIQUE constraints, and ISO 13616 Modulo-97 IBAN checksums in real-time Unix streaming pipes ($O(1)$ memory).

License GitHub Action Offline Licensing


⚡ The Problem: Broken Foreign Keys & Staging Leaks

When developers clone a production PostgreSQL or MySQL database to staging, local Docker, or ephemeral Pull Request environments:

  1. GDPR / HIPAA Violations: Exposing real customer emails, phone numbers, and IBANs in staging violates data protection regulations.
  2. Naive Anonymization Breaks Joins: Replacing emails with random strings breaks FOREIGN KEY references across multiple tables and violates UNIQUE index constraints.
  3. Huge Memory Footprint: Traditional tools load tables into memory, crashing on 50GB+ dumps.

SQLTwin solves this in a single Unix streaming pipe:

pg_dump prod_db | npx sqltwin > clean_staging.sql

🚀 Key Features

  • Bijective Determinism: The same input email (e.g. [email protected]) always maps to the exact same synthetic email across all 50 tables, preserving joins and unique keys.
  • $O(1)$ Memory Streaming: Streams line-by-line via stdin/stdout. Processes a 100GB dump using only ~25MB of RAM at speeds up to 300MB/s.
  • Valid ISO 13616 IBANs: Masked bank accounts strictly conform to the Modulo-97 algorithm.
  • Zero-Server Offline Licensing: Uses Ed25519 cryptographic signatures. Your CI/CD pipelines run completely air-gapped with zero external network dependencies.

🛠️ Usage

1. Unix Pipe (stdin to stdout)

pg_dump -U postgres prod_db | npx sqltwin --salt "my-company-seed" | psql -U postgres staging_db

2. File-to-File

npx sqltwin --input raw_dump.sql --output sanitized_dump.sql

3. GitHub Actions CI/CD Workflow (action.yml)

name: Generate Anonymized Staging DB
on: [push]

jobs:
  anonymize:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Anonymize Database Dump
        uses: topaisaas-dev/sqltwin-stream@v1
        with:
          input_file: 'prod_dump.sql'
          output_file: 'clean_staging.sql'
          seed_salt: ${{ secrets.SQLTWIN_SEED_SALT }}
          license_key: ${{ secrets.SQLTWIN_LICENSE_KEY }}

💳 Licensing

  • Community Tier: Free for dumps up to 10,000 rows per run.
  • Pro & Enterprise Tier: Unlimited rows, air-gapped commercial deployment, and custom format regex rules ($79 One-Time or $19/month).
  • Instant Ed25519 license keys are issued immediately via Polar.sh Checkout.

📄 License

Apache-2.0 © TopAI Sovereign Studio