Skip to content

dhoulb/shelving

Repository files navigation

Shelving

Conventional Commits Release npm

Shelving is a TypeScript toolkit for working with typed data. At its core it is a schema validation library — every schema has a validate() method that returns a typed value or throws a human-readable error. On top of that it provides a database provider abstraction, an API provider abstraction, observable state stores, React integration, and a large set of typed utility functions.

Note: Shelving is in active development and does not yet follow semver.

Installation

npm install shelving

Shelving is an ES module. Import from the main package or from individual module subpaths:

import { STRING, DataSchema } from "shelving"
import { MemoryDBProvider } from "shelving/db"

Modules

Module Description
schema Schema validation — the foundation of everything
db Database provider abstraction (Collections, providers, queries)
api API provider abstraction (Endpoints, providers, caching)
store Observable state containers, Suspense-compatible
sequence Async-iterable utilities (DeferredSequence)
react React hooks for stores and sequences
error Typed error classes
util Typed helpers for arrays, objects, strings, data, queries, updates
markup Markdown renderer for user-facing content
cloudflare Cloudflare Workers providers (KV, D1)
firestore Firestore providers (client, lite, server)
bun Bun PostgreSQL provider

Changelog

See Releases.