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

@novx/core

v0.3.0

Published

DI and AOP library

Readme

Novx Core

The core library covers several aspects

  • a combined di and aop solution
  • tracing functions
  • configuration values handling
  • basic language features and functions
  • error handling logic

Let's look at a simple di example first.

import { Environment, Module, injectable, onRunning} from '@novx/core';

class Bar {}

@injectable()
class Foo {
  constructor(private bar: Bar) {}
}

@module()
class TestModule extends Module {
  @create()
  createBar() : Bar {
     return new Bar()
  }
  
  @onRunning()
  async start() : Promise<void> {
    console.log("run, forrest...")
  }
}

// start container

const environment = new Environment({module: TestModule});
await environment.start();

const foo = environment.get(Foo)

Ok, kind of looks familiar, but of course there is much more:

  • different - pluggable - scopes
  • factory functions
  • post processors
  • lifecycle methods
  • pluggable parameter decorators used for injections
  • hierarchical environments

And the biggest advantage in contrast to all other solutions, it has an integrated aop mechanism.

@injectable()
class Aspects {}
    @around(methods().of(Service).thatAreAsync())
    async aroundMethod(invocation: Invocation): Promise<any> {
        ...
        try {
            return await invocation.proceed()
        } 
        finally {
            ...
        }
    }

    @after(methods().named("foo"))
    afterMethod(invocation: Invocation) {
        ...
    }

    @error(methods().of(Service))
    error(invocation: Invocation) {
        ...
    }
}

which totally makes sense, since aspects typically also require injected objects, so its a perfect fit.

Comparing it with the biggest competitors, claude created this matrix:

Dependency Injection

| Feature | This Framework | InversifyJS | TSyringe | TypeDI | NestJS DI | Awilix | |---|:---:|:---:|:---:|:---:|:---:|:---:| | Decorator-based registration | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | Constructor injection | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Method / setter injection | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | Factory method (@create) | ✅ | ⚠️ manual | ❌ | ⚠️ manual | ✅ | ✅ | | Singleton scope | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Request / transient scope | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Environment scope | ✅ | ❌ | ❌ | ❌ | ⚠️ custom | ❌ | | Custom scopes | ✅ @scope | ✅ | ❌ | ❌ | ⚠️ partial | ✅ | | Parent / child environments | ✅ | ⚠️ containers | ❌ | ❌ | ✅ modules | ❌ | | Module system | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | | Multi-module isolation | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | | Cycle detection at startup | ✅ | ⚠️ partial | ❌ | ❌ | ✅ | ⚠️ | | Eager instantiation | ✅ | ⚠️ manual | ❌ | ❌ | ✅ | ❌ | | ON_INJECT lifecycle | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | | ON_INIT lifecycle | ✅ | ❌ | ❌ | ❌ | ✅ OnModuleInit | ❌ | | ON_RUNNING lifecycle | ✅ | ❌ | ❌ | ❌ | ✅ OnApplicationBootstrap | ❌ | | ON_DESTROY lifecycle | ✅ | ❌ | ❌ | ❌ | ✅ OnModuleDestroy | ❌ | | Async lifecycle | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | | Custom annotation resolvers | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | | reflect-metadata free | ❌* | ❌ | ❌ | ❌ | ❌ | ✅ | | Zero dependencies | ✅ (core) | ❌ | ❌ | ❌ | ❌ | ⚠️ |

*Uses own TypeDescriptor registry; reflect-metadata is used only for annotation params in AOP.

Aspect-Oriented Programming

| Feature | This Framework | InversifyJS | TSyringe | TypeDI | NestJS DI | AspectJS | |---|:---:|:---:|:---:|:---:|:---:|:---:| | Before advice | ✅ | ❌ | ❌ | ❌ | ⚠️ interceptors | ✅ | | After advice | ✅ | ❌ | ❌ | ❌ | ⚠️ interceptors | ✅ | | Around advice | ✅ | ❌ | ❌ | ❌ | ✅ interceptors | ✅ | | Error advice | ✅ | ❌ | ❌ | ❌ | ⚠️ exception filters | ✅ | | Async-aware around | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | | Fluent pointcut DSL | ✅ | ❌ | ❌ | ❌ | ❌ | ⚠️ | | Method name matching | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | | Regex matching | ✅ .matching("...") | ❌ | ❌ | ❌ | ❌ | ⚠️ | | Async-only targeting | ✅ .thatAreAsync() | ❌ | ❌ | ❌ | ❌ | ❌ | | Class-scoped pointcut | ✅ .of(Class) | ❌ | ❌ | ❌ | ❌ | ✅ | | Aspects are DI singletons | ✅ | ❌ | ❌ | ❌ | ✅ (providers) | ❌ | | Injected aspect state | ✅ this.message etc. | ❌ | ❌ | ❌ | ✅ | ❌ | | Invocation object | ✅ | ❌ | ❌ | ❌ | ✅ ExecutionContext | ✅ |