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

@0stv0/endlang

v1.1.0

Published

1. Setup TypeScript project 2. ``npm i @0stv0/endlang`` 3. Setup project with this scheme: ``` root/ ├── endpoints/ │ └── user.endpoint ├── src/ │ ├── handlers/ │ │ └── testHandler.ts │ ├── middlewares/ │ │ └── testMiddle.ts │ └── index.ts

Readme

Project Setup

  1. Setup TypeScript project
  2. npm i @0stv0/endlang
  3. Setup project with this scheme:
root/
├── endpoints/
│   └── user.endpoint
├── src/
│   ├── handlers/
│   │   └── testHandler.ts
│   ├── middlewares/
│   │   └── testMiddle.ts
│   └── index.ts
├── package.json
└── tsconfig.json

Example .endpoint file

GROUP /user/v1; # parent path (Optional)

PATH /test; # last part of path or full if group not setted
METHOD POST; # GET | POST | PUT | DELETE

HANDLER testHandler.handler; # file in handlers directory and exported handler function name (file.function)
MIDDLE testMiddle.middle1 & testMiddle.middle2; # middlewares in the same format as handler (add as many you want) (Optional)

BODY { name, lastname, email }; # verify wheter the payload contains all these specific fields (no less, no more) (Optional)

Dev Mode

Test only in build, because endpoints and handlers are loaded from dist directory.

Server Startup

import { Server } from '@0stv0/endlang';

let sv: Server = new Server(4000, async() =>
{
    console.log('API listening on http://localhost:4000/');
});
await sv.listen();

First Handler

import { Handler } from "@0stv0/endlang";

const handler: Handler = async(req, res) =>
{
    res.status(200).setJson({message: '123'});
};
export { handler };

First Middleware

import { Middle } from "@0stv0/endlang";

const middle: Middle = async(req) =>
{
    if (1 > 2)
        return [false, {error: 'check math'}];
    return [true, {}];  
};
export { middle };

Request Interface

path: string // request path
method: string // request method
headers: Record<string, string | string[] | undefined> // request headers
query: Record<string, string> // All params after ?
body: Record<string, any> // request payload

Response Interface

status: (code: number) => Response; // response code
setJson: (body: Record<string, any>) => Response; // responde body
setHeader: (name: string, value: string | string[]) => Response; // set header
setResponse: (code: number, body: Record<string, any>) => Response; // set code and body
setNoCache: () => Response; // set no cache in return
setAuthHeader: (token: string) => Response; // set token in Bearer {token}

Server Config (Update v1.1.0)

import { Server } from '@0stv0/endlang';

let sv: Server = new Server(4000, async() =>
{
    console.log('API listening on http://localhost:4000/');
}, {
    generateDocs: true, // default false
    cors: 'http://localhost:3000' // default none
});
await sv.listen();

// generateDocs: boolean -> auto generates all endpoints descriptions in docs directory (Directory is auto-created)
// cors: string -> set cors url

Query Checker & Description (Update v1.1.0)

GROUP /user/v1;

PATH /test;
METHOD GET;

HANDLER testHandler.handler;
MIDDLE testMiddle.middle1 & testMiddle.middle2;

DESC Some description of route; # Description is exported in autodocs generator.

QUERY { id, someKey }; # Same as body but this is checker for query params. Works with every method.