Skip to content
This repository was archived by the owner on Oct 28, 2025. It is now read-only.

Commit ed073ef

Browse files
committed
add some more asserts
1 parent 322d4c4 commit ed073ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ <h1>Uint8Array.fromBase64 ( _string_ [ , _options_ ] )</h1>
8989
1. Let _bytes_ be the unique (possibly empty) sequence of bytes resulting from decoding _input_ as base64 (such that applying the base64 encoding specified in section 4 of <a href="https://datatracker.ietf.org/doc/html/rfc4648">RFC 4648</a> to _bytes_ would produce _input_).
9090
1. Let _byteLength_ be the length of _bytes_.
9191
1. If _lastChunkSize_ is 2, then
92+
1. Assert: _byteLength_ ≥ 3.
9293
1. If _strict_ is *true* and _bytes_[_byteLength_ - 2] is not 0, throw a *SyntaxError* exception.
9394
1. Remove the final 2 elements of _bytes_.
9495
1. Set _byteLength_ to _byteLength_ - 2.
9596
1. Else if _lastChunkSize_ is 3, then
97+
1. Assert: _byteLength_ ≥ 3.
9698
1. If _strict_ is *true* and _bytes_[_byteLength_ - 1] is not 0, throw a *SyntaxError* exception.
9799
1. Remove the final element of _bytes_.
98100
1. Set _byteLength_ to _byteLength_ - 1.

0 commit comments

Comments
 (0)