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

dynamodb-toolkit-express

v0.3.0

Published

Express adapter for dynamodb-toolkit — mounts the standard REST route pack as Express middleware.

Readme

dynamodb-toolkit-express NPM version

Express adapter for dynamodb-toolkit v3. Mounts the toolkit's standard REST route pack as an Express middleware — same wire contract as dynamodb-toolkit/handler (the bundled node:http adapter) and dynamodb-toolkit-koa, translated for Express's (req, res, next) shape.

Zero runtime dependencies; express and dynamodb-toolkit are peer dependencies.

Install

npm install dynamodb-toolkit-express dynamodb-toolkit express @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb

Quick start

import express from 'express';
import {DynamoDBClient} from '@aws-sdk/client-dynamodb';
import {DynamoDBDocumentClient} from '@aws-sdk/lib-dynamodb';
import {Adapter} from 'dynamodb-toolkit';
import {createExpressAdapter} from 'dynamodb-toolkit-express';

const client = DynamoDBDocumentClient.from(new DynamoDBClient({region: 'us-east-1'}));

const adapter = new Adapter({
  client,
  table: 'planets',
  keyFields: ['name']
});

const app = express();
app.use(express.json());
app.use('/planets', createExpressAdapter(adapter));
app.listen(3000);

app.use(prefix, middleware) is the idiomatic way to mount the adapter at a sub-path — Express strips the prefix from req.path natively. Unrecognized routes hand back to next(), so the adapter composes cleanly with the rest of your Express stack.

Options

| Option | Default | Purpose | | -------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------- | | policy | defaultPolicy | Partial overrides for prefixes, envelope keys, status codes. | | sortableIndices | {} | Map sort-field name → GSI name for ?sort= / ?sort=-field. | | keyFromPath | (raw, a) => ({[a.keyFields[0].name]: raw}) | Convert :key path segment to a key object (composite keys). | | exampleFromContext | () => ({}) | Derive prepareListInput example from {query, body, adapter, framework: 'express', req}. | | maxBodyBytes | 1048576 (1 MiB) | Cap for stream-parsed bodies, measured in bytes (ignored when a body-parser ran). |

Consumers using express.json() (or any compatible body-parser) can rely on the pre-parsed req.body; the adapter uses it when set, falls back to streaming the raw request otherwise.

Routes

Rooted at the mount point:

| Method | Path | Adapter method | | ------ | ------------------ | ----------------------------- | | GET | / | getList (envelope + links) | | POST | / | post | | DELETE | / | deleteListByParams | | GET | /-by-names | getByKeys | | DELETE | /-by-names | deleteByKeys | | PUT | /-load | putItems | | PUT | /-clone | cloneListByParams (overlay) | | PUT | /-move | moveListByParams (overlay) | | PUT | /-clone-by-names | cloneByKeys (overlay) | | PUT | /-move-by-names | moveByKeys (overlay) | | GET | /:key | getByKey | | PUT | /:key | put (URL key merged in) | | PATCH | /:key | patch (meta keys → options) | | DELETE | /:key | delete | | PUT | /:key/-clone | clone | | PUT | /:key/-move | move |

Wire contract — query syntax, envelope shape, meta-key prefixes, status codes — matches the bundled HTTP handler. Everything is configurable through options.policy.

Compatibility

  • Express 4 and Express 5 (peer range ^4.21.0 || ^5.0.0).
  • Node 20+, Bun, Deno — the adapter's tests run cleanly under all three.

License

BSD-3-Clause.