remove getBase64MimeType
This commit is contained in:
parent
fc49a24ace
commit
d21e41993f
|
@ -19,12 +19,3 @@ export function getBase64MimeType(data: string): string | undefined {
|
|||
return mimeType[1];
|
||||
}
|
||||
}
|
||||
|
||||
// I don't know if we should test this function, because the regex will pass through all the data on the base64
|
||||
// "maybe", depending the length of the data, will waste to much time
|
||||
// https://github.com/wix/react-native-ui-lib/blob/cf700e0d65caa0a0b601fe1edbd763ad4e6748a4/src/utils/imageUtils.ts#L14-L18
|
||||
export function isImageBase64ImageContent(data: string): boolean {
|
||||
const imageBase64Content = data.split(',')[1];
|
||||
const imageBase64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
|
||||
return imageBase64regex.test(imageBase64Content);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue