Nothing Precedes Matter

    servicelocator-node
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    Service Locator

    Service locator for typescript project to help with dependency injection

    Installation

    Use the package manager npm to install servicelocator

    npm i servicelocator

    Usage

    import serviceLocator from 'servicelocator'
     
    serviceLocator.register('service', () => {
        return new service()
    });

    Get a service

    const service = serviceLocator.get('service')

    Contributing

    Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

    Please make sure to update tests as appropriate.

    License

    MIT

    Install

    npm i servicelocator-node

    DownloadsWeekly Downloads

    6

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    5.08 kB

    Total Files

    6

    Last publish

    Collaborators

    • hassoun86