UNPKG

@gleif-it/did-webs-ts

Version:
9 lines (8 loc) 332 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bytesToBase64Url = void 0; const bytesToBase64Url = (bytes) => btoa(Array.from(bytes, (b) => String.fromCharCode(b)).join('')) .replace(/\+/g, '-') .replace(/\//g, '_') .replace(/=+$/, ''); exports.bytesToBase64Url = bytesToBase64Url;