Socket
Socket
Sign inDemoInstall

@aesop-fables/containr

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aesop-fables/containr - npm Package Compare versions

Comparing version 0.5.3 to 0.6.1

2

lib/Container.js

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

singleton(key, value) {
return this.push(key, new Dependencies_1.ValueFactoryDependency(key, value), Scopes_1.Scopes.Singleton);
return this.push(key, new Dependencies_1.SingletonDependency(key, value), Scopes_1.Scopes.Singleton);
}

@@ -100,0 +100,0 @@ /**

@@ -15,2 +15,9 @@ import { IServiceContainer, ValueFactoryDelegate } from './IServiceContainer';

}
export declare class SingletonDependency<T> implements IDependency<T> {
readonly key: string;
private readonly value;
constructor(key: string, value: T);
resolveValue(): T;
clone(): IDependency<T>;
}
export declare class ArrayDependency<T> implements IDependency<T[]> {

@@ -17,0 +24,0 @@ readonly key: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContainerDependency = exports.UnknownDependency = exports.ArrayDependency = exports.ValueFactoryDependency = void 0;
exports.ContainerDependency = exports.UnknownDependency = exports.ArrayDependency = exports.SingletonDependency = exports.ValueFactoryDependency = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */

@@ -33,2 +33,15 @@ const Constants_1 = require("./Constants");

exports.ValueFactoryDependency = ValueFactoryDependency;
class SingletonDependency {
constructor(key, value) {
this.key = key;
this.value = value;
}
resolveValue() {
return this.value;
}
clone() {
return this;
}
}
exports.SingletonDependency = SingletonDependency;
class ArrayDependency {

@@ -35,0 +48,0 @@ constructor(key, values = []) {

{
"name": "@aesop-fables/containr",
"version": "0.5.3",
"version": "0.6.1",
"description": "Inversion of Control container for Typescript",

@@ -23,3 +23,3 @@ "type": "commonjs",

"preversion": "npm run lint",
"version": "0.5.3",
"version": "0.6.1",
"postversion": "git push && git push --tags"

@@ -26,0 +26,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