surmount
Minimal, well behaved dependency based scheduler
Getting Started
$ npm install --save surmount
Features
- Optimized for parallel execution
- Propagates arguments to the functions
- Propagates errors to the affected functions
- Returns a promise of an object containing return values and/or errors
- Throws an error on circular dependencies
- Throws an error on missing dependencies
- Not an orchestrator, task registry or a build system
Usage
const tie = function (err) {
if (err) {
throw err
}
console.log('Tied the double windsor knot.')
}
tie.label = 'tie'
tie.dependency = ['shirt']
const dress = new Surmount([
tie,
shoes,
jacket,
shirt,
pants
])
dress()
.then(function (result) {
console.log(result)
})
License
Copyright (c) 2016 Mark Milstein mailto:mark@epiloque.com
surmount is licensed under the MIT License
http://www.opensource.org/licenses/MIT