Skip to content

jwchang0206/async-if

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async If

####If Statement Extension to Async

Read async Documentation from https://github.com/caolan/async


Installation

  npm install async-if

or

  git clone git://github.com/InspiredJW/async-if.git

Example Usage

async.waterfall([
    function(callback) {
      async.if(true || false, "Absolutely True", function() {
        // Do Works If condition has passed
      });
    }
  ], function(err) {
    var actions = [
      {
        message: "That is Not True",
        action: function() {
          return console.log("That is Not True");
        }
      }, {
        message: "That is Not True 2",
        action: function() {
          return console.log("That is Not True 2");
        }
      }
    ];
    async.endif(err, actions, function() {
      // Do Works Other Than If Cases
    });
  });

About

If Statement Extension to Async

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published