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

@wyrly/core

v2.2.1

Published

Type-safe dependency injection for modern TypeScript without reflect-metadata

Readme

@wyrly/core

Type-safe dependency injection for modern TypeScript. No reflect-metadata, no emitDecoratorMetadata, no parameter decorators.

Use @wyrly/core when you want explicit dependencies, typed tokens, standard decorators, request scopes, and inspectable dependency graphs without framework lock-in.

Runtimes: Deno 2.x (JSR) · Node.js 20+ / Bun (npm)

Japanese: README.ja.md

When to choose Wyrly DI

  • You want TypeScript DI that works with standard decorators instead of legacy decorator metadata.
  • You want interface-based dependencies to stay type-safe through typed tokens.
  • You need request scopes for Next.js, Hono, Express, Fresh, GraphQL, or another web runtime.
  • You want to inspect and validate the dependency graph in CI.
  • You prefer composition roots and explicit wiring for DDD / Clean Architecture.

Runtimes

| Runtime | Registry | Import | | ------------ | ------------------------------------------------ | ------------------------ | | Deno 2.x | JSR @wyrly/core | jsr:@wyrly/core@^2.0.0 | | Node.js 20+ | npm | @wyrly/core | | Bun | npm (same package) | @wyrly/core |

Published to JSR and npm from the same source. Deno users should prefer JSR; Node/Bun users use npm.

Install (Deno / JSR)

// deno.json
{
  "imports": {
    "@wyrly/core": "jsr:@wyrly/core@^2.0.0"
  }
}
# or add with Deno 2.x
deno add jsr:@wyrly/core
import { createContainer, Injectable, token } from "@wyrly/core";

See also on jsr.io/@wyrly/core.

Install (Node.js / Bun / npm)

npm install @wyrly/core
# bun add @wyrly/core
import { createContainer, Injectable, token } from "@wyrly/core";

Requirements

  • TypeScript 5+ with standard (TC39) decorators (experimentalDecorators: false)
  • ESM ("type": "module" recommended on Node/Bun)
  • Deno 2.x, Node.js 20+, Bun, or bundlers that support the above

No reflect-metadata, no emitDecoratorMetadata, no parameter decorators.

Quick start

import { createContainer, Injectable, token } from "@wyrly/core";

const RepoToken = token<{ findById(id: string): Promise<unknown> }>("Repo");

@Injectable({ deps: [RepoToken], lifetime: "scoped" })
class GetUser {
  constructor(private readonly repo: { findById(id: string): Promise<unknown> }) {}
}

const container = createContainer();
container.register(RepoToken, {
  useValue: { findById: async () => null },
  lifetime: "scoped",
});
container.register(GetUser);

const scope = container.createScope();
try {
  scope.resolve(GetUser);
} finally {
  await scope.dispose();
}

Documentation

Related packages

| Package | Deno (JSR) | npm | Description | | ---------------- | ---------- | --- | --------------------------------- | | @wyrly/core | yes | yes | Core container, tokens, lifetimes | | @wyrly/express | yes | yes | Express 5 middleware | | @wyrly/hono | yes | yes | Hono middleware | | @wyrly/graphql | yes | yes | GraphQL request scope | | @wyrly/next | yes | yes | Next.js App Router | | @wyrly/fresh | yes | — | Fresh 2.x (JSR only) |

License

Apache-2.0 — see LICENSE.