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

@wcpos/rxdb-storage-worklet

v0.1.1

Published

JSON-only RxDB remote-storage messaging across a React Native Worker Runtime.

Downloads

94

Readme

@wcpos/rxdb-storage-worklet

JSON-only RxDB remote-storage messaging across a React Native Worker Runtime.

Receive bindings and lifetime

Pair getRxStorageWorklet and exposeWorkletRxStorage with the same receiveGlobalName, or the same identifier to derive the binding name. Independent endpoints must use distinct names. Both default to the rxdb-storage-worklet identifier.

Closing a channel drains its accepted requests and releases its RN binding; requests made after closing begins throw. The worker exposure stays available for reopening. Its owner can await the disposer returned by exposeWorkletRxStorage to drain requests already received and close the actual storage instances before destroying the runtime. Before exposure disposal, stop new requests and await outstanding operations and channel close so requests still queued on RN have reached the worker and settled. Do not dispose an exposure while a sender is still draining.

Bundle-mode replies and benchmark timing

In Worklets bundle mode, import receiveWorkletMessage on RN and pass that function reference as an argument to your worker initializer. Inside the worker, pass it as receiveOnRN to exposeWorkletRxStorage (see the example initializer). Do not re-import it inside the worker: scheduleOnRN requires an RN-defined function reference; a worker-local function cannot deliver the reply.

RN must also provide a binary-capable Blob implementation for attachment replies when its fetch implementation cannot decode data URLs. The example uses the existing installWorkletRuntimePolyfills on RN and the worker.

The optional onTiming callback on getRxStorageWorklet reports matched RN requests: stringify duration (excluding clone/attachment conversion), scheduling call duration, and send-to-reply-entry elapsed time. The send timestamp precedes serialization but follows the channel send queue. These are not CPU-cost shares; round trips also include worker work and queue waits. Instrumentation is opt-in.

Durability

The filesystem backend inherits the premium abstract-filesystem engine's power-loss durability limitation. A successful write or orderly close/reopen is not a guarantee that acknowledged writes survive a crash or power loss. The engine does not currently coordinate ordered filesystem flushes for document, index, changelog, and recovery-log updates. Recovery-log truncation can therefore persist before the corresponding data, risking lost writes or inconsistent state.

A durability guarantee requires ordered synchronization points coordinated with the premium engine. Adding fsync only when closing a file does not establish that guarantee. This package does not add such a guarantee.