@jswork/next-lrc

1.0.9 • Public • Published

next-lrc

A javascript lrc parser.

version license size download

installation

npm install -S @jswork/next-lrc

usage

import '@jswork/next-lrc';

const str = fs.readFileSync('./__tests__/E203.lrc').toString();
nx.lrc(str);
/*
[
  {
    clock: '00:00.800',
    timestamp: 800,
    value: '--- lesson 1  A private conversation 私人谈话',
    times: [ '00:00.800', '00:06.200' ],
    duration: 5400
  },
  {
    clock: '00:06.200',
    timestamp: 6200,
    value: '--- First listen and then answer the question.^听录音,然后回答以下问题。',
    times: [ '00:06.200', '00:12.120' ],
    duration: 5920
  },
  {
    clock: '00:12.120',
    timestamp: 12120,
    value: '--- Why did the writer complain to the people behind him?',
    times: [ '00:12.120', '00:19.840' ],
    duration: 7720
  },
  // ....
*/

license

Code released under the MIT license.

Dependents (0)

Package Sidebar

Install

npm i @jswork/next-lrc

Weekly Downloads

5

Version

1.0.9

License

MIT

Unpacked Size

6.37 kB

Total Files

5

Last publish

Collaborators

  • afeiship
  • yujiao.luo