0.0.5 ā¢ Published 12 months ago
@nano-di/core v0.0.5
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
ReflectMetadata
support
ā®ļø 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-di
when you need to run integration tests. No pain inflicted, guaranteed.