@nano-di/core
v0.0.5
Published
A tiny tool to improve DX when writing (and more importantly **testing**) Object-Oriented typescript code.
Readme
nano-di
A tiny tool to improve DX when writing (and more importantly testing) Object-Oriented typescript code.
✅ Tiny footprint, good practices baked in
- 🦥 Lazy instantiation automagically prevents unncessary instantiation of unused dependencies.
- 🐔 Once instantiated the dependency is remembered and reused for all subsequent calls
✅ Explicit dependency declaration without the work for it.
- ☢️ No need to fumble with decorators
- 🤡 No need to manually declare single-use interfaces
- 🤯 No need to bend your mind around injection Containers
- 🥳 No special notation for injectable classes. All classes are fair game.
- Runs anywhere JS runs, no need for
ReflectMetadatasupport
☮️ Aiming for the testing Zen
- 🏋️ No need to fumble around to remember that are the dependencies of the class you're testing. Explicit dependencies mean typescript can now remember you
- 🌠 Developer-first architecture - Optional explicit dependency method declaration means you can now keep things under (some) control even in large codebases
- 😱 Lower the pain of having to manually stub and clean dependencies.
✅ Batteries included, easily replaceable
- Adapters for Jest and Mocha work out of the box. Integration your own is just a piece of cake.
- Easily disable
nano-diwhen you need to run integration tests. No pain inflicted, guaranteed.
