0.1.0 • Published 12 years ago

async-if v0.1.0

Weekly downloads
5
License
-
Repository
github
Last release
12 years ago

Async If

####If Statement Extension to Async

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


Installation

or

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
    });
  });
0.1.0

12 years ago