1.0.0 • Published 4 years ago

servicelocator-node v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

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