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
2 changes: 1 addition & 1 deletion src/cjs/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function base (ALPHABET) {
const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.
const b256 = new Uint8Array(size)
// Process the characters.
while (source[psz]) {
while (psz < source.length) {
// Decode character
let carry = BASE_MAP[source.charCodeAt(psz)]
// Invalid character
Expand Down
2 changes: 1 addition & 1 deletion src/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function base (ALPHABET) {
const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.
const b256 = new Uint8Array(size)
// Process the characters.
while (source[psz]) {
while (psz < source.length) {
// Decode character
let carry = BASE_MAP[source.charCodeAt(psz)]
// Invalid character
Expand Down
2 changes: 1 addition & 1 deletion ts_src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function base (ALPHABET: string): base.BaseConverter {
const b256 = new Uint8Array(size)

// Process the characters.
while (source[psz]) {
while (psz < source.length) {
// Decode character
let carry = BASE_MAP[source.charCodeAt(psz)]

Expand Down