Skip to content

Instantly share code, notes, and snippets.

@adamauckland
adamauckland / gist:2c853dafbcf49626428d
Created May 7, 2014 17:10
Example of chaining deferred promises
//
// Demonstration of chaining deferred promises together
//
var Q = require('q');
function firstFunction () {
var deferred = Q.defer();
/**
* An asynchronous loop implementation
*
* @param {array} inputArray
* @param {function} loopFunction: Function you want to call on each item.
* @example
*
var loopArray = [];
loopArray.push({ name: 'apple' });
/**
* @description: Creates the styling for the social navigation
*
* @author: kaelifa
* @version: 0.1
* @date: 2013-02-02
*
*
* @example:
* <nav class="navSocial">