Releases: fullstackers/stairs
Releases · fullstackers/stairs
Dependency Updates
Updated dependencies
Conditional Steps
Stairs#step(title:String, exclude:Boolean, fn:Function)
Conditionally adds a step.
s.step('query api', options.skipQuery, function ($, next) {
http.get($.url, function (res) {
$.body = '';
res.on('data', function (chunk) { $.body = $.body + chunk; });
res.on('end', next);
res.on('error', next);
});
});
The "query api" step will not be added if options.skipQuery is true.
API Update
The API has two new methods bound to the context of each handler
next()
and end()
;
s.step('some step', function ($) {
$.data = 'Some Data';
this.next()
});
s.step('some other step', function ($) {
console.log('finished!');
this.end();
});