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

@loke/di-ioc

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loke/di-ioc - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

29

lib/router.js

@@ -21,2 +21,4 @@ 'use strict';

class Router {
static FUNCTION_CALL = Symbol('function-call');
static CONSTRUCTOR_CALL = Symbol('constructor-call');
/**

@@ -330,3 +332,6 @@ * Creates a new Router

if (typeof newInstance !== 'object' || newInstance === null) {
if (
(typeof newInstance !== 'object' || newInstance === null) &&
typeof newInstance !== 'function'
) {
emitter.emit('service-unproxyable', { name: longName.join('.') });

@@ -347,2 +352,24 @@ return newInstance;

},
apply: (target, thisArg, args) => {
if (!accessedProps.has(super.FUNCTION_CALL)) {
accessedProps.add(super.FUNCTION_CALL);
emitter.emit('service-used', {
name: longName.join('.'),
prop: Router.FUNCTION_CALL,
});
}
return Reflect.apply(target, thisArg, args);
},
construct: (target, args) => {
if (!accessedProps.has(super.CONSTRUCTOR_CALL)) {
accessedProps.add(super.CONSTRUCTOR_CALL);
emitter.emit('service-used', {
name: longName.join('.'),
prop: Router.CONSTRUCTOR_CALL,
});
}
return Reflect.construct(target, args);
},
});

@@ -349,0 +376,0 @@ };

6

package.json
{
"name": "@loke/di-ioc",
"version": "2.1.0",
"version": "2.2.0",
"description": "Node.js dependency injection.",

@@ -12,3 +12,3 @@ "main": "lib/index.js",

"engines": {
"node": ">=6.0.0"
"node": ">=18.0.0"
},

@@ -22,3 +22,3 @@ "author": "Anthony Foster + LOKE",

"devDependencies": {
"eslint": "^4.8.0",
"eslint": "^8.34.0",
"expect": "^1.20.2",

@@ -25,0 +25,0 @@ "mocha": "^3.2.0",

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