This commit is contained in:
Anna Bodnia
2017-04-04 16:09:28 +03:00
parent 436586a661
commit 59ecaf40ee
6 changed files with 29 additions and 12 deletions

View File

@@ -547,3 +547,15 @@ export const parseSeach = () => {
return map
}
export const btoa = (str) => {
let buffer;
if (str instanceof Buffer) {
buffer = str;
} else {
buffer = new Buffer(str.toString(), "utf-8");
}
return buffer.toString("base64");
}