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

Method fromBase64String

packages/firebase-firestore/index.ios.ts:1300–1311  ·  view source on GitHub ↗
(base64)

Source from the content-addressed store, hash-verified

1298 }
1299
1300 static fromBase64String(base64) {
1301 if (typeof base64 === 'string') {
1302 let b64 = base64;
1303 if (base64.startsWith('data:')) {
1304 b64 = base64.split(',')[1];
1305 }
1306 const bytes = new Bytes();
1307 bytes._native = NSData.alloc().initWithBase64EncodedStringOptions(b64, NSDataBase64DecodingOptions.IgnoreUnknownCharacters);
1308 return bytes;
1309 }
1310 return null;
1311 }
1312
1313 static fromUint8Array(array) {
1314 if (!(array instanceof Uint8Array)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected