• 解析base64的mime和uint8Array

    参数

    • base64: string

    返回 {
        uint8Array: Uint8Array;
        mime: string;
    }

    • uint8Array: Uint8Array
    • mime: string
    // { hello: 'world' }
    const p = parseBase64('data:application/json;base64,ewogICJoZWxsbyI6ICJ3b3JsZCIKfQ==');
    p.mime; // 'application/json'
    String.fromCodePoint(...p.uint8Array); // '{\n "hello": "world"\n}'