{"repo":"shutterstock/fnFlow","free":true,"listed":false,"github":"https://github.com/shutterstock/fnFlow","clone":"git clone https://github.com/shutterstock/fnFlow.git","description":"Pronounced \"effin' flow\" because it's so badass, fnFlow is a Javascript control flow library heavily influenced by Caolan McMahon's async that encourages a proper functional design pattern.","language":"JavaScript","stars":21,"topics":["flow","workflow","control-flow","control","async","authentication"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"fnflow ====== Pronounced \"effin' flow\" because it's so badass, fnflow is a Javascript control flow library heavily influenced by Caolan McMahon's async that encourages a proper functional design pattern. For a complicated series of both asynchronous and synchronous tasks, using the Flow class makes adding new tasks much easier and makes the code more readable. It also encourages you to define functions in places where they can be reused more easily. This makes it an excellent choice for design patterns like MVC where it is a goal to strive for \"fat model, skinny controller.\" Install Usage ...which translates to the following workflow: Get the author by name \"Brandon Sanderson\" and get the genre by name \"Fantasy\" asynchronously, in parallel. Get the fantasy books in the Wheel of Time series written by Brandon Sanderson by calling Book.findByAuthorAndGenre(author, genre, callback) by using the results of the author and genre tasks. Flow(tasks) Constructor function. It determines the best order for running functions based on their requirements. Flow automatically determines which functions depend on other functions to complete first by examining all function arguments, and each function is run as soon as its requirements are satisfied. If any of the functions pass an error to their callback, that function will not complete (so any other functions depending on it will not run) and the main callback will be called immediately with the error. The main callback receives an object co","default_branch":null,"files":null,"tree":[],"storefront":"/r/shutterstock","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/shutterstock/fnFlow/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}