mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00

later with @bmatusiak check sea.then for '../gun.js' vs '../' vs ... note: src/index -> core.js TODO: something about WebRTC candidates hitting ack decrement limits?
12 lines
441 B
JavaScript
12 lines
441 B
JavaScript
;(function(){
|
|
|
|
var u;
|
|
if(u+''== typeof btoa){
|
|
if(u+'' == typeof Buffer){
|
|
try{ global.Buffer = require("buffer", 1).Buffer }catch(e){ console.log("Please `npm install buffer` or add it to your package.json !") }
|
|
}
|
|
global.btoa = function(data){ return Buffer.from(data, "binary").toString("base64") };
|
|
global.atob = function(data){ return Buffer.from(data, "base64").toString("binary") };
|
|
}
|
|
|
|
}()); |