examples/example2.js
function async(value, bool) {
   var def = promise()
   setTimeout(function() {
 	   if(!bool) def.fulfill(value)
     else def.reject('error')
   }, 10)
   return def.promise
 }
function async(value, bool) {
   var def = promise()
   setTimeout(function() {
 	   if(!bool) def.fulfill(value)
     else def.reject('error')
   }, 10)
   return def.promise
 }
function async ( value , bool ) { var def = promise ( ) setTimeout ( function ( ) { if ( ! bool ) def . fulfill ( value ) else def . reject ( 'error' ) } , 10 ) return def . promise }
Return value after 500ms using promises.

@param  {Any} value
@return {Promise}
@api private
Return value after 500ms using promises .