移除深度合并依赖

This commit is contained in:
Harvey Zack committed 2018-11-29 22:20:31 +08:00
1 parent dc8405403c
commit b943bcde99
13 files changed
+232 -267

No files matched your search

-19
View File
@@ -1,19 +0,0 @@
export function srtToVtt(srtText) {
return 'WEBVTT \r\n\r\n'.concat(
srtText
.replace(/\{\\([ibu])\}/g, '</$1>')
.replace(/\{\\([ibu])1\}/g, '<$1>')
.replace(/\{([ibu])\}/g, '<$1>')
.replace(/\{\/([ibu])\}/g, '</$1>')
.replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, '$1.$2')
.concat('\r\n\r\n'),
);
}
export function vttToBlob(vttText) {
return URL.createObjectURL(
new Blob([vttText], {
type: 'text/vtt',
}),
);
}