Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/jsdoc/AsyncQueue.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<input type="text" id="nav-search" placeholder="Search" />


<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#QUEUE_ERRORS">QUEUE_ERRORS</a></li><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>

</nav>

Expand Down Expand Up @@ -194,7 +194,7 @@ <h4 class="name" id=".add"><span class="type-signature type-signature-static">(s

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line230">line 230</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line242">line 242</a>
</li></ul></dd>


Expand Down Expand Up @@ -401,7 +401,7 @@ <h4 class="name" id=".setMaxConcurrency"><span class="type-signature type-signat

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line51">line 51</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line63">line 63</a>
</li></ul></dd>


Expand Down Expand Up @@ -537,7 +537,7 @@ <h4 class="name" id=".setMaxRetries"><span class="type-signature type-signature-

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line85">line 85</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line97">line 97</a>
</li></ul></dd>


Expand Down Expand Up @@ -699,7 +699,7 @@ <h4 class="name" id=".setPromiseTimeout"><span class="type-signature type-signat

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line131">line 131</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line143">line 143</a>
</li></ul></dd>


Expand Down Expand Up @@ -871,7 +871,7 @@ <h5 class="h5-parameters">Parameters:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Tue Nov 26 2024 17:05:18 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Nov 27 2024 14:48:04 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
72 changes: 67 additions & 5 deletions docs/jsdoc/AsyncQueue.module.exports.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<input type="text" id="nav-search" placeholder="Search" />


<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#QUEUE_ERRORS">QUEUE_ERRORS</a></li><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>

</nav>

Expand Down Expand Up @@ -68,7 +68,7 @@ <h2>



<h4 class="name" id="module.exports"><span class="type-signature"></span>new module.exports<span class="signature">(maxConcurrency<span class="signature-attributes">opt</span>, maxRetries<span class="signature-attributes">opt</span>, timeout<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<h4 class="name" id="module.exports"><span class="type-signature"></span>new module.exports<span class="signature">(config<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>



Expand All @@ -84,7 +84,7 @@ <h4 class="name" id="module.exports"><span class="type-signature"></span>new mod

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line34">line 34</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line43">line 43</a>
</li></ul></dd>


Expand Down Expand Up @@ -135,7 +135,7 @@ <h5 class="h5-examples">Examples</h5>
const queue = new Queue()</code></pre>

<pre class="prettyprint"><code>//to define a queue with a specified length of 3
const queue = new Queue(3)</code></pre>
const queue = new Queue({maxConcurrency: 3})</code></pre>



Expand All @@ -158,6 +158,61 @@ <h5 class="h5-parameters">Parameters:</h5>



<th class="last">Description</th>
</tr>
</thead>

<tbody>


<tr>

<td class="name"><code>config</code></td>


<td class="type">


<span class="param-type">Object</span>




</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>the config for asyncrify</p>
<h6>Properties</h6>


<table class="params">
<thead>
<tr>

<th>Name</th>


<th>Type</th>


<th>Attributes</th>




<th class="last">Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -269,6 +324,13 @@ <h5 class="h5-parameters">Parameters:</h5>
</tbody>
</table>

</td>
</tr>


</tbody>
</table>




Expand Down Expand Up @@ -324,7 +386,7 @@ <h5 class="h5-parameters">Parameters:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Tue Nov 26 2024 17:05:18 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Nov 27 2024 14:48:04 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
72 changes: 66 additions & 6 deletions docs/jsdoc/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<input type="text" id="nav-search" placeholder="Search" />


<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#QUEUE_ERRORS">QUEUE_ERRORS</a></li><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>

</nav>

Expand Down Expand Up @@ -127,6 +127,66 @@ <h3 class="subsection-title">Members</h3>



<h4 class="name" id="QUEUE_ERRORS"><span class="type-signature type-signature-constant">(constant) </span>QUEUE_ERRORS<span class="type-signature"></span></h4>





<dl class="details">



<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line10">line 10</a>
</li></ul></dd>































</dl>














<h4 class="name" id="abortHandler"><span class="type-signature type-signature-constant">(constant) </span>abortHandler<span class="type-signature"></span></h4>


Expand All @@ -142,7 +202,7 @@ <h4 class="name" id="abortHandler"><span class="type-signature type-signature-co

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line303">line 303</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line315">line 315</a>
</li></ul></dd>


Expand Down Expand Up @@ -238,7 +298,7 @@ <h4 class="name" id="errCallback"><span class="type-signature"></span>errCallbac

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line158">line 158</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line170">line 170</a>
</li></ul></dd>


Expand Down Expand Up @@ -415,7 +475,7 @@ <h4 class="name" id="promiseFunction"><span class="type-signature"></span>promis

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line184">line 184</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line196">line 196</a>
</li></ul></dd>


Expand Down Expand Up @@ -594,7 +654,7 @@ <h4 class="name" id="resCallback"><span class="type-signature"></span>resCallbac

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line136">line 136</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line148">line 148</a>
</li></ul></dd>


Expand Down Expand Up @@ -767,7 +827,7 @@ <h5 class="h5-returns">Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Tue Nov 26 2024 17:05:18 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Nov 27 2024 14:48:04 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
15 changes: 10 additions & 5 deletions docs/jsdoc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<input type="text" id="nav-search" placeholder="Search" />


<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/superbrobenji/async-queue" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="AsyncQueue.module.exports.html">AsyncQueue.module.exports</a></li></ul><h3>Namespaces</h3><ul><li><a href="AsyncQueue.html">AsyncQueue</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.add">add</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxConcurrency">setMaxConcurrency</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setMaxRetries">setMaxRetries</a></li><li data-type='method' style='display: none;'><a href="AsyncQueue.html#.setPromiseTimeout">setPromiseTimeout</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#QUEUE_ERRORS">QUEUE_ERRORS</a></li><li><a href="global.html#abortHandler">abortHandler</a></li><li><a href="global.html#errCallback">errCallback</a></li><li><a href="global.html#promiseFunction">promiseFunction</a></li><li><a href="global.html#resCallback">resCallback</a></li></ul>

</nav>

Expand Down Expand Up @@ -90,9 +90,14 @@ <h2>Install</h2>
<h2>Usage</h2>
<pre class="prettyprint source lang-sh"><code>import Queue from 'asyncrify'
const queue = new Queue()
queue.add(() => new Promise((resolve) => setTimeout(resolve, 200)), (res, err) => {
//handle err or result
})
queue.add(() => new Promise(
(resolve) => setTimeout(resolve, 200)),
(res) => {
//handle result
},
(err) => {
//handle err
})
</code></pre>
<h2>Run tests</h2>
<pre class="prettyprint source lang-sh"><code>npm run test
Expand Down Expand Up @@ -127,7 +132,7 @@ <h2>📝 License</h2>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Tue Nov 26 2024 17:05:18 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Wed Nov 27 2024 14:48:04 GMT+0200 (South Africa Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading