npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lrc-player/parse

v1.0.0

Published

用于解析网易云音乐逐行或逐字歌词插件

Readme

@lrc-player/parse 用于解析歌词

目前只支持网易云音乐歌词格式(逐行或逐字)

安装

选择一个你当前项目中使用的包管理工具

npm: npm install @lrc-player/parse@latest
yarn: yarn add @lrc-player/parse@latest
pnpm: pnpm add @lrc-player/parse@latest

初始化

import { parseLrc, parseYrc } from '@lrc-player/parse'

// yrc 表示逐行,lrc表示逐字

const lrc = '[11700,1410](11700,510,0)Let (12210,390,0)me (12600,510,0)know'
const yrc = '[00:01.80]我爱谁跨不过从来也不觉得错'

// 解析逐字歌词
parseLrc(lrc)

// 解析逐行歌词
parseYrc(yrc)

lrc格式示例

格式示例1:
[8610,3090](8610,240,0)Can (8850,120,0)you (8970,240,0)blow (9210,330,0)my (9540,540,0)whistle (10080,540,0)baby(10620,0,0), (10620,630,0)whistle (11250,450,0)baby
[11700,1410](11700,510,0)Let (12210,390,0)me (12600,510,0)know
[13260,2700](13260,420,0)Girl (13680,210,0)I'm (13890,240,0)gonna (14130,300,0)show (14430,360,0)you (14790,300,0)how (15090,150,0)to (15240,420,0)do (15660,300,0)it

格式示例2:
[16140,3480](16140,480,0)久(16620,420,0)未(17040,510,0)放(17550,510,0)晴(18060,270,0)的(18330,480,0)天(18810,810,0)空
[20040,3770](20040,480,0)依(20520,480,0)旧(21000,480,0)留(21480,330,0)着(21810,480,0)你(22290,330,0)的(22620,630,0)笑(23250,560,0)容
[24360,6730](24360,1090,0)哭(25450,1310,0)过 (26760,410,0)却(27170,670,0)无(27840,470,0)法(28310,460,0)掩(28770,300,0)埋(29070,780,0)歉(29850,1240,0)疚

yrc格式示例

格式示例1:
[00:01.80]我爱谁跨不过从来也不觉得错
[00:09.24]自以为抓着痛就能往回忆里躲
[00:16.05]偏执相信着受诅咒的水晶球
[00:23.73]阻挡可能心动的理由
[00:31.83]而你却靠近了逼我们视线交错
[00:38.79]原地不动或向前走突然在意这分钟
[00:46.26]眼前荒沙弥漫了等候耳边传来孱弱的呼救
[00:53.79]追赶要我爱的不保留
[01:01.56]我身骑白马走三关
[01:09.00]我改换素衣回中原
[01:16.86]放下西凉没人管
[01:24.00]我一心只想王宝钏
[01:46.80]而你却靠近了逼我们视线交错
[01:53.76]原地不动或向前走突然在意这分钟
[02:01.20]眼前荒沙弥漫了等候耳边传来孱弱的呼救
[02:08.79]追赶要我爱的不保留
[02:16.53]我身骑白马走三关
[02:24.00]我改换素衣回中原
[02:31.74]放下西凉没人管
[02:39.00]我一心只想王宝钏

格式示例2:
[00:20.320]所有美好全部come for ya
[00:22.990]我的爱也全部come for ya
[00:25.540]Baby 这是我给你的礼物
[00:28.150]只想把你藏在我心底
[00:30.960]所有美好全部come for ya
[00:33.400]我的爱也全部come for ya
[00:36.180]Baby 这是我给你的礼物
[00:38.760]只想把你藏在我心底
[00:42.250]One
[00:42.870]About stranger lover