Created
September 4, 2019 08:58
-
-
Save maruware/d23d0e69963b817ff3b1d45793c7a3d0 to your computer and use it in GitHub Desktop.
Trim Base64 Prefix from Data URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const trimBase64TypePrefix = (b64str: string) => { | |
return b64str.replace(/data:.+;base64,/, '') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment