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

dont-call-us-well-call-you

v1.0.2

Published

IoC Container

Readme

Don't call us, we'll call you

Is an IoC library for the whole family.

GitHub: https://github.com/stubidoo/dont-call-us-well-call-you

NPM: https://www.npmjs.com/package/dont-call-us-well-call-you

Why we need this?

  • It's the kind of thing that you don't know you need untill you really need it. Say you are building the next killer app, it gets so large and complex that you end up having a complicated mess of components calling each other in any old fashion. This will not scale, the soloution you could be looking for is an IoC library.

How to use

  • First, let's install it:
npm i dont-call-us-well-call-you
let c = new Container()
c.service("SomeClass", (c) => new SomeClass())
  • That's it! you've handed control over to the Container

Throw in some dependencies

let c = new Container()
c.service("SomeDependency", (c) => new SomeDependency())
c.service("SomeClass", (c) => new SomeClass(c.SomeDependency))
  • Now your dependency can be access via the Container

Why developers will love this

  • It's super simple to implement, very few opinions being thrown at you, still structure the important bits the way you want to without having to worry about the mess to follow. Did we mention zero dependencies?

Think I could do with a lesson on how to write code?

  • Submit a pull request!

Worried about breaking changes?

  • Just use a previous version that doesn't suck!

Don't take it from me

Stack-overflow says: The Inversion-of-Control (IoC) pattern, is about providing any kind of callback (which controls reaction), instead of acting ourself directly (in other words, inversion and/or redirecting control to external handler/controller). The Dependency-Injection (DI) pattern is a more specific version of IoC pattern, and is all about removing dependencies from your code.

Inversion of Control: Traditional control flow for a program is when the program only does what we tell it to do (today). Inversion of control flow happens when we develop frameworks or only refer to plugin architecture with areas of code that can be hooked into. In these areas, we might not know (today) how we want it to be used, or we wish to enable developers to add additional functionality. That means that every lifecycle hook in React.js or Angular is a good example of Inversion of Control in practice. IoC is also often explained by the "Hollywood Design Principle": Don't call us, we'll call you. - https://khalilstemmler.com/articles/tutorials/dependency-injection-inversion-explained/

Wikipedia: Inversion of control is used to increase modularity of the program and make it extensible,[1] and has applications in object-oriented programming and other programming paradigms.

more: In traditional programming, the flow of the business logic is determined by objects that are statically bound to one another. With inversion of control, the flow depends on the object graph that is built up during program execution. Such a dynamic flow is made possible by object interactions that are defined through abstractions. This run-time binding is achieved by mechanisms such as dependency injection or a service locator. In IoC, the code could also be linked statically during compilation, but finding the code to execute by reading its description from external configuration instead of with a direct reference in the code itself.

============