<commit_before># Typescript-injector-lite

A light dependency injection framework utilizing typescript annotations.

- No binding
- No bootstrapping
- Deferred dependency resolution and injection

## Service
A class annotated as a `service` will be injected as a singleton instance, and shared between all instances that require it.

```javascript
import * as Injector from "typescript-injector-lite";

@Injector.service()
export class A {
    constructor(){}
}
```

## Factory
A class annotated as a `factory` will be injected as a new instance every time it is require.
- An optional alias lets you choose a second name to use to inject the class.

```javascript
import * as Injector from "typescript-injector-lite";

@Injector.factory('my:B')
export class B {
    constructor(){}<commit_msg>added install to readme<commit_after># Typescript-injector-lite

A light dependency injection framework utilizing typescript annotations.

- No binding
- No bootstrapping
- Deferred dependency resolution and injection

## Install

```
npm i typescript-injector-lite -save
```


## Service
A class annotated as a `service` will be injected as a singleton instance, and shared between all instances that require it.

```javascript
import * as Injector from "typescript-injector-lite";

@Injector.service()
export class A {
    constructor(){}
}
```

## Factory
A class annotated as a `factory` will be injected as a new instance every time it is require.
- An optional alias lets you choose a second name to use to inject the class.

```javascript
import * as Injector from "typescript-injector-lite";

@Injector.factory('my:B')
export class B {
    constructor(){}
{'fraction_non_alphanumeric': 0.08630054315027158, 'fraction_numerical': 0.0, 'mean_word_length': 4.563758389261745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7091593', 'n_tokens_mistral': 473, 'n_tokens_neox': 442, 'n_words': 201}