0.0.4 • Published 5 months ago

@bjorkhaug/sdi v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Simple Service Dependency Injection for Deno and Node.js

This module provides a simple service dependency injection system for Deno and Node.js applications.

import { Container, Service } from '@bjorkhaug/sdi'

@Service()
class ServiceA {
  // Your service code here
}

@Service()
class ServiceB {
  constructor(private readonly a: ServiceA) {}
  // Your service code here
}

const myServiceInstance = Container.get(ServiceB)

Note that the typescript compiler must emit metadata for this to work as we rely on typescript metadata features.

0.0.4

5 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago