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

nothing-innerstorage

v1.0.2

Published

nothing-browser plugin — persists WhatsApp Web localStorage to disk via the C++ PiggyInnerStorage engine

Readme

nothing-innerstorage

Persists WhatsApp Web's localStorage to disk on every write, and re-injects it before WAWeb JS runs on the next restart — so your session survives process restarts without re-scanning the QR code.

The C++ side (PiggyInnerStorage) handles all timing. This package is a thin JS wrapper.


Install

npm install nothing-innerstorage

Usage

const piggy        = require('nothing-browser').default;
const innerstorage = require('nothing-innerstorage');

await piggy.launch({ mode: 'tab', binary: 'headless' });
await piggy.register('whatsapp', 'https://web.whatsapp.com', { single: true });

await piggy.extend(
  innerstorage({ path: './wa-storage.json' })
);

piggy.whatsapp.on('storage:loaded', (d) =>
  console.log(`Session restored: ${d.keys} keys`)
);

piggy.whatsapp.on('storage:saved', (d) =>
  console.log(`Session saved: ${d.keys} keys`)
);

await piggy.whatsapp.navigate();

Options

| Option | Type | Default | Description | |---|---|---|---| | path | string | './wa-storage.json' | Where to persist the localStorage snapshot | | onLoaded | function | — | Called when C++ restores a session into the page | | onSaved | function | — | Called when C++ snapshots localStorage to disk |


Events

Listen via site.on(event, handler):

| Event | Data | When | |---|---|---| | storage:loaded | { tabId, keys } | Every page load — C++ injected saved keys | | storage:saved | { tabId, keys } | Every localStorage write — C++ saved snapshot |


API (site.storage)

// Read one key from the live page localStorage
const val = await piggy.whatsapp.storage.get('wa-secret-bundle');

// Dump all keys from the live page localStorage
const all = await piggy.whatsapp.storage.dump();

// Wipe localStorage in-page AND delete the snapshot file (forces new QR)
await piggy.whatsapp.storage.clear();

How it works

  • C++ hooks loadFinished → injects saved snapshot into localStorage before WAWeb reads it
  • C++ installs a JS hook that intercepts every localStorage.setItem/removeItem/clear call
  • On each change, C++ snapshots the full localStorage and writes it to the file at path
  • On restart, snapshot is re-injected — WAWeb sees its session as intact

Notes

  • Do not call session.reload() after installing this plugin — it uses older timing and will conflict
  • To force a fresh QR scan: call site.storage.clear() before navigating
  • This plugin was made upon request and need report any issues found -This plugin is tailord specificaly for whatsap sessions you can use it on other sites but no guarantee of working and that is not a bug sonner or later nothing-storage plugin will be released to solve that