index.js
function await() {
	var payload = [];

	// Slurp all args into payload
	argy(arguments)
		.getForm()
		.split(',')
		.forEach(function(type, offset) {
			switch (type) {
				case '': // Blank arguments - do nothing
					// Pass
					break;
				case 'string':
					payload.push(args[offset]);
					break;
				case 'array':
					payload.concat(args[offset]);
					break;
				default:
					throw new Error('Unknown argument type passed to .await(): ' + type);
			}
		});

	this._struct.push({ type: 'await', payload: payload });

	return this;
}
function await() {
	var payload = [];

	// Slurp all args into payload
	argy(arguments)
		.getForm()
		.split(',')
		.forEach(function(type, offset) {
			switch (type) {
				case '': // Blank arguments - do nothing
					// Pass
					break;
				case 'string':
					payload.push(args[offset]);
					break;
				case 'array':
					payload.concat(args[offset]);
					break;
				default:
					throw new Error('Unknown argument type passed to .await(): ' + type);
			}
		});

	this._struct.push({ type: 'await', payload: payload });

	return this;
}
function await ( ) { var payload = [ ] ; // Slurp all args into payload argy ( arguments ) . getForm ( ) . split ( ',' ) . forEach ( function ( type , offset ) { switch ( type ) { case '' : // Blank arguments - do nothing // Pass break ; case 'string' : payload . push ( args [ offset ] ) ; break ; case 'array' : payload . concat ( args [ offset ] ) ; break ; default : throw new Error ( 'Unknown argument type passed to .await(): ' + type ) ; } } ) ; this . _struct . push ( { type : 'await' , payload : payload } ) ; return this ; }
Queue up an await point
This stops the execution queue until its satisfied that dependencies have been resolved
@param {array,...} The dependencies to check resolution of. If omitted all are checked
@return {Object} This chainable object
Queue up an await point This stops the execution queue until its satisfied that dependencies have been resolved