Skip to content

Commit

Permalink
Fix bug with nextVal and Peekable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aplet123 committed Sep 1, 2021
1 parent b9b9918 commit 2f18a49
Show file tree
Hide file tree
Showing 17 changed files with 578 additions and 578 deletions.
2 changes: 1 addition & 1 deletion bundle/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deno_compat/AsyncIterPlus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class AsyncIterPlus<T> implements CurIter<T>, AsyncIterable<T> {
* @returns The next value, or null if the iterator ended.
*/
async nextVal(): Promise<T | Null> {
const elem = await this.internal.next();
const elem = await this.next();
if (elem.done) {
return nullVal;
}
Expand Down
2 changes: 1 addition & 1 deletion deno_compat/IterPlus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class /* o:Async- */ IterPlus<T>
* @returns The next value, or null if the iterator ended.
*/
/* o:async */ nextVal(): /* o:Promise<- */ T | Null /* o:-> */ {
const elem = /* o:await */ this.internal.next();
const elem = /* o:await */ this.next();
if (elem.done) {
return nullVal;
}
Expand Down
2 changes: 1 addition & 1 deletion dest/src/AsyncIterPlus.js

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

2 changes: 1 addition & 1 deletion dest/src/AsyncIterPlus.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dest/src/IterPlus.js

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

2 changes: 1 addition & 1 deletion dest/src/IterPlus.js.map

Large diffs are not rendered by default.

256 changes: 128 additions & 128 deletions docs/classes/AsyncIterPlus.html

Large diffs are not rendered by default.

264 changes: 132 additions & 132 deletions docs/classes/AsyncPeekable.html

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions docs/classes/CircularBuffer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CircularBuffer | iterplus - v3.0.0</title>
<meta name="description" content="Documentation for iterplus - v3.0.0">
<title>CircularBuffer | iterplus - v3.0.1</title>
<meta name="description" content="Documentation for iterplus - v3.0.1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<script async src="../assets/js/search.js" id="search-script"></script>
Expand All @@ -23,7 +23,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">iterplus - v3.0.0</a>
<a href="../index.html" class="title">iterplus - v3.0.1</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
Expand Down Expand Up @@ -52,7 +52,7 @@
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../modules.html">iterplus - v3.0.0</a>
<a href="../modules.html">iterplus - v3.0.1</a>
</li>
<li>
<a href="CircularBuffer.html">CircularBuffer</a>
Expand Down Expand Up @@ -148,7 +148,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L30">CircularBuffer.ts:30</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L30">CircularBuffer.ts:30</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -189,7 +189,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> data</h3>
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L18">CircularBuffer.ts:18</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L18">CircularBuffer.ts:18</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -204,7 +204,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> end</h3>
<div class="tsd-signature tsd-kind-icon">end<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L14">CircularBuffer.ts:14</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L14">CircularBuffer.ts:14</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -219,7 +219,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> len</h3>
<div class="tsd-signature tsd-kind-icon">len<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L22">CircularBuffer.ts:22</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L22">CircularBuffer.ts:22</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -234,7 +234,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> start</h3>
<div class="tsd-signature tsd-kind-icon">start<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L10">CircularBuffer.ts:10</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L10">CircularBuffer.ts:10</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -256,7 +256,7 @@ <h3>[iterator]</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L118">CircularBuffer.ts:118</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L118">CircularBuffer.ts:118</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -279,7 +279,7 @@ <h3>capacity</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L57">CircularBuffer.ts:57</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L57">CircularBuffer.ts:57</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -302,7 +302,7 @@ <h3>clear</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L247">CircularBuffer.ts:247</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L247">CircularBuffer.ts:247</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -325,7 +325,7 @@ <h3>get</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L67">CircularBuffer.ts:67</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L67">CircularBuffer.ts:67</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -357,7 +357,7 @@ <h3>get<wbr>End</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L79">CircularBuffer.ts:79</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L79">CircularBuffer.ts:79</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -380,7 +380,7 @@ <h3>pop<wbr>End</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L215">CircularBuffer.ts:215</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L215">CircularBuffer.ts:215</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -403,7 +403,7 @@ <h3>pop<wbr>Start</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L231">CircularBuffer.ts:231</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L231">CircularBuffer.ts:231</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -426,7 +426,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> possibly<wbr>Expand</h3
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L171">CircularBuffer.ts:171</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L171">CircularBuffer.ts:171</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -448,7 +448,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> possibly<wbr>Shrink</h3
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L180">CircularBuffer.ts:180</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L180">CircularBuffer.ts:180</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -470,7 +470,7 @@ <h3>push<wbr>End</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L191">CircularBuffer.ts:191</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L191">CircularBuffer.ts:191</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -501,7 +501,7 @@ <h3>push<wbr>Start</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L203">CircularBuffer.ts:203</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L203">CircularBuffer.ts:203</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -532,7 +532,7 @@ <h3>resize<wbr>To</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L156">CircularBuffer.ts:156</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L156">CircularBuffer.ts:156</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -567,7 +567,7 @@ <h3>set</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L93">CircularBuffer.ts:93</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L93">CircularBuffer.ts:93</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -604,7 +604,7 @@ <h3>set<wbr>End</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L105">CircularBuffer.ts:105</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L105">CircularBuffer.ts:105</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -635,7 +635,7 @@ <h3>size</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L48">CircularBuffer.ts:48</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L48">CircularBuffer.ts:48</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -658,7 +658,7 @@ <h3>to<wbr>Array</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/499495a/src/CircularBuffer.ts#L135">CircularBuffer.ts:135</a></li>
<li>Defined in <a href="https://github.com/Aplet123/iterplus/blob/b9b9918/src/CircularBuffer.ts#L135">CircularBuffer.ts:135</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
Loading

0 comments on commit 2f18a49

Please sign in to comment.