An open API service indexing awesome lists of open source software.

https://github.com/slavahatnuke/pull.factory


https://github.com/slavahatnuke/pull.factory

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# pull.factory
The simplest factory Promise based

```javascript

const pullFactory = new PullFactory(() => {
const service = new Service();

service.setup(1,2,3)
service.start()

return service
});

pullFactory.setDestructor((service) => service.stop());
pullFactory.setLimit(2);

pullFactory.use((service1) => service.doSomething())
pullFactory.use((service2) => service.doSomething())

pullFactory.use((service1) => service.doSomething())

```