Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

queue-up

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queue-up - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "queue-up",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple promise-based function queue",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -18,17 +18,22 @@ # queue-up [![Build Status](https://travis-ci.org/dsblv/queue-up.svg?branch=master)](https://travis-ci.org/dsblv/queue-up)

```js
const got = require('got');
const ghGot = require('gh-got');
const Queue = require('queue-up');
const queue = new Queue(500);
// GitHub API allows us to make 5000 requests per hour:
queue.up()
.then(got('github.com'))
.then(data => {
console.log('data');
});
const queue = new Queue(60 * 60 * 1000 / 5000);
queue.up()
.then(() => {
console.log('Next call – only after .5sec!');
});
[
'dsblv',
'strikeentco',
'sindresorhus',
'octocat'
].forEach(user => {
queue.up()
.then(ghGot('users/' + user, {token: 'koten'}))
.then(data => {
console.log(data.body.name + ' is in ' + data.body.location);
});
});
```

@@ -41,3 +46,3 @@

#### innerval
#### interval

@@ -44,0 +49,0 @@ Type: `number`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc