@chubbyts/chubbyts-dic-config

1.2.0 • Public • Published

chubbyts-dic-config

CI Coverage Status Infection MSI 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

2023 Dominik Zogg

Package Sidebar

Install

npm i @chubbyts/chubbyts-dic-config

Weekly Downloads

45

Version

1.2.0

License

MIT

Unpacked Size

12.1 kB

Total Files

6

Last publish

Collaborators

  • dominikzogg