UNPKG

@trimblemaps/content-db

Version:

An isomorphic indexeddb wrapper for storing/retrieving TrimbleMaps content (ie places & place-sets)

15 lines (10 loc) 221 B
function btoa(str) { let buffer; if (str instanceof Buffer) { buffer = str; } else { buffer = Buffer.from(str.toString(), 'binary'); } return buffer.toString('base64'); } module.exports = btoa;