Skip to content

Dependency injection container creation by config, inspired by laminas-config.

License

Notifications You must be signed in to change notification settings

chubbyts/chubbyts-dic-config

Repository files navigation

chubbyts-dic-config

CI Coverage Status Mutation testing badge npm-version

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

Dependency injection container creation by config, inspired by mezzio-config.

Requirements

Installation

Through NPM as @chubbyts/chubbyts-dic-config.

npm i @chubbyts/chubbyts-dic-config@^1.2.0

Usage

import {
  createContainerByConfigFactory,
  ConfigFactory,
  ConfigDelegator,
} from '@chubbyts/chubbyts-dic-config/dist/dic-config';

const containerByConfigFactory = createContainerByConfigFactory({
  dependencies: {
    services: new Map<string, any>(),
    factories: new Map<string, ConfigFactory>(),
    aliases: new Map<string, string>(),
    delegators: new Map<string, Array<ConfigDelegator>>(),
  },
  // ... other configuration
});

const container = containerByConfigFactory();

Copyright

2024 Dominik Zogg

About

Dependency injection container creation by config, inspired by laminas-config.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published