async-branch
Wrap async library to describe your flow through branches
Installation
npm install async-branch
Usage
Import the library
var asyncbranch = require('async-branch')
Create branches and execute
var createUser = 'create user' var loginUser = 'load user' var loginOrRegistration = 'login or registration'
Or use to map an array
var data = key1: 'pippo' key1: 'pluto' key1: 'paperina' key1: 'paperino' var { itemtype = 'tooLong' }var { itemtype = 'tooShort' } var tooLongBranch = 'tooLongBranch' var tooShortBranch = 'tooShortBranch' { } 'branch name'
See the test folder for more explainations.