lrc-ast
v1.0.0
Published
Building AST and JS Object from LRC file, and create LRC file from AST.
Downloads
4
Readme
LRC-AST
Building AST(Abstract Syntax Tree) and JS Object from LRC file, and create LRC file from AST.
Get Started
Install via npm:
npm install lrc-ast
Use:
const { parser , createObject , createLrc } = require('lrc-ast');
Example
Original LRC file:
[00:00.00]
[00:01.15]aaaaa
[00:15.50]bbbbb
[03:35.13]ccccc
[03:40.00]
AST:
Fully compliant the content of original LRC file, including the row and column number.
Lyric Object:
Much more compact JS object than AST tree.
{
"tags": {},
"lyrics": [
{
"time": [0,0,0],
"text": ""
},
{
"time": [0,1,0.15],
"text": "aaaaa"
},
{
"time": [0,15,0.5],
"text": "bbbbb"
},
{
"time": [3,35,0.13],
"text": "ccccc"
},
{
"time": [3,40,0],
"text": ""
}
]
}
API
License
Open source under MIT License.