ifthen.if_(/* condition */)
.then_(
// required, called if `condition`
function (callback) {
// callback must be called to trigger completion
callback();
})
.else_(
// optional; called when `! condition`
// cannot be specified unless `then_` is
function (callback) {
// callback must be called to trigger completion
callback();
})
.finally_(
// optional, always called after branch completes
function (err) {
//
}
);
ifthen: support if/then/else/finally branch logic in asynchronous Javascript callbacks
License
gyllstromk/ifthen
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
ifthen: support if/then/else/finally branch logic in asynchronous Javascript callbacks
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published