Files
IronCalc/webapp/src/AppComponents/util.ts
Nicolás Hatcher Andrés 48719b6416 UPDATE: Adds cell and formula editing (#92)
* UPDATE: Adds cell and formula editing

* FIX: Do not loose focus when clicking on the formula we are editing

* FIX: Minimal implementation of browse mode

* FIX: Initial browse mode within sheets

* UPDATE: Webapp

Minimal Web Application
2024-10-08 19:44:27 +02:00

19 lines
493 B
TypeScript

export function base64ToBytes(base64: string): Uint8Array {
// const binString = atob(base64);
// return Uint8Array.from(binString, (m) => m.codePointAt(0));
return new Uint8Array(
atob(base64)
.split("")
.map((c) => c.charCodeAt(0)),
);
}
export function bytesToBase64(bytes: Uint8Array): string {
const binString = Array.from(bytes, (byte) =>
String.fromCodePoint(byte),
).join("");
// btoa(String.fromCharCode(...bytes));
return btoa(binString);
}