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

@nemu.pm/aidoku-runtime

v0.12.0

Published

Runtime for loading and executing Aidoku WASM sources in JavaScript environments

Readme

@nemu.pm/aidoku-runtime

Runtime for loading and executing Aidoku WASM sources in JavaScript environments.

Install

bun add @nemu.pm/aidoku-runtime
# or
npm install @nemu.pm/aidoku-runtime

Usage

import { AidokuRuntime } from "@nemu.pm/aidoku-runtime";

const runtime = new AidokuRuntime();
const source = await runtime.loadSource(wasmBuffer, sourceInfo);

const mangas = await source.getMangaList([], 1);

Source error codes

A source function that fails returns a negative code. AidokuResultErrorCode maps them: Message (-1), Unimplemented (-2), RequestError (-3), HtmlError (-4), JsError (-5), CanvasError (-6), Utf8Error (-7), JsonParseError (-8), DeserializeError (-9). Errors raised for these are AidokuResultError, which carries the numeric code; for Message the message is the text the source returned.

getSearchMangaList, getMangaDetails, getChapterList, getPageList, getMangaListForListing and getHome reject with AidokuResultError instead of reporting an empty result, so a failure is distinguishable from "nothing found":

try {
  await source.getChapterList(manga);
} catch (e) {
  if (e instanceof AidokuResultError && e.code === AidokuResultErrorCode.Unimplemented) {
    // the source does not implement this
  }
}

getFilters and getListings stay lenient and fall back to an empty list.

Image processing

Sources may process page and cover images:

if (await source.hasImageProcessor()) {
  const page = await source.processPageImage(
    bytes, context, requestUrl, requestHeaders, status, responseHeaders
  );
}

if (await source.hasCoverImageProcessor()) {
  // Covers take no page context
  const cover = await source.processCoverImage(
    bytes, requestUrl, requestHeaders, status, responseHeaders
  );
}

Both resolve to processed PNG bytes, or null when the source declines.

Cloudflare challenges

A blocked request throws CloudflareBlockedError (url, status, host, userAgent). Pass cloudflareSolver to loadSource to clear challenges and retry; concurrent requests to one host share a single solve, and a call gets up to two solve-and-retry rounds before the original error is rethrown. Both this error and AidokuResultError keep their class and fields across the browser build's worker boundary.

const source = await loadSource(aixBytes, "my-source", {
  cloudflareSolver: async ({ url, host, userAgent }) => {
    // Present the challenge to the user, resolve true once cleared
    return true;
  },
});

isCloudflareChallengeResponse(status, headers, body?) is exported for hosts that do their own HTTP.

Unsupported imports

Webviews are not available, so these js imports exist for instantiation only and always fail: webview_create, webview_set_rule_list, webview_load, webview_load_html, webview_wait_for_load, webview_eval, webview_eval_async, webview_add_user_script, webview_get_cookies, webview_delete_cookie. context_eval_async behaves like context_eval, since context evaluation here is synchronous.

Documentation

See the main repository for full documentation: https://github.com/nemu-pm/aidoku-js

License

MIT