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

cheap-di

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheap-di - npm Package Compare versions

Comparing version 4.0.0-rc-5 to 4.0.0-rc-6

dist/cjs/__tests/ContainerImpl.test.js

7

package.json
{
"name": "cheap-di",
"description": "TypeScript dependency injection like Autofac in .Net",
"version": "4.0.0-rc-5",
"version": "4.0.0-rc-6",
"scripts": {

@@ -23,2 +23,3 @@ "compile": "tsc --build tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",

},
"files": ["dist/**/*", ",package.json", "README.md"],
"main": "./dist/cjs/index.js",

@@ -29,7 +30,7 @@ "module": "./dist/esm/index.js",

"type": "git",
"url": "git+https://github.com/TomasLight/cheap-di.git"
"url": "git+https://github.com/tomas-light/cheap-di.git"
},
"author": "TomasLight",
"license": "MIT",
"homepage": "https://github.com/TomasLight/cheap-di#readme",
"homepage": "https://github.com/tomas-light/cheap-di#readme",
"keywords": [

@@ -36,0 +37,0 @@ "dependency",

@@ -42,3 +42,3 @@ # cheap-di

const myLogPrefix = 'INFO: ';
container.registerType(ConsoleLogger).as(Logger).with(myLogPrefix);
container.registerImplementation(ConsoleLogger).as(Logger).inject(myLogPrefix);

@@ -78,2 +78,3 @@ // somewhere in inside your code

@inject(InfoLogger)
class Service {

@@ -91,6 +92,6 @@ constructor(private logger: InfoLogger) {}

const infoPrefix = 'INFO: ';
container.registerType(ConsoleLogger).as(InfoLogger).with(infoPrefix);
container.registerImplementation(ConsoleLogger).as(InfoLogger).inject(infoPrefix);
const errorPrefix = 'ERROR: ';
container.registerType(ConsoleLogger).as(ErrorLogger).with(errorPrefix);
container.registerImplementation(ConsoleLogger).as(ErrorLogger).inject(errorPrefix);

@@ -97,0 +98,0 @@ // somewhere in inside your code

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