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

@wessberg/di

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wessberg/di

A Dependency-Injection container that holds services and can produce instances of them as required. It mimics reflection by parsing the app at compile-time and supporting the generic-reflection syntax.

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
581
decreased by-9.36%
Maintainers
1
Weekly downloads
 
Created
Source

DI (Dependency Injector) NPM version

A Dependency-Injection container that holds services and can produce instances of them as required. It mimics reflection by parsing the app at compile-time and supporting the generic-reflection syntax.

Installation

Simply do: npm install @wessberg/di.

Usage

import {DIContainer} from "@wessberg/di";
DIContainer.registerSingleton<IFoo, Foo>();
DIContainer.registerTransient<IBar, Bar>();
DIContainer.get<IBar>(); // Retrieves a concrete instance of the IBar service.

// And so on...

Changelog:

v1.0.7:

  • Bumped CodeAnalyzer dependency to v1.0.5.

v1.0.6:

  • Bumped CodeAnalyzer dependency to v1.0.4.

v1.0.5:

  • Bumped CodeAnalyzer dependency to v1.0.2.

v1.0.3:

  • Upgraded to newest version of 'CodeAnalyzer' and refactored all around.

v1.0.1:

  • Fixed a bug where 'hasAltered' would always be false. Cleanup. Added typings to .gitignore and .npmignore.

v1.0.0:

  • First release.

Keywords

FAQs

Package last updated on 18 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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