Wondering what’s next for npm?Check out our public roadmap! »

    @empla/coredi

    2.0.4 • Public • Published

    CoreDI

    codecov Build and Test Dependabot GitHub release (latest SemVer) GitHub npm

    Dependency Injection library for Node.jS and Browser

    Features

    • Node.js and Browser support
    • Well tested code
    • Container fork support
    • Recursive dependencies resolving support
    • Service Groups support

    Installation

    npm install @empla/coredi

    Usage

    const coredi = require('@empla/coredi');
    
    coredi({
        app: {
            loaders: [
                {
                    name: 'myservice',
                    config: {
                        param: 'defaultValue'
                    },
                    async create(container) {
                        return myServiceObject;
                    },
                },
            ],
        },
    }, 'app').then(function(container) {
        const myservice = container('myservice');  
        // ...
    });

    Documentation

    Visit official site for documentation

    How to build project

    Install:

    npm install

    Test:

    npm test

    Lint code:

    npm run lint

    Browser tests:

    npm run bundle

    and open browser-test.html in your browser.

    License

    CoreDI licensed under MIT License

    Maintainers


    Copyright (c) 2020 EMPLA GROUP, LLP

    Made with ❤️

    Install

    npm i @empla/coredi

    DownloadsWeekly Downloads

    2

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    43.4 kB

    Total Files

    34

    Last publish

    Collaborators

    • avatar