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

yume-server

v0.0.7

Published

Yume (夢)

Readme

Yume (夢)

Yume is a lightweight and exceptionally fast web framework specifically designed for building efficient API servers. It achieves this by leveraging the power of uWebSockets.js, a high-performance WebSocket library for Node.js, and regexparam, A tiny utility that converts route patterns into RegExp.

[!WARNING]
This project is not meant for production or any serious projects

Quick start

Install with NPM

npm i yume-server

Hello World

import { Yume } from "yume-server";

const app = new Yume();
const PORT = 3000;

app.get("/", (req, res) => {
  res.json({ hello: "bye" });
});

app.listen(PORT, () => {
  console.log(`> started @${PORT}`);
});

Basic

Routing

// HTTP methods
app.get("/", (req, res) => res.end("GET /"));

app.post("/", (req, res) => res.end("POST /"));

app.put("/", (req, res) => res.end("PUT /"));

app.del("/", (req, res) => res.end("DELETE /"));

// All methods
app.all("/", (req, res) => res.end("All /"));

// Dynamics routes
app.get("/anime/:id", (req, res) => {
  const params = req.getParams<{ id: string }>();
  res.end(`GET /anime/${params?.id}`);
});

app.get("/anime/:studio/:year", (req, res) => {
  const params = req.getParams<{ studio: string; year: string }>();
  res.end(`GET /anime/${params?.studio}/${params?.year}`);
});

// Wildcard
app.get("/users/*", (req, res) => res.end(`GET /users/*`));

For more details, https://github.com/lukeed/regexparam.

cors

app.use((req, res, next) => {
  res.set("Access-Control-Allow-Origin", "*");
  res.set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
  res.set(
    "Access-Control-Allow-Headers",
    "origin, content-type, accept, x-requested-with"
  );
  res.set("Access-Control-Max-Age", "3600");
  next();
});

Request

getBody

app.post("/", async (req, res) => {
  const { anime } = await req.getBody(); // { anime: 'kuzu no honkai' }
  res.json({ success: true });
});

getFile

app.post("/", async (req, res) => {
  const file = await req.getFile();
  res.json({ success: true });
});

getQuery

// http://localhost:3000/anime?name=Kuzu_no_Honkai
app.get("/anime", (req, res) => {
  const query = req.getQuery(); // { name: 'Kuzu_no_Honkai' }
  res.json({ hello: "bye" });
});

getParams

//localhost:3000/anime/32949/Kuzu_no_Honkai
http: app.get("/anime/:id/:slug", (req, res) => {
  const param = req.getParams(); // { id: '32949', slug: 'Kuzu_no_Honkai' }
  res.json({ hello: "bye" });
});

getHeaders

app.get("/", (req, res) => {
  const headers = req.getHeaders(); // will give you all headers
  res.json({ hello: "bye" });
});

Response

send

app.get("/", (req, res) => {
  res.send("Hello, World!");
});

json

app.get("/", (req, res) => {
  res.json({ name: "Kuzu_no_Honkai" });
});

render

app.get("/", (req, res) => {
  res.render("<h1>Hello, World!</h1>");
});

redirect

app.get("/", (req, res) => {
  res.redirect("https://myanimelist.net/anime/32949/Kuzu_no_Honkai");
});

status

app.get("/", (req, res) => {
  res.status(200).json({ success: true });
});

sendFile

app.get("/anime/Kuzu_no_Honkai.jpg", (req, res) => {
  const filepath = path.resolve(process.cwd() + "/upload/Kuzu_no_Honkai.jpg");
  res.sendFile(filepath);
});

set

app.get("/", (req, res) => {
  res.set("X-Custom-Header", "value").json({ success: true });
});

License

Licensed under MIT License.