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

@wxn0brp/db-resolver

v0.100.0

Published

A dynamic database adapter resolver for the ValtheraDB ecosystem. Automatically selects and instantiates the appropriate database storage adapter based on configuration, environment variables, or fallback defaults.

Readme

Resolver

A dynamic database adapter resolver for the ValtheraDB ecosystem. Automatically selects and instantiates the appropriate database storage adapter based on configuration, environment variables, or fallback defaults.

Installation

npm i @wxn0brp/db-resolver @wxn0brp/db-core

Usage

import { createAdapter } from "@wxn0brp/db-resolver";
import { ValtheraClass } from "@wxn0brp/db-core";

const adapter = await createAdapter({ name: "master" });
const db = new ValtheraClass({ adapter });

More Examples

// Force a specific adapter
await createAdapter({ force: "bin" });
// same as
await createAdapter({ force: "bin:bin" });

// Use environment variables
process.env.VALTHERA_MASTER = "sqlite";
await createAdapter({ name: "master" });

// Use default fallback
await createAdapter({ name: "master", def: "dir" });

Configuration

The resolver determines which database adapter to use based on the following priority:

  1. force option - Explicitly specify the storage package and variant
  2. Environment variables - Set VALTHERA_<NAME> and optionally VALTHERA_<NAME>_OPTS
  3. def option - Define a default fallback
  4. Default behavior - Falls back to ./vdb-data/<name> directory storage

Options

| Option | Type | Description | |--------|------|-------------| | name | string | Identifier used for environment variable lookup (VALTHERA_<NAME>) | | opts | any[] | Options passed to the database adapter constructor | | def | string | Default adapter in format "package:variant" | | force | string | Force a specific adapter in format "package:variant" |

Environment Variables

  • VALTHERA_<NAME> - Adapter identifier in format "package" or "package:variant" (e.g., VALTHERA_MASTER=dir:dir)
  • VALTHERA_<NAME>_OPTS - JSON array of constructor options for the adapter
  • VALTHERA_RESOLVER_MAX_DEPTH - Maximum depth to search for adapters

Dynamic install

If the adapter is not installed and process.env.NODE_ENV !== "production", it will be installed automatically.

License

MIT