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

kame

v2.1.0

Published

Kame (pronounced `kah-may`) is an extensible Node.js-based app runtime and bundler for JavaScript. It seeks to improve the user experience of using new JavaScript syntax features, "compiles-to-JavaScript" languages (like TypeScript, Flow, Coffeescript), a

Downloads

607

Readme

kame

Kame (pronounced kah-may) is an extensible Node.js-based app runtime and bundler for JavaScript. It seeks to improve the user experience of using new JavaScript syntax features, "compiles-to-JavaScript" languages (like TypeScript, Flow, Coffeescript), and filetype loaders (like importing CSS/PNG/TTF files).

Its default config out of the box should be capable for most needs, but is also easy to override. The config API is very small:

type Config = {
  /*
   * A function that, given a string passed to import/require and the absolute
   * path to the file that import/require appeared in, should return the
   * absolute path to the file that that import/require should be referring to
   */
  resolve: (id: string, fromFilePath: string) => string;

  /*
   * A function that, given the absolute path to a file on disk, reads that
   * file, transforms it into JS (if necessary), and returns a string
   * containing JS source code (and, optionally, a source map).
   */
  load: (filename: string) => string | { code: string; map: any };

  /*
   * A function that, given a JS source code expression and the filename it
   * came from, executes the code and returns the result. This is only used by
   * the runtime, not the bundler.
   */
  evaluate: (code: string, filename: string) => any;
};

For more information behind the inspiration and design, see ./RATIONALE.md.

Starter Config

The default config is usually good enough, but if you need to stub out certain modules or find-and-replace content in certain modules, you'll want to define your own config. Generally, it makes sense to use the default config behavior as a fallback. Kame relies on function composition to combine configs, so you'll want to require the default behavior and call it:

kame.config.ts

import { defineConfig, defaultConfig } from "kame";

export default defineConfig({
  resolve(id, fromFilePath) {
    // Add your own override logic here via early returns

    return defaultConfig.resolve(id, fromFilePath);
  },
  load(filename) {
    // Add your own override logic here via early returns

    return defaultConfig.load(filename);
  },
  evaluate(code, filename) {
    // Override, or rely on the default behavior:
    return defaultConfig.evaluate(code, filename);
  },
});

Note: defineConfig is an optional pass-through function which provides type/intellisense autocomplete. You don't have to use it; you can export the object you pass into it directly instead.

Kame automatically picks up files named kame.config.js or kame.config.ts when present in the current working directory where kame was invoked from. To use a different path, specify the config via the --config flag.

Runtime usage example (CLI)

npx kame run src/my-entrypoint.ts

Runtime usage example (Node API)

const kame = require("kame");

const Runtime = kame.Runtime;
// or, to override the config:
// const Runtime = kame.configure({ /* ... */ }).Runtime;

const runtime = new Runtime();

// run your app entrypoint
runtime.load("my-entrypoint.js");
// or, to inject into Node.js's require mechanism ala @babel/register:
runtime.register();

Bundler usage example (CLI)

npx kame bundle src/my-entrypoint.ts dist/my-bundle.js

Bundler usage example (API)

const kame = require("kame");

const Bundler = kame.Bundler;
// or, to override the config:
// const Bundler = kame.configure({ /* ... */ }).Bundler;

const bundler = new Bundler();

const { warnings, writtenFiles } = bundler.bundle({
  input: "src/my-entrypoint.js";
  output: "dist/my-bundle.js";
});