Tag: “asyncjs
  • 02 – Exploring Async.js – async.waterfall and async.series
    Intermediate | In “Exploring async.js”, we’re going to learn about async.js, the jQuery of Nodejs. Async.js is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with Node.js and installable via npm...
  • 10 – Exploring Async.js – async.each
    Intermediate | In this tutorial, we’re going to learn how we can use async.each to iterate through asynchronous functions to guarantee order of operation. var async = require('async'); var _ = require('lodash'); var $ = require('jquery')(require("jsdom").jsdom().parentWindow); //Returns top image from Flickr...
  • 09 – Exploring Async.js – async.times
    Intermediate | In this tutorial, we’re going to learn how we can use async.times to iterate and repeat a particular function. var async = require('async'); //A complex function to insert entries to database var addEntryToDB = function(id, callback) { //Pass something to...
  • 07 – Exploring Async.js – async.cargo
    Intermediate | In this tutorial, we’ll learn how to put your async functions on an assembly line and execute a set number of functions at a time. var async = require('async'); var _ = require('lodash'); //Generate an array of 10 random tasks;...
  • 08 – Exploring Async.js – async.retry
    Intermediate | In this tutorial, we’ll learn about how to retry async requests with async.retry var async = require('async'); //Async example for Sign Up flow async.auto({ get_username: function(callback){ console.log('in get_username'); // async code to get some data callback(null, 'Zhi'); }, connect_to_db:...
  • 06 – Exploring Async.js – async.auto
    Intermediate | In this tutorial, we’re going to use async auto to automatically perform a list of async functions. var async = require('async'); //Async example for Sign Up flow async.auto({ get_username: function(callback){ console.log('in get_username'); // async code to get some data...
  • 05 – Exploring Async.js – async.compose
    Intermediate | In this tutorial, we will compose multiple async functions using async.compose var async = require('async'); //async.compose(fn1,fn2...) //Composing a(), b(), c() will produce a(b(c())) //Adds 5 to num function addFive(num, callback) { callback(null, num + 5); } //Multiplies num by...
Loading...