Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@dotdev/ajax-queue
Advanced tools
const queue = new Q([config]);
queue.add([request]);
config
- objectThe config object is not required
Name | Description | Type | Default |
---|---|---|---|
success | The callback for all successful ajax requests processed by this queue | function | Dispatch a Q:requestCompleted event |
error | The callback for all unsuccessful ajax requests processed by this queue | function | Dispatch a Q:requestFailed event |
completedAllRequestsEvent | The event type that will be dispatched once all requests have finished | string | Q:requestsCompleted |
completedRequestEvent | The event type that will be dispatched after each request is finished | string | Q:requestCompleted |
failedRequestEvent | The event type that will be dispatched after a request has failed | string | Q:requestFailed |
requestStartedEvent | The event type that will be dispatched after each request has started | string | Q:requestStarted |
errorEvent | The event type that will be dispatched after Q has thrown an error | string | Q:error |
add
Adds a request to the currently running queue, this will cause the queue to process each item, one at a time until all requests have been resolved.
const queue = new Q()
// Build the ajax request
const request = {
url: '/cart/add.js',
data: item,
success: options.success,
error: options.error
}
// Add the request to the ajax request queue
this.queue.add(request)
})
request
- objectName | Description | Required | Type | Default |
---|---|---|---|---|
success | The callback for a successful response, overwrites the queue default. | false | function | Dispatch a Q:requestCompleted event |
error | The callback for an unsuccessful response, overwrites the queue default. | false | function | Dispatch a Q:requestFailed event |
url | The url that the request will be sent to | true | string | null |
method | The method that will be used to make the request | false | string | GET |
data | Any data that you wish to send to the request | false | any | null |
dataType* | The type of data that we expect to recieve from the request | false | string | '' |
Options:
''
, 'arraybuffer'
, 'blob'
, 'document'
, 'json'
, 'text'
FAQs
Front end ajax queue and request handler
The npm package @dotdev/ajax-queue receives a total of 0 weekly downloads. As such, @dotdev/ajax-queue popularity was classified as not popular.
We found that @dotdev/ajax-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.