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

@aliaksandarpratashchyk/ie

v1.0.0

Published

Runtime type definitions with conversion, decorators, and snapshots for TypeScript.

Readme

I.E. (Id Est)

Tests Coverage

Runtime type definitions for TypeScript with validation, target-based conversions, and decorator-powered metadata.

Features

  • Runtime types for primitives, objects, tuples, unions, literals, enumerations, arrays, binary data, dates, and constructable classes.
  • Validate unknown values at runtime via type.is(value).
  • Convert values to/from well-known targets (for example json and shallowSnapshot) via type.to.<target> / type.from.<target>.
  • Decorate class properties/parameters with runtime types and build a constructable type from metadata.

Installation

npm install @aliaksandarpratashchyk/ie

Quick start

import ie from '@aliaksandarpratashchyk/ie';

const userType = ie.object({
  id: ie.string,
  age: ie.optional.number,
  tags: ie.array.string,
});

const user = {
  id: '42',
  age: undefined,
  tags: ['admin'],
};

if (!userType.is(user)) throw new Error('Invalid user');

const jsonSnapshot = userType.to.json(user);
const rehydrated = userType.from.json(jsonSnapshot);

Conversions

Each built-in type lists which targets it supports (for example, ie.number.from.string('42') or ie.bigint.to.string(42n)):

import ie from '@aliaksandarpratashchyk/ie';

const n = ie.number.from.string('42');
const s = ie.bigint.to.string(42n);

Decorators

Attribute helpers let you attach runtime types to class properties or parameters:

import ie from '@aliaksandarpratashchyk/ie';
import { number, optional, string } from '@aliaksandarpratashchyk/ie/attributes';

class User {
  @string
  name!: string;

  @number
  score!: number;

  @optional.string
  bio?: string;
}

const userType = ie.constructable(User);

Built-in types

  • Primitives: ie.string, ie.number, ie.boolean, ie.bigint, ie.date, ie.null, ie.undefined
  • Binary: ie.binary (a Uint8Array / Node.js Buffer; ie.binary.to.json uses base64)
  • Wrappers: ie.optional(type) / ie.nullable(type) (also available as ie.optional.string, ie.nullable.number, ...)
  • Collections: ie.array(type), ie.tuple(...), ie.union(...), ie.object(schema)
  • Literals/enumerations: ie.literal(value), ie.enumeration(...)
  • Classes: ie.constructable(SomeClass)

See ie.api.md for the full public surface (generated by API Extractor).

Scripts

  • npm test — run the Jest suite, regenerate COVERAGE.md, and update coverage.svg.
  • npm run build — bundle the library and regenerate API docs (docs/).
  • npm run lint / npm run format — lint and format the codebase.

Publishing

GitHub Actions runs tests on pushes/PRs and publishes to npm when the version in package.json changes on main. Set NPM_TOKEN in repository secrets to enable publishing.