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

@dwtechs/gatelin-express

v0.1.0

Published

Open source Gatelin gateway toolset for Express.js.

Downloads

5

Readme

License: MIT npm version last version release date Jest:coverage

Synopsis

Gatelin-express.js is an open source Gatelin gateway toolset for Express.js.

  • 🪶 Very lightweight
  • 🧪 Thoroughly tested
  • 🚚 Shipped as ECMAScript Express module
  • 📝 Written in TypeScript

Support

  • node: 22

This is the oldest targeted version.

Installation

$ npm i @dwtechs/gatelin-express

Usage


// @ts-check
import express from "express";
const router = express.Router();

import getConsumer from "@dwtechs/gatelin-express";

// Routes
// Get users and returns Json
router.get("/search", getConsumer, ...);

// Add new users
router.post("/", getConsumer, ...);

The getConsumer middleware extracts and validates consumer information from request headers. It stores the validated consumer information in res.locals.consumerId and res.locals.consumerName for use by subsequent middleware in the request pipeline. It must be called whenever the route is protected and requires consumer information.

API Reference


/**
 * Middleware to extract and validate consumer information from request headers.
 * Retrieves consumer ID from 'x-consumer-id' header and consumer name from 'x-consumer-name' header.
 * Validates that the ID is a valid number between 1 and 999999999, and the name has at least 5 characters.
 * Stores the validated consumer information in res.locals.consumerId and res.locals.consumerName 
 * for use by subsequent middleware in the request pipeline.
 *
 * @param {Request} req - The Express request object containing consumer headers (x-consumer-id and x-consumer-name).
 * @param {Response} res - The Express response object where consumer data will be stored in res.locals.
 * @param {NextFunction} next - The next middleware function in the Express.js request-response cycle.
 *
 * @returns {void} Calls the next middleware function with an error if consumer validation fails,
 *          otherwise proceeds to the next middleware function.
 * 
 */
function getConsumer(req: Request, res: Response, next: NextFunction): void {}

Logs

Gatelin-express.js uses @dwtechs/Winstan library for logging. All logs are in debug mode. Meaning they should not appear in production mode.

Contributors

Gatelin-express.js is still in development and we would be glad to get all the help you can provide. To contribute please read contributor.md for detailed installation guide.

Stack

| Purpose | Choice | Motivation | | :-------------- | :------------------------------------------: | -------------------------------------------------------------: | | repository | Github | hosting for software development version control using Git | | package manager | npm | default node.js package manager | | language | TypeScript | static type checking along with the latest ECMAScript features | | module bundler | Rollup | advanced module bundler for ES6 modules | | unit testing | Jest | delightful testing with a focus on simplicity |