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

true-di

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

true-di - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "true-di",
"version": "2.0.1",
"version": "2.0.2",
"description": "Simple Dependency Injection solution for TypeScript and Javascript",

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

@@ -12,2 +12,4 @@ import UniqueStack from './unique-stack';

) => <N extends keyof C>(container: C, name: N): C[N] => {
if (instances.has(name)) return instances.get(name);
if (stack.push(name)[0] != null) {

@@ -14,0 +16,0 @@ throw new Error('Cyclic dependencies couldn\'t be resolved.');

@@ -40,5 +40,3 @@ import createInstanceFactory from './create-instance';

enumerable: Object.getOwnPropertyDescriptor(factories, name).enumerable,
get: () => (
instances.has(name) ? instances.get(name) : createInstance(container, name)
),
get: () => createInstance(container, name),
set: (value: null | undefined) => {

@@ -45,0 +43,0 @@ if (value != null) {

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