MCPcopy Create free account
hub / github.com/getsentry/sentry-react-native / base64ToUint8Array

Function base64ToUint8Array

packages/core/src/js/feedback/utils.ts:40–48  ·  view source on GitHub ↗
(base64: string)

Source from the content-addressed store, hash-verified

38 * @returns Uint8Array data
39 */
40export const base64ToUint8Array = (base64: string): Uint8Array => {
41 if (typeof atob !== 'function' || !isWeb()) {
42 throw new Error('atob is not available in this environment.');
43 }
44
45 const binaryString = atob(base64);
46 // oxlint-disable-next-line typescript-eslint(no-misused-spread)
47 return new Uint8Array([...binaryString].map(char => char.charCodeAt(0)));
48};
49
50export const feedbackAlertDialog = (title: string, message: string): void => {
51 if (isWeb() && typeof RN_GLOBAL_OBJ.alert !== 'undefined') {

Callers 1

FeedbackFormClass · 0.90

Calls 1

isWebFunction · 0.90

Tested by

no test coverage detected