mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
9 lines
337 B
JavaScript
9 lines
337 B
JavaScript
|
|
if(typeof btoa === "undefined"){
|
|
if(typeof Buffer === "undefined") {
|
|
global.Buffer = require("buffer").Buffer
|
|
}
|
|
global.btoa = function (data) { return Buffer.from(data, "binary").toString("base64"); };
|
|
global.atob = function (data) { return Buffer.from(data, "base64").toString("binary"); };
|
|
}
|
|
|