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

env-seal

v0.0.6

Published

Strict, zero-dependency environment schema validator for Node, Deno, and Bun.

Downloads

240

Readme

env-seal

The strictest, zero-dependency environment validator.

Support for Node.js, Deno, Bun, and Edge Runtimes.

npm version License: MIT

Why Env-Seal?

Most environment libraries are either too loose (runtime crashes) or too heavy (dependencies). env-seal is designed for production-grade reliability.

  • Zero Dependencies: Keeps your node_modules clean.
  • Strict Typing: TypeScript first. Returns a strictly typed configuration object.
  • Secure: Secrets are properly redacted from logs (console.log) and output (JSON.stringify).
  • Granular Validation: Chainable rules for Email, URL, Min/Max, and Regex.
  • Native .env Support: Built-in zero-dependency .env parser (optional).
  • Auto-Docs: Generate markdown tables for your schema automatically.

Installation

npm install env-seal
# or
pnpm add env-seal
# or
bun add env-seal
# or
deno add npm:env-seal

Quick Start

import { define, e } from 'env-seal';

// 1. Define your schema
const config = define({
  PORT: e.number().default(3000),
  NODE_ENV: e.string().default('development'),
  API_KEY: e.string().secret(), // Required + Hidden from logs
  CONTACT_EMAIL: e.string().email(),
  SITE_URL: e.string().url(),
}, { 
  loadDotEnv: true // Optional: Load .env file
});

// 2. Use it! (Type-safe)
console.log(`Server running on port ${config.PORT}`);
// config.API_KEY is available here, but hidden if you log the whole object.

Features

🛡️ Granular Validation

Validate your inputs with precise rules:

| Rule | Description | Example | | :--- | :--- | :--- | | .email() | Validates email format | e.string().email() | | .url() | Validates URL format | e.string().url() | | .min(n) | Min value (number) or length (string) | e.number().min(10) | | .max(n) | Max value (number) or length (string) | e.string().max(100) | | .regex(re) | Custom pattern matching | e.string().regex(/^[a-z]+$/) |

🔒 Security & Redaction

Mark sensitive variables with .secret().

  • Accessible in code: config.API_KEY works fine.
  • Hidden in logs: console.log(config) shows [REDACTED].
  • Hidden in JSON: JSON.stringify(config) shows [REDACTED].

📄 Documentation Generator

Generate a Markdown table of your environment variables for your README.md or llms.txt.

import { generateMarkdown } from 'env-seal';

const md = generateMarkdown(schema);
console.log(md);

Output:

| Variable | Type | Required | Default | Rules | | :--- | :--- | :--- | :--- | :--- | | PORT | number | No | 3000 | - | | API_KEY | string | Yes | [REDACTED] | (Secret) |

Example Schema Docs

Run generateMarkdown(schema) to automatically produce tables like this:

Environment Variables

| Variable | Type | Required | Default | Rules | | :--- | :--- | :--- | :--- | :--- | | APP_NAME | string | No | My App | - | | PORT | number | No | 3000 | - | | DATABASE_URL | string | Yes | - | (Secret) | | ADMIN_EMAIL | string | Yes | - | Email | | MAX_CONNECTIONS | number | Yes | - | Min: 1, Max: 100 |

License

MIT