In my free time I have been working on a few standalone libraries for personal use, and had quite some boilerplate to setup the object dependency tree that I needed within the scope of the library.

There are varying opinions on whether Javascript needs dependency injection. Instead of arguing about it, I decided to write a small but powerful enough ioc npm module that provides simple ioc for my needs. If you’re using Typescript, then InversifyJS already offers what you need, but in my case I‘m just using JS.

The npm library can be installed through:

npm i -S es-ioc

Kim Gysen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store