MCPcopy Create free account
hub / github.com/NativeScript/firebase / fromBase64String

Method fromBase64String

packages/firebase-firestore/index.android.ts:1452–1465  ·  view source on GitHub ↗
(base64)

Source from the content-addressed store, hash-verified

1450 }
1451
1452 static fromBase64String(base64) {
1453 if (typeof base64 === 'string') {
1454 let b64 = base64;
1455 if (base64.startsWith('data:')) {
1456 b64 = base64.split(',')[1];
1457 }
1458 const data = new java.lang.String(b64).getBytes('UTF-8');
1459 const encoded = android.util.Base64.encode(data, android.util.Base64.NO_WRAP);
1460 const bytes = new Bytes();
1461 bytes._native = com.google.firebase.firestore.Blob.fromBytes(encoded);
1462 return bytes;
1463 }
1464 return null;
1465 }
1466
1467 static fromUint8Array(array) {
1468 if (!(array instanceof Uint8Array)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected