Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 320 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 320 Bytes

Promise While

While loops for asynchronous javascript

Usage

var promiseWhile = require('promise-while')(Promise)

promiseWhile(
  function() {
    return true // infinite loop
  }, 
  function() {
    // return Promise
  }
)
.then(function() {
  // while loop completed, conditional returned false
})