mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-15 22:16:35 +00:00
feat: add text tools
This commit is contained in:
@@ -85,7 +85,7 @@ export function stripDataUri(text: string): string {
|
||||
return m ? text.slice(m[0].length) : text.trim();
|
||||
}
|
||||
|
||||
export function base64ToBytes(text: string): Uint8Array {
|
||||
export function base64ToBytes(text: string): Uint8Array<ArrayBuffer> {
|
||||
const clean = text.replace(/\s+/g, "");
|
||||
const binary = atob(clean);
|
||||
const bytes = new Uint8Array(binary.length);
|
||||
|
||||
Reference in New Issue
Block a user