Pluto should support asynchronous bootstrapping by automatically detecting and resolving promises, then injecting their resolved values when used as a dependency.
Sample usage:
function Greeter(name) {
this.name = name
}
Greeter.prototype.greet = function () {
return `Hello, ${this.name}!`
}
const bind = pluto()
bind('name').toInstance(Promise.resolve('World'))
bind('greeter').toConstructor(Greeter)
const theGreeter = yield bind.get('greeter')
t.is(theGreeter.greet(), 'Hello, World!')
Pluto should support asynchronous bootstrapping by automatically detecting and resolving promises, then injecting their resolved values when used as a dependency.
Sample usage: