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

briefcase-wasm

v2.5.3

Published

WebAssembly bindings for Briefcase AI

Readme

Briefcase AI WebAssembly

WebAssembly bindings for Briefcase AI.

npm version

Install

npm install briefcase-wasm

What this package exports

The generated module exports these primary symbols:

  • init
  • version
  • test_functionality
  • JsDecisionSnapshot
  • JsMemoryStorage
  • WasmInput
  • WasmOutput
  • WasmModelParameters
  • WasmDecisionSnapshot
  • WasmDriftCalculator
  • WasmCostCalculator
  • WasmSanitizer
  • JsBriefcaseClient

Js* classes are lightweight JS-oriented wrappers. Wasm* classes mirror more of the Rust model types.

Quick Start (JS wrappers)

import { init, version, JsDecisionSnapshot, JsMemoryStorage } from 'briefcase-wasm';

init();
console.log(version());

const decision = new JsDecisionSnapshot('chat_completion')
  .add_input('prompt', 'Summarize this text', 'string')
  .add_output('response', 'Summary output', 'string')
  .add_tag('env', 'test');

const storage = new JsMemoryStorage();
const id = storage.save_decision(decision);
const loaded = storage.load_decision(id);
console.log(loaded.to_json());

Quick Start (Wasm model wrappers)

import { WasmInput, WasmOutput, WasmDecisionSnapshot } from 'briefcase-wasm';

const input = new WasmInput('prompt', 'hello', 'string');
const output = new WasmOutput('response', 'hi', 'string');
output.withConfidence(0.93);

const decision = new WasmDecisionSnapshot('chat_completion');
decision.addInput(input);
decision.addOutput(output);
decision.addTag('model', 'gpt-4');

console.log(decision.toObject());

Drift, Cost, and Sanitization

import {
  WasmDriftCalculator,
  WasmCostCalculator,
  WasmSanitizer,
} from 'briefcase-wasm';

const drift = new WasmDriftCalculator();
const driftMetrics = drift.calculateDrift(['A', 'A', 'B']).toObject();

const cost = new WasmCostCalculator();
const estimate = cost.estimateCost('gpt-4', 1200, 300).toObject();

const sanitizer = new WasmSanitizer();
const sanitized = sanitizer.sanitize('Email me at [email protected]').toObject();

console.log({ driftMetrics, estimate, sanitized });

Notes

  • This package does not expose SqliteBackend.
  • If you need local persistence in the browser runtime, use JsMemoryStorage and sync to your own backend.
  • For Python bindings, use briefcase-ai.

License

GPL-3.0. See the project LICENSE file.