1.1.11 • Published 9 months ago

@sagifire/di-container v1.1.11

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

@sagifire/di-container

This library implements a simple Inversion of Control (IoC) container with support for various object types and lifetimes, compatible with both JavaScript and TypeScript.

Overview

A minimalistic IoC container for managing dependencies in your application. It provides Container, asValue, asClass, asFunction, and asFactory helpers.

Why Choose @sagifire/di-container?

  • Simplicity: Get started quickly with a straightforward API. No complex configuration or steep learning curve.
  • Lightweight: Minimal footprint, ideal for projects where bundle size matters.
  • Flexibility: Supports various registration types (values, classes, functions, factories) and lifetimes.
  • Asynchronous Ready: Built-in support for async factories and dependency resolution.
  • TypeScript Friendly: Offers strong typing support when used with TypeScript.
  • Reliable: Works seamlessly with code obfuscation and minification.

If you need a simple, reliable, and flexible IoC container without the overhead of larger frameworks, @sagifire/di-container is an excellent choice.

Documentation

For detailed usage instructions and examples, please refer to the specific guides:

These guides cover:

  • Container creation and component registration (register)
  • Component types (asValue, asClass, asFunction, asFactory)
  • Lifetimes (LIFETIME_SINGLETON, LIFETIME_DYNAMIC)
  • Defining and injecting dependencies (_deps, deps)
  • Using asynchronous factories
  • Building instances outside the container (build)
  • Handling inheritance
1.1.1

9 months ago

1.1.0

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.11

9 months ago

1.1.10

9 months ago

1.0.0

1 year ago