mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
feat: add ctx.utils.removeQuery method
This commit is contained in:
@@ -23,6 +23,10 @@ export function encodeMarkdownLink (path: string) {
|
||||
.replace(/ /g, '%20')
|
||||
}
|
||||
|
||||
export function removeQuery (url: string) {
|
||||
return url.replace(/[#?].*$/, '')
|
||||
}
|
||||
|
||||
export function dataURLtoBlob (dataURL: string) {
|
||||
const byteString = atob(dataURL.split(',')[1])
|
||||
const mimeString = dataURL.split(',')[0].split(':')[1].split(';')[0]
|
||||
|
||||
Reference in New Issue
Block a user