mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
refactor: improvements to blob editor and code cleanup
This commit is contained in:
7
src/common/libs/bufferToBase64.js
Normal file
7
src/common/libs/bufferToBase64.js
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
export function bufferToBase64 (buf) {
|
||||
const binstr = Array.prototype.map.call(buf, ch => {
|
||||
return String.fromCharCode(ch);
|
||||
}).join('');
|
||||
return btoa(binstr);
|
||||
}
|
Reference in New Issue
Block a user