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

@discordx/di

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@discordx/di - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

16

build/cjs/index.js

@@ -34,7 +34,7 @@ "use strict";

addService(classType) {
const myClass = classType;
DIService._ServiceSet.add(myClass);
const clazz = classType;
DIService._ServiceSet.add(clazz);
if (DIService.container) {
if (this.isTsyringe(DIService.container)) {
DIService.container.registerSingleton(myClass);
DIService.container.registerSingleton(clazz);
}

@@ -46,15 +46,15 @@ else {

*/
(0, typedi_1.Service)()(myClass);
(0, typedi_1.Service)()(clazz);
}
}
else {
const instance = new myClass();
this._services.set(myClass, instance);
const instance = new clazz();
this._services.set(clazz, instance);
}
}
getService(classType) {
const myClass = classType;
const clazz = classType;
if (DIService.container) {
if (this.isTsyringe(DIService.container)) {
return DIService.container.resolve(myClass);
return DIService.container.resolve(clazz);
}

@@ -61,0 +61,0 @@ return DIService.container.get(classType);

@@ -31,7 +31,7 @@ import { Service } from "typedi";

addService(classType) {
const myClass = classType;
DIService._ServiceSet.add(myClass);
const clazz = classType;
DIService._ServiceSet.add(clazz);
if (DIService.container) {
if (this.isTsyringe(DIService.container)) {
DIService.container.registerSingleton(myClass);
DIService.container.registerSingleton(clazz);
}

@@ -43,15 +43,15 @@ else {

*/
Service()(myClass);
Service()(clazz);
}
}
else {
const instance = new myClass();
this._services.set(myClass, instance);
const instance = new clazz();
this._services.set(clazz, instance);
}
}
getService(classType) {
const myClass = classType;
const clazz = classType;
if (DIService.container) {
if (this.isTsyringe(DIService.container)) {
return DIService.container.resolve(myClass);
return DIService.container.resolve(clazz);
}

@@ -58,0 +58,0 @@ return DIService.container.get(classType);

{
"name": "@discordx/di",
"version": "2.0.0",
"version": "2.0.1",
"private": false,

@@ -5,0 +5,0 @@ "description": "dependency injection service with TSyringe support",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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