@stone-js/service-container 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](https://www.npmjs.com/package/@stone-js/service-container)
|
|
5
5
|
[](https://www.npmjs.com/package/@stone-js/service-container)
|
|
6
|
-

|
|
7
7
|
[](https://github.com/stone-foundation/stone-js-service-container/actions/workflows/main.yml)
|
|
8
8
|
[](https://github.com/stone-foundation/stone-js-service-container/actions/workflows/release.yml)
|
|
9
9
|
[](https://sonarcloud.io/summary/new_code?id=stone-foundation_stone-js-service-container)
|
package/dist/index.js
CHANGED
|
@@ -539,7 +539,7 @@ class Container extends Proxiable {
|
|
|
539
539
|
if (!this.bound(key)) {
|
|
540
540
|
if (typeof value === 'function') {
|
|
541
541
|
const callable = value;
|
|
542
|
-
const resolver = Object.
|
|
542
|
+
const resolver = Object.prototype.hasOwnProperty.call(callable, 'prototype')
|
|
543
543
|
? (container) => new callable.prototype.constructor(container)
|
|
544
544
|
: (container) => callable(container);
|
|
545
545
|
singleton ? this.singleton(key, resolver) : this.binding(key, resolver);
|
package/package.json
CHANGED