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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@stackpress/lib

v0.6.2

Published

Shared library used across stackpress projects

Readme

📖 Stackpress Library

NPM Package Tests Status Coverage Status Commits License

Comprehensive API documentation for the Stackpress Library - a shared library used across Stackpress projects that standardizes type definitions and provides common utilities for developers.

Installation

npm install @stackpress/lib

API Reference

Data Structures

Data structures in programming are specialized formats for organizing, processing, storing, and retrieving data within a computer's memory.

Key Features:

  • Type-safe nested object manipulation
  • Path-based data access with dot notation
  • Built-in parsers for query strings, form data, and arguments
  • Chainable API for fluent data operations

Events

Event driven designed to support event chain reactions.

Key Features:

  • Priority-based event listeners
  • Type-safe event maps with TypeScript generics
  • Before/after hooks for event execution
  • Task queue management for event handling

Exception

Enhanced error handling with expressive error reporting and stack trace support. Provides better error information than standard JavaScript errors.

Key Features:

  • Template-based error messages
  • Validation error aggregation
  • Enhanced stack trace parsing
  • HTTP status code integration

Queues

Priority-based queue implementations for managing items and tasks with FIFO ordering. Includes both generic item queues and specialized task queues.

Key Features:

  • Priority-based ordering (higher numbers execute first)
  • FIFO ordering within same priority levels
  • Task execution with before/after hooks
  • Chainable API for queue operations

Routing

Event-driven routing system with generic Request and Response wrappers that work across different platforms (HTTP, terminal, web sockets).

Key Features:

  • Cross-platform request/response handling
  • Parameter extraction from routes
  • Event-driven architecture
  • Generic type support for different mediums

File System

Cross-platform file loading utilities for locating, loading, and importing files throughout your project and node_modules.

Key Features:

  • Cross-platform path resolution
  • Node modules discovery
  • Dynamic import support
  • Project root (@/) path shortcuts

Type Safety

The library is built with TypeScript and provides comprehensive type definitions. All components support generic types for enhanced type safety:

// Type-safe nested data
type ConfigMap = {
  database: { host: string; port: number };
  cache: { ttl: number };
};
const config = new Nest<ConfigMap>();

// Type-safe event handling
type EventMap = {
  'user-login': [string, Date];
  'data-update': [object];
};
const emitter = new EventEmitter<EventMap>();

// Type-safe queue operations
const queue = new TaskQueue<[number, string]>();

Browser Compatibility

Most components work in both Node.js and browser environments:

  • Nest - Full browser support
  • EventEmitter - Full browser support
  • Exception - Full browser support
  • Queue - Full browser support
  • ⚠️ FileLoader/NodeFS - Node.js only