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

@soundweave/asset-index

v1.0.2

Published

Pack integrity indexing and auditing for SoundWeave

Downloads

304

Readme

@soundweave/asset-index

用于Soundweave音轨包的完整性索引和审计。

功能说明

  • buildPackIndex(pack) — 构建基于ID的快速查找映射,并在每个实体集合中检测重复ID。
  • auditPackIntegrity(pack) — 运行所有完整性检查(例如:损坏的引用、重复项、自引用、未使用的实体),并返回分类后的结果(errorswarningsnotes),结果按确定性顺序排序。
  • findUnusedAssets(pack) — 查找未被任何音轨或过渡效果引用的资源。
  • findUnusedStems(pack) — 查找未被任何场景层引用的音轨。
  • findUnreferencedScenes(pack) — 查找未被任何绑定、备用方案或过渡引用的场景。
  • summarizePackIntegrity(pack) — 以一个对象的形式返回实体数量、未使用资源数量和发现结果的数量。

完整性代码

| 代码 | 严重程度 | 含义 | |------|----------|---------| | duplicate_asset_id | error | 两个或多个资源共享相同的ID。 | | duplicate_stem_id | error | 两个或多个音轨共享相同的ID。 | | duplicate_scene_id | error | 两个或多个场景共享相同的ID。 | | duplicate_binding_id | error | 两个或多个绑定共享相同的ID。 | | duplicate_transition_id | error | 两个或多个过渡效果共享相同的ID。 | | missing_asset_ref | error | 音轨引用了不存在的资源。 | | missing_stinger_asset_ref | error | 过渡效果引用了不存在的音轨资源。 | | missing_stem_ref | error | 场景层引用了不存在的音轨。 | | missing_fallback_scene_ref | error | 场景的备用方案引用了不存在的场景。 | | missing_binding_scene_ref | error | 绑定引用了不存在的场景。 | | missing_transition_from_scene_ref | error | 过渡效果的起始场景不存在。 | | missing_transition_to_scene_ref | error | 过渡效果的目标场景不存在。 | | scene_self_fallback | warning | 场景会回退到自身。 | | transition_self_reference | warning | 过渡效果的起始场景和目标场景相同。 | | unused_asset | warning | 资源未被任何音轨或过渡效果引用。 | | unused_stem | warning | 音轨未被任何场景层引用。 | | unreferenced_scene | note | 场景未被任何绑定、备用方案或过渡引用。 |

用法

import { auditPackIntegrity, summarizePackIntegrity } from "@soundweave/asset-index";

const audit = auditPackIntegrity(pack);
if (audit.errors.length > 0) {
  console.error("Pack has integrity errors:", audit.errors);
}

const summary = summarizePackIntegrity(pack);
console.log(`${summary.assetCount} assets, ${summary.errorCount} errors`);