// Inject node globals into React Native global scope. import { Buffer } from 'buffer'; import process from 'process'; global.Buffer = Buffer; global.process = process; if (typeof btoa === 'undefined') { global.btoa = function (str) { return new Buffer(str, 'binary').toString('base64'); }; } if (typeof atob === 'undefined') { global.atob = function (b64Encoded) { return new Buffer(b64Encoded, 'base64').toString('binary'); }; }