Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Apr 5, 2022
1 parent afeb532 commit 2e7d812
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 27 deletions.
4 changes: 2 additions & 2 deletions docs/QueueStats.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2>QueueStats</h2>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line116">line 116</a>
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line115">line 115</a>
</li></ul></dd>


Expand Down Expand Up @@ -121,7 +121,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
6 changes: 3 additions & 3 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ <h4 class="name" id="flush"><span class="type-signature"></span>flush<span class

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line134">line 134</a>
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line133">line 133</a>
</li></ul></dd>


Expand Down Expand Up @@ -615,7 +615,7 @@ <h4 class="name" id="stat"><span class="type-signature"></span>stat<span class="

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line120">line 120</a>
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line119">line 119</a>
</li></ul></dd>


Expand Down Expand Up @@ -903,7 +903,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
5 changes: 2 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ <h1>Typical usage</h1>
<pre class="prettyprint source lang-js"><code>import Queue from 'async-await-queue';
</code></pre>
<p>(or read the <a href="https://mmomtchev.github.io/Queue/">jsdoc</a>)</p>
<p><em><strong>IMPORTANT</strong></em> Keep in mind that when running asynchronous code without explicitly <code>await</code>ing it, you should always handle the eventual Promise rejections by a <code>.catch()</code> statement.</p>
<pre class="prettyprint source lang-js"><code>const Queue = require('async-await-queue');
/* No more than 2 concurrent tasks with
* at least 100ms between two tasks
Expand Down Expand Up @@ -118,8 +119,6 @@ <h1>Typical usage</h1>
/* The third call will wait for the previous two to complete
* plus the time needed to make this at least 100ms
* after the second call
* The first argument needs to be unique for every
* task on the queue
*/
q.push(myq.run(() =>
download(site)
Expand Down Expand Up @@ -201,7 +200,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/module.exports_module.exports.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
7 changes: 3 additions & 4 deletions docs/queue.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,13 @@ <h1 class="page-title">Source: queue.js</h1>
const id = Symbol();
return this.wait(id, priority)
.then(() => job())
.finally((r) => {
.finally(() => {
this.end(id);
return r;
});
}

/**
* @interface QueueStats {running: {number}, waiting: {number}, last: {number}}
* @interface QueueStats {running: number, waiting: number, last: number}
*/

/**
Expand Down Expand Up @@ -197,7 +196,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
7 changes: 3 additions & 4 deletions index.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ class Queue {
const id = Symbol();
return this.wait(id, priority)
.then(() => job())
.finally((r) => {
.finally(() => {
this.end(id);
return r;
});
}

/**
* @interface QueueStats {running: {number}, waiting: {number}, last: {number}}
* @interface QueueStats {running: number, waiting: number, last: number}
*/

/**
Expand Down Expand Up @@ -154,4 +153,4 @@ class Queue {
}
}

export default Queue;
export { Queue as default };
11 changes: 5 additions & 6 deletions index.umd.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.default = factory());
}(this, (function () { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["default"] = factory());
})(this, (function () { 'use strict';

class Queue {
/**
Expand Down Expand Up @@ -113,14 +113,13 @@
const id = Symbol();
return this.wait(id, priority)
.then(() => job())
.finally((r) => {
.finally(() => {
this.end(id);
return r;
});
}

/**
* @interface QueueStats {running: {number}, waiting: {number}, last: {number}}
* @interface QueueStats {running: number, waiting: number, last: number}
*/

/**
Expand Down Expand Up @@ -162,4 +161,4 @@

return Queue;

})));
}));
2 changes: 1 addition & 1 deletion index.umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "async-await-queue",
"version": "1.2.0",
"version": "1.2.1",
"description": "async/await simple priority queues",
"main": "index.umd.min.js",
"module": "index.es.js",
Expand Down

0 comments on commit 2e7d812

Please sign in to comment.