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

pocket-region

v0.9.4

Published

AWS services like S3, DynamoDB, and Lambda inside Node or a browser tab, reached with the ordinary AWS SDK

Readme

Pocket Region

Pocket Region runs AWS services like S3, DynamoDB, and Lambda inside your Node process or a browser tab, and you call them with the ordinary AWS SDK. Your SDK calls reach the emulator as function calls, without a socket, so there's no container to start and no server to reach. Lambda handlers, Node or Python, run in child processes or Web Workers.

import { clientConfig, createRegion } from 'pocket-region/node';
import { S3Client, CreateBucketCommand, PutObjectCommand } from '@aws-sdk/client-s3';

const region = await createRegion();
const s3 = new S3Client(clientConfig(region));

await s3.send(new CreateBucketCommand({ Bucket: 'photos' }));
await s3.send(new PutObjectCommand({ Bucket: 'photos', Key: 'cat.txt', Body: 'meow' }));

await region.stop();

It needs WebAssembly JSPI: Node 24.20 or later, or a browser that supports it.

The AWS APIs come from MiniStack, a Python AWS emulator that runs here under Pyodide.

In Node, a region is ready in about half a second. Resetting a region to empty takes about a millisecond for a typical test, so every test can start clean without booting a new one.

Read the docs at pocket-region.dev/docs, where you can edit and run the examples in your browser tab, or try the demo.

Features

  • Node and the browser: the same region runs in a Node process or a page, which loads the emulator from jsDelivr with no files to copy.
  • Services: CloudWatch Logs, DynamoDB, EventBridge, Kinesis, KMS, S3, Secrets Manager, SNS, SQS, and SSM Parameter Store behave as they do in MiniStack, with a runnable example for each. Others, such as RDS and ECS, answer as stubs with nothing running behind them, or are untested here.
  • Lambda: Node and Python functions run from a zipped deployment package, in child processes or Web Workers, with event source mappings.
  • Resets and saves: empty a region between tests, or save its state to a store and boot from it later.
  • Clients: requestHandler for AWS SDK clients, and serve for anything that needs an endpoint.
  • The aws CLI: awsCli runs aws commands and returns their output, for tests or an AWS console in your own page.
  • Examples in your docs: add a Run button to code examples written for real AWS. createRunner runs them in the reader's tab without any Pocket Region setup in the example.

In a real app

Glass Garden runs on Pocket Region. It opens on a working project, a load balancer in front of an instance group, and you can drag S3, SQS, DynamoDB, and Lambda onto the canvas and watch requests move through real code. Pocket Region started there as its AWS region and was pulled out so the same region can run in a test or any other page.