Skip to content

A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.

License

Notifications You must be signed in to change notification settings

inversify/monorepo

NPM version NPM Downloads Docs Codecov

GitHub stars Discord Server

Inversify social

πŸ“• Documentation

About

InversifyJS is a lightweight inversion of control (IoC) container for TypeScript and JavaScript apps. An IoC container uses a class constructor to identify and inject its dependencies. InversifyJS has a friendly API and encourages the usage of the best OOP and IoC practices.

Motivation

JavaScript now supports object oriented (OO) programming with class based inheritance. These features are great but the truth is that they are also dangerous.

We need a good OO design (SOLID, Composite Reuse, etc.) to protect ourselves from these threats. The problem is that OO design is difficult and that is exactly why we created InversifyJS.

InversifyJS is a tool that helps JavaScript developers write code with good OO design.

Philosophy

InversifyJS has been developed with 4 main goals:

  1. Allow JavaScript developers to write code that adheres to the SOLID principles.

  2. Facilitate and encourage the adherence to the best OOP and IoC practices.

  3. Add as little runtime overhead as possible.

  4. Provide a state of the art development experience.

Testimonies

Nate Kohari - Author of Ninject

"Nice work! I've taken a couple shots at creating DI frameworks for JavaScript and TypeScript, but the lack of RTTI really hinders things. The ES7 metadata gets us part of the way there (as you've discovered). Keep up the great work!"

Michel Weststrate - Author of MobX

Dependency injection like InversifyJS works nicely

Some companies using InversifyJS

Microsoft logo Facebook logo AWS Amplify logo Elastic logo Ledger logo Slack logo Baidu logo iMdada logo Plain Concepts logo Lonely Planet logo Jincor logo Web Computing logo DC/OS logo TypeFox logo Code4 Romania logo Australian Taxation Office logo Kane & Oh logo Particl logo Slackmap logo GO1 logo Stellwagen Group logo EDRLab logo Goodgame Studios logo Freshfox logo Schuberg Philis logo

Acknowledgements

Thanks a lot to all the contributors, all the developers out there using InversifyJS and all those that help us to spread the word by sharing content about InversifyJS online. Without your feedback and support this project would not be possible.