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

@ereo/core

v0.2.16

Published

Core framework package for EreoJS providing the application container, request context, plugin system, caching, environment variables, and type definitions.

Downloads

7,633

Readme

@ereo/core

Core framework package for EreoJS providing the application container, request context, plugin system, caching, environment variables, and type definitions.

Installation

bun add @ereo/core

Quick Start

import { createApp, defineConfig, definePlugin } from '@ereo/core';

// Create application with configuration
const app = createApp({
  config: defineConfig({
    server: {
      port: 3000,
      hostname: 'localhost',
    },
  }),
});

// Define a custom plugin
const analyticsPlugin = definePlugin({
  name: 'analytics',
  setup(context) {
    console.log('Analytics initialized in', context.mode, 'mode');
  },
});

// Register the plugin
app.use(analyticsPlugin);

// Start the server
await app.start();

Key Features

  • Application Container - Create and configure EreoJS applications with createApp and defineConfig
  • Request Context - Access request-scoped data with createContext, getContext, and attachContext
  • Plugin System - Extend functionality with definePlugin and composePlugins
  • Environment Variables - Type-safe env management with schema builders (env.string(), env.number(), etc.)
  • Unified Cache Interface - Flexible caching with createCache, createTaggedCache, and tag-based invalidation
  • Full TypeScript Support - Comprehensive type definitions for routes, loaders, actions, middleware, and more

Request Context

import { createContext, getContext, attachContext } from '@ereo/core';

// Create a request-scoped context from an incoming request
const ctx = createContext(request);

// Store data in the context
ctx.set('userId', '123');
ctx.get('userId'); // '123'

// Attach context to a request for downstream access
attachContext(request, ctx);

// Later, retrieve it
const ctx2 = getContext(request);
ctx2?.get('userId'); // '123'

Environment Variables

import { env, setupEnv, typedEnv } from '@ereo/core';

// Define environment schema
const envSchema = {
  DATABASE_URL: env.string().required(),
  PORT: env.port().default(3000),
  DEBUG: env.boolean().default(false),
  NODE_ENV: env.enum(['development', 'production', 'test']).default('development'),
};

// Validate and load environment
const result = await setupEnv('.', envSchema, 'development');

if (result.valid) {
  // Access typed environment variables
  const port = typedEnv.PORT; // number
}

Caching

import { createTaggedCache } from '@ereo/core';

const cache = createTaggedCache({ maxSize: 1000 });

// Set with tags for grouped invalidation
await cache.set('user:123', userData, {
  ttl: 3600,
  tags: ['users', 'user:123']
});

// Invalidate all entries with a tag
await cache.invalidateTag('users');

Documentation

For full documentation, visit https://ereojs.dev/docs/core

Part of EreoJS

This package is part of the EreoJS monorepo - a modern full-stack framework built for Bun.

License

MIT