Browse Source

enhancements

develop
garrettmills 2 years ago
parent
commit
5471ed09fb
  1. 1
      src/Container.js
  2. 4
      src/DependencyInjector.js

1
src/Container.js

@ -47,6 +47,7 @@ class Container {
}
__is_injectable(Class) {
console.log('WARNING: use of flitter-di/Container#__is_injectable is deprecated and will be removed in the future')
return (
Class.services
&& Array.isArray(Class.services)

4
src/DependencyInjector.js

@ -19,6 +19,10 @@ class DependencyInjector {
}
has(name) {
if ( Array.isArray(name) ) {
return name.some(x => this.container.has(x))
}
return this.container.has(name)
}

Loading…
Cancel
Save