Displaying 1 to 15 from 15 results

p-wait-for - Wait for a condition to be true

  •    Javascript

Can be useful for polling.Returns a Promise that resolves when condition returns true. Rejects if condition throws or returns a Promise that rejects.

p-whilst - While a condition returns true, calls a function repeatedly, and then resolves the promise

  •    Javascript

Think async version of the while statement.While condition returns true, executes action repeatedly, and then resolves the promise. Rejects if action returns a promise that rejects or if an error is thrown anywhere.




p-do-whilst - Calls a function repeatedly while a condition returns true and then resolves the promise

  •    Javascript

Think async version of the do…while statement.Executes action repeatedly while condition returns true and then resolves the promise. Rejects if action returns a promise that rejects or if an error is thrown anywhere.

p-event - Promisify an event by waiting for it to be emitted

  •    Javascript

Useful when you need only one event emission and want to use it with promises or await it in an async function.If you want multiple individual events as they are emitted, this module is not for you, as a Promise is a single value. Instead, just continue using event callback or use Observables.

p-map - Map over promises concurrently

  •    Javascript

Useful when you need to run promise-returning & async functions multiple times with different inputs concurrently.Returns a Promise that is fulfilled when all promises in input and ones returned from mapper are fulfilled, or rejects if any of the promises reject. The fulfilled value is an Array of the fulfilled values returned from mapper in input order.


p-min-delay - Delay a promise a minimum amount of time

  •    Javascript

While the delay module delays the promise a specified amount of time and then resolves it, this module ensures the promise resolves after the specified amount of time.Useful when you have a promise that may settle immediately or may take some time, and you want to ensure it doesn't settle too fast. For example, if you want to show a loading indicator for at least 1 second (but longer if needed) to prevent a confusing flash in the UI.

wait-promise - Make a promise, waiting for a specified amount of time, util something is done.

  •    Javascript

Make a promise, waiting for a specified amount of time, util something is done. Syntactic sugar for setTimeout and setInterval. Based on ES6 Promise. A version compiled to ES5 in CJS format is published to npm as wait-promise.

gate - An utility to await multiple asynchronous calls in Node environment

  •    Javascript

Gate is an utility to await multiple asynchronous calls in Node environment. You can get each asynchronous result by index or name.

wait-for-expect - Wait for expectation to be true, useful for integration and end to end testing

  •    TypeScript

It will check whether the expectation passes right away in the next available "tick" (very useful with, for example, integration testing of react when mocking fetches, like here: https://github.com/kentcdodds/react-testing-library#usage). If it doesn't, it will keep repeating for the duration of, at most, the specified timeout, every 50 ms. The default timeout is 4.5 seconds to fit below the default 5 seconds that Jest waits for before throwing an error.





We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.