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

@atscript/db-client

v0.1.50

Published

Browser-compatible HTTP client for @atscript/moost-db REST endpoints.

Readme


Type-safe HTTP client that mirrors moost-db controller endpoints. Works in browsers, Node.js, and any runtime with fetch. Each method maps 1:1 to a controller endpoint — filters, sorting, pagination, relation loading, text search, and aggregation are all supported through typed query controls.

In SSR environments, Moost's fetch automatically routes local requests to handlers in-process, so the same Client instance works on both server and browser.

Installation

pnpm add @atscript/db-client

Quick Start

import { Client } from "@atscript/db-client";
import type { User } from "./models/user.as";

const users = new Client<typeof User>("/api/users", {
  baseUrl: "https://api.example.com",
});

// Query                            → GET /query
const active = await users.query({ filter: { status: "active" } });

// Get one                          → GET /one/:id
const user = await users.one("abc-123");

// Insert                           → POST /
const { insertedId } = await users.insert({ name: "Alice" });

// Update                           → PATCH /
await users.update({ id: insertedId, role: "admin" });

// Remove                           → DELETE /:id
await users.remove(insertedId);

// Count                            → GET /query ($count)
const total = await users.count();

// Paginate                         → GET /pages
const page = await users.pages({ filter: { active: true } }, 1, 20);

// Metadata                         → GET /meta
const meta = await users.meta();

Features

  • Typed queries — filter keys, sort fields, $with relation names, and primary keys are type-checked against the Atscript model
  • Full CRUDquery, count, pages, one, insert, update, replace, remove
  • Aggregation — typed $groupBy dimensions and measures with inferred result types
  • Search — full-text and vector search via query controls
  • Client-side validation — validates writes against the Atscript schema before sending
  • Error handlingClientError with structured validation errors
  • Configurable — custom fetch, static or async headers, base URL

Documentation

License

MIT