unstale

npm / js-base64

js-base64

What changed in js-base64 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-28.

2 breaking2 performance4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

js-base64 38 changes

Breaking changes 2

  • isValid() now returns false for data lengths of 4n+1, which cannot encode a whole number of bytes.

    3.9.6release notes

  • btoa() now throws on non-Latin1 input on the Buffer code path as well.

    3.8.1release notes

Performance 2

  • toUint8Array() is faster on platforms without Uint8Array.fromBase64 because bytes are written straight into the resulting Uint8Array.

    3.9.7release notes

  • The library uses the native method where available.

    3.9.1release notes

Fixes and other changes 4

  • No longer causes infinite recursion on platforms with native Uint8Array.prototype.toBase64.

    3.9.5release notes

  • The return type is narrowed to an ArrayBuffer-backed Uint8Array, allowing the result to be used where a BufferSource is expected, such as Web Crypto and Blob.

    3.9.4release notes

  • Corrected a typo in the low-surrogate range, fixing UTF-8 encoding behavior.

    3.9.3release notes

  • decode() preserves a leading BOM (U+FEFF) on the TextDecoder code path.

    3.8.0release notes