New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tanbo/di

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanbo/di - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

19

bundles/core/reflective-injector.js

@@ -27,3 +27,2 @@ import { InjectFlags, Injector } from './injector';

}
let reflectiveValue = notFoundValue;
for (let i = 0; i < this.normalizedProviders.length; i++) {

@@ -36,20 +35,14 @@ const { provide, deps, factory } = this.normalizedProviders[i];

const params = this.resolveDeps(deps || [], notFoundValue);
reflectiveValue = ff(...params);
let reflectiveValue = ff(...params);
this.reflectiveValues.set(token, reflectiveValue);
break;
return reflectiveValue;
}
}
if (reflectiveValue === notFoundValue) {
if (flags === InjectFlags.Self && reflectiveValue === THROW_IF_NOT_FOUND) {
throw reflectiveInjectorErrorFn(token);
}
if (this.parentInjector) {
return this.parentInjector.get(token, notFoundValue, flags);
}
if (flags === InjectFlags.Self && notFoundValue === THROW_IF_NOT_FOUND) {
throw reflectiveInjectorErrorFn(token);
}
if (reflectiveValue === null || typeof reflectiveValue === 'undefined') {
throw reflectiveInjectorErrorFn(token);
if (this.parentInjector) {
return this.parentInjector.get(token, notFoundValue, flags === InjectFlags.Optional ? InjectFlags.Optional : InjectFlags.Default);
}
return reflectiveValue;
throw reflectiveInjectorErrorFn(token);
}

@@ -56,0 +49,0 @@ resolveDeps(deps, notFoundValue) {

{
"name": "@tanbo/di",
"version": "0.0.17",
"version": "0.0.18",
"description": "A dependency injection Library",

@@ -5,0 +5,0 @@ "main": "./bundles/public-api.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc