Skip to main content

Light dependency injection container for your application.

Works with
It is unknown whether this package works with Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Browsers
JSR Score
100%
Published
4 weeks ago (0.0.7)

With Cargo Assemble you get a simple and light dependency injection container for your project. Its straight forward to use and is suitable for simple use cases like the following:

import { Factory } from "jsr:@cargo/assemble";

const DI = new Factory();

class GreetingService {
   greet(value string) {
     return value;
   }
}
DI.assemble({
  class: GreetingService
});

DI.get(GreetingService);
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add @cargo/assemble

Import symbol

import * as mod from "@cargo/assemble";

Add Package

npx jsr add @cargo/assemble

Import symbol

import * as mod from "@cargo/assemble";

Add Package

yarn dlx jsr add @cargo/assemble

Import symbol

import * as mod from "@cargo/assemble";

Add Package

pnpm dlx jsr add @cargo/assemble

Import symbol

import * as mod from "@cargo/assemble";

Add Package

bunx jsr add @cargo/assemble

Import symbol

import * as mod from "@cargo/assemble";