https://github.com/slavahatnuke/pull.factory
https://github.com/slavahatnuke/pull.factory
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/slavahatnuke/pull.factory
- Owner: slavahatnuke
- Created: 2017-09-29T08:30:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-29T22:36:12.000Z (over 7 years ago)
- Last Synced: 2025-03-18T12:34:06.465Z (2 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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())
```