A lightweight, feature-complete dependency injection library for JavaScript and TypeScript, extracted from Angular's DI system.
Injection-js is a dependency injection library for JavaScript and TypeScript, extracted from Angular's ReflectiveInjector. It enables developers to manage and inject dependencies in applications outside of the Angular ecosystem, providing a lightweight, reliable solution for projects using Node.js, Vue, React, or vanilla JavaScript. The library solves the problem of needing a robust DI system without the overhead of Angular's full framework.
Developers building applications in JavaScript or TypeScript who need a mature dependency injection system, particularly those working with Node.js, Vue, React, or vanilla JS projects where Angular's DI is not available.
Developers choose Injection-js because it offers Angular's battle-tested dependency injection in a minimal package, ensuring high reliability and feature completeness without framework lock-in. Its small size and compatibility with various environments make it a versatile choice for managing dependencies efficiently.
Dependency injection library for JavaScript and TypeScript in 5.1K. It is an extraction of the Angular's ReflectiveInjector which means that it's well designed, feature complete, fast, reliable and well tested.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Extracted from Angular's ReflectiveInjector, offering a mature, feature-complete, and well-tested dependency injection system inherited from Angular's rigorous design.
Weighs only about 5.2KB, adding negligible size to bundles while providing full DI functionality, making it efficient for various projects.
Works with Node.js, Vue, React, TypeScript, and vanilla JavaScript, as shown in the README examples, ensuring versatility across different frameworks.
Supports child injectors and hierarchical dependency management, enabling modular application design similar to Angular's DI patterns.
Requires polyfills like reflect-metadata for ES5 and TypeScript, adding setup complexity and potential performance overhead in environments without native Reflect support.
Built on Angular's deprecated ReflectiveInjector, which contrasts with modern Angular's static injection and may not align with current best practices or receive updates.
Relies on Angular's documentation from older versions (e.g., v4), which may not fully address non-Angular use cases or provide tailored guidance for other frameworks.