Socket
Book a DemoInstallSign in
Socket

qelp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qelp

Q promise helpers

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

qelp—Q helpers Build Status

qelp.cancel(promise) -> promise

Returns a promise that with method cancel which stops the callbacks from propagating.

This is useful if you attach a promise callback to change UI elements, but then the user decides they don't want to wait for the data to load, and instead loads another object in that promise's place.

Parameters

  • promise — Promise to add ability to cancel

Returns

Promise with cancel({Boolean} allowSuccess, {Boolean} allowError) method

qelp.retryFn(fn, timings) -> promise

Tries to call the fn function multiple times in hopes that it will resolve. Calling an AJAX function may not resolve successfully the first time due to network issues, so this function will retry calling it.

Parameters

  • fn — Function which creates a promise

Returns

A promise to the data we're retrying to resolve.

Keywords

q

FAQs

Package last updated on 23 Jan 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts