xieyezi-lyric
v1.0.3
Published
a package for parsing lyric data
Downloads
4
Readme
说在前面
传入字符串类型歌词,按照正则表达式解析,解析的数据结构为:
{
txt:歌词,
time:ms
}
安装
npm install xieyezi-lyric
用法
import xieyeziLyric form 'xieyezi-lyric';
var Lyric = new Lyric(lyric,handle);
console.log(Lyric);
//支持传入一个处理函数“handle”
//js里面的handle函数
_callHandler(i) {
if (i < 0) {
return;
}
this.handler({
txt: this.lines[i].txt,
lineNum: i
})
}