Skip to content
Closed
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
5 changes: 2 additions & 3 deletions src/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import * as string from './string.js'
import * as env from './environment.js'
import * as array from './array.js'
import * as math from './math.js'
import * as encoding from './encoding.js'
Expand Down Expand Up @@ -88,10 +87,10 @@ const fromBase64Node = s => {
}

/* c8 ignore next */
export const toBase64 = /* @__PURE__ */(() => env.isBrowser ? toBase64Browser : toBase64Node)()
export const toBase64 = /* @__PURE__ */(() => typeof Buffer === 'undefined' ? toBase64Browser : toBase64Node)()

/* c8 ignore next */
export const fromBase64 = /* @__PURE__ */(() => env.isBrowser ? fromBase64Browser : fromBase64Node)()
export const fromBase64 = /* @__PURE__ */(() => typeof Buffer === 'undefined' ? fromBase64Browser : fromBase64Node)()

/**
* Implements base64url - see https://datatracker.ietf.org/doc/html/rfc4648#section-5
Expand Down
Loading