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

motely-wasm

v2.2.3

Published

Run the classic Analyzer on a Balatro seed, and more all in your browser!

Readme

motely-wasm

Browser-only WebAssembly package for Motely Seed Oracle. Use in the browser, not in Node.

Installation

npm install motely-wasm

One-time setup (no recurring chores)

Use the plugin for your bundler. It serves/copies _framework and sets the required COOP/COEP headers. After this, you never copy files or touch headers again.

Vite

// vite.config.js
import { defineConfig } from "vite";
import motelyWasm from "motely-wasm/vite-plugin";

export default defineConfig({
  plugins: [motelyWasm()],
});

Dev: _framework is served at /_framework, headers set. Build: _framework and _framework_nt are copied into dist/.

Next.js

// next.config.mjs (or .js)
import withMotelyWasm from "motely-wasm/next-plugin";

export default withMotelyWasm({
  // your existing next config
});

On first run the plugin copies _framework and _framework_nt into public/ and sets COOP/COEP. No manual copy, no recurring setup.

Turbopack: The way loadMotely() loads the WASM runtime does not work with Next.js when Turbopack is enabled. Use the default webpack bundler (do not enable --turbo / turbo: true) when using motely-wasm.

Other frameworks (SvelteKit, Astro, Remix, static host, etc.)

No plugin needed. Do the same one-time setup in your stack:

  1. Serve _framework: copy node_modules/motely-wasm/_framework into your static/public folder, or configure your dev/server to serve that folder at /_framework.
  2. Set COOP/COEP headers on all responses. Without these, the browser silently disables SharedArrayBuffer and multi-threading — your search will run single-threaded without any error:
    Cross-Origin-Opener-Policy: same-origin
    Cross-Origin-Embedder-Policy: require-corp

Server config examples

Netlify / Cloudflare Pages — copy node_modules/motely-wasm/_headers to your site root, or add to your own _headers:

/*
  Cross-Origin-Opener-Policy: same-origin
  Cross-Origin-Embedder-Policy: require-corp

Nginx:

add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Embedder-Policy "require-corp" always;

Apache (.htaccess):

Header set Cross-Origin-Opener-Policy "same-origin"
Header set Cross-Origin-Embedder-Policy "require-corp"

IIS (web.config):

<system.webServer>
  <httpProtocol>
    <customHeaders>
      <add name="Cross-Origin-Opener-Policy" value="same-origin" />
      <add name="Cross-Origin-Embedder-Policy" value="require-corp" />
    </customHeaders>
  </httpProtocol>
</system.webServer>

Node/Express:

app.use((req, res, next) => {
  res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
  res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
  next();
});

Verify: open DevTools Console and run self.crossOriginIsolated — must return true.

Then call loadMotely() (auto-detects threads) or loadMotely({ baseUrl: "/your/path" }) if you used a different path.

Usage

import { loadMotely } from "motely-wasm";

const api = await loadMotely();
const version = api.getVersion();
const result = api.analyzeSeed("TACO1111", "Red", "White");

// Analyze seed with ante-by-ante breakdown
result.antes.forEach(ante => {
  console.log(`Ante ${ante.ante}: Boss=${ante.boss}, Draw order=${ante.drawOrder}`);
  ante.shopQueue.forEach(item => console.log(`  Shop: ${item.name}`));
});

// Search with JAML filter
const searchResult = await api.startJamlSearch(jamlContent, {
  threadCount: 4,       // auto-detected if omitted; defaults to processorCount
  batchCharCount: 4,    // default: 4 (1.5M seeds per batch, range 1-7)
  onProgress: (searched, matches, elapsed, count) => {
    console.log(`Searched: ${searched}, Matches: ${matches}`);
  },
  onResult: (seed, score) => {
    console.log(`Found: ${seed}`);
  }
});

Batch size tuning:

  • batchCharCount=4 (default): 1.5M seeds/batch, good balance between responsiveness and JS interop overhead
  • batchCharCount=3: 175K seeds/batch, more responsive UI updates
  • batchCharCount=5: 52M seeds/batch, fewer JS calls, less responsive

Optional custom base URL (e.g. CDN): loadMotely({ baseUrl: "https://cdn.example/assets" }). Optional threading mode: loadMotely({ threads: "auto" | "on" | "off" }) (default: auto).

JAML schema

The package includes the JAML JSON schema for validation and editor IntelliSense. Use the file at node_modules/motely-wasm/jaml.schema.json or resolve motely-wasm/jaml.schema.json (e.g. copy to your public dir or point your editor at it).

License

MIT. See the MotelyJAML repository for details.