Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@launchtray/tsyringe-async

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@launchtray/tsyringe-async - npm Package Compare versions

Comparing version 4.3.1 to 4.3.2

2

dist/cjs/factories/instance-caching-factory.js

@@ -8,3 +8,3 @@ "use strict";

if (instance == undefined) {
instance = yield factoryFunc(dependencyContainer);
instance = factoryFunc(dependencyContainer);
}

@@ -11,0 +11,0 @@ return instance;

@@ -11,6 +11,6 @@ "use strict";

if ((previousPredicate = currentPredicate)) {
instance = yield dependencyContainer.resolve(trueConstructor);
instance = dependencyContainer.resolve(trueConstructor);
}
else {
instance = yield dependencyContainer.resolve(falseConstructor);
instance = dependencyContainer.resolve(falseConstructor);
}

@@ -17,0 +17,0 @@ }

@@ -6,3 +6,3 @@ import { __awaiter } from "tslib";

if (instance == undefined) {
instance = yield factoryFunc(dependencyContainer);
instance = factoryFunc(dependencyContainer);
}

@@ -9,0 +9,0 @@ return instance;

@@ -9,6 +9,6 @@ import { __awaiter } from "tslib";

if ((previousPredicate = currentPredicate)) {
instance = yield dependencyContainer.resolve(trueConstructor);
instance = dependencyContainer.resolve(trueConstructor);
}
else {
instance = yield dependencyContainer.resolve(falseConstructor);
instance = dependencyContainer.resolve(falseConstructor);
}

@@ -15,0 +15,0 @@ }

@@ -7,13 +7,8 @@ import { __awaiter, __generator } from "tslib";

return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!(instance == undefined)) return [3, 2];
return [4, factoryFunc(dependencyContainer)];
case 1:
instance = _a.sent();
_a.label = 2;
case 2: return [2, instance];
if (instance == undefined) {
instance = factoryFunc(dependencyContainer);
}
return [2, instance];
});
}); };
}

@@ -10,19 +10,14 @@ import { __awaiter, __generator } from "tslib";

return __generator(this, function (_a) {
switch (_a.label) {
case 0:
currentPredicate = predicate(dependencyContainer);
if (!(!useCaching || previousPredicate !== currentPredicate)) return [3, 4];
if (!(previousPredicate = currentPredicate)) return [3, 2];
return [4, dependencyContainer.resolve(trueConstructor)];
case 1:
instance = _a.sent();
return [3, 4];
case 2: return [4, dependencyContainer.resolve(falseConstructor)];
case 3:
instance = _a.sent();
_a.label = 4;
case 4: return [2, instance];
currentPredicate = predicate(dependencyContainer);
if (!useCaching || previousPredicate !== currentPredicate) {
if ((previousPredicate = currentPredicate)) {
instance = dependencyContainer.resolve(trueConstructor);
}
else {
instance = dependencyContainer.resolve(falseConstructor);
}
}
return [2, instance];
});
}); };
}
{
"name": "@launchtray/tsyringe-async",
"version": "4.3.1",
"version": "4.3.2",
"description": "Lightweight dependency injection container for JavaScript/TypeScript, with asynchronous resolution",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js",

@@ -297,3 +297,3 @@ [![Travis](https://travis-ci.com/launchtray/tsyringe.svg?branch=launchtray-dev)](https://travis-ci.org/github/launchtray/tsyringe/)

```typescript
type FactoryFunction<T> = (dependencyContainer: DependencyContainer) => T;
type FactoryFunction<T> = (dependencyContainer: DependencyContainer) => Promise<T>;
```

@@ -300,0 +300,0 @@

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