Skip to content

Instantly share code, notes, and snippets.

@maruware
Created September 4, 2019 08:58
Show Gist options
  • Save maruware/d23d0e69963b817ff3b1d45793c7a3d0 to your computer and use it in GitHub Desktop.
Save maruware/d23d0e69963b817ff3b1d45793c7a3d0 to your computer and use it in GitHub Desktop.
Trim Base64 Prefix from Data URL
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