A framework-agnostic dependency container.
$ npm add @aldojs/containerlet{ createContainer }=require('@aldojs/container')letcontainer=createContainer()// add a `foo` factorycontainer.bind('foo',(c)=>({foo: true}))// later, create `foo` objectletobj=container.make('foo')Check a bind is already defined.
Add an new factory into the container.
Bind a singleton factory to make a singleton instances.
Create and return the service instance, passing the additional arguments.
Each function given to bind or singleton as second parameter should have the following signature
functionFactory=(c: Container, ...args: any[])=> any;