{"_id":"@ani-uni/fastcap","_rev":"7-831aff8e5fad398079e02c6c3f952b46","name":"@ani-uni/fastcap","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.0":{"name":"@ani-uni/fastcap","version":"0.0.0","keywords":["oidc","trusted-publishing","setup"],"_id":"@ani-uni/fastcap@0.0.0","maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"dist":{"shasum":"0ab8b20d192368d00f2bce8a28ada8a3d3edc860","tarball":"https://registry.npmjs.org/@ani-uni/fastcap/-/fastcap-0.0.0.tgz","fileCount":2,"integrity":"sha512-FkKxpEtAwboAH7GuAs3PKHmFsfvQ0FXKHiG4PZ6Zqp1rE45K2wcB4KL8Eylow/PtnOsdi/cLu8aAVCRd4MKDnA==","signatures":[{"sig":"MEQCICjLQ2ZDq4ym8Eg54WIu78ABl8CqDaSCw9TGFuDp1pfnAiB/6J5JNdM9RttjnaIsjgNRuM3d2OaLlgFc1ADC9+U2QA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2027},"_npmUser":{"name":"dan-uni","email":"npm@rinne.in"},"_npmVersion":"11.16.0","description":"OIDC trusted publishing setup package for @ani-uni/fastcap","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/fastcap_0.0.0_1785002043883_0.7251535069976347","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@ani-uni/fastcap","version":"0.0.1","author":"rinne","license":"LGPL-3.0-or-later","_id":"@ani-uni/fastcap@0.0.1","maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"homepage":"https://github.com/ani-uni/fastcap#readme","bugs":{"url":"https://github.com/ani-uni/fastcap/issues"},"dist":{"shasum":"21fc14be7c0e85bd01e6f2ea3c695b0c404b2f1a","tarball":"https://registry.npmjs.org/@ani-uni/fastcap/-/fastcap-0.0.1.tgz","fileCount":5,"integrity":"sha512-Bvj7s4Xno5wMHEPRdvMP35t1LeQIDRIZwBMYQiXB80nybmHVdG1LPO1HaMuqYIySkAsbeCkkX7boNHYhZtxoFQ==","signatures":[{"sig":"MEYCIQCrzsAtw4uf7Q8ME3jElmguVM8xqJBwpwGJ/07awz8A4gIhAI9cubd0K5qCogKY5pGDMr0+PI+3tsUJmHj+L0wSFiYW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ani-uni%2ffastcap@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":18055},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"vp pack --watch","test":"vp test","build":"vp pack","check":"vp check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c95c3b67-f15f-49ba-acbc-c718a51cdaea"}},"devEngines":{"packageManager":{"name":"pnpm","onFail":"download","version":"11.17.0"}},"repository":{"url":"git+https://github.com/ani-uni/fastcap.git","type":"git"},"description":"A tool to quickly configure the map of progress between the videos and the real episodes'.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"zod":"^4.4.3","smol-toml":"^1.7.0","@js-temporal/polyfill":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"npm:@voidzero-dev/vite-plus-core@0.2.6","vite-plus":"0.2.6","typescript":"^7.0.2","@types/node":"^26.1.1"},"_npmOperationalInternal":{"tmp":"tmp/fastcap_0.0.1_1785002959835_0.20190942195853911","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@ani-uni/fastcap","version":"0.0.2","author":"rinne","license":"LGPL-3.0-or-later","_id":"@ani-uni/fastcap@0.0.2","maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"homepage":"https://github.com/ani-uni/fastcap#readme","bugs":{"url":"https://github.com/ani-uni/fastcap/issues"},"dist":{"shasum":"3f9e7c29ad2ea2c4c3f0e5586dcf7a155057ae58","tarball":"https://registry.npmjs.org/@ani-uni/fastcap/-/fastcap-0.0.2.tgz","fileCount":5,"integrity":"sha512-b0dwoCZLC2OocKkpvF/essU41sJBhjLgZiCobLE4GqVPn8mtAJe48XnOK9/xYIy58ewNLgnvMjv25VSVkO7OEg==","signatures":[{"sig":"MEUCIC4orbSHXedJVa1FJa5eqYCyEmQQ9qRZHOtemV+quaeeAiEAkH1+RNdA1Y40OnU4KxuzcZ0wJHrJ1VFtoqgXAOW46cE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ani-uni%2ffastcap@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":18064},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"vp pack --watch","test":"vp test","build":"vp pack","check":"vp check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c95c3b67-f15f-49ba-acbc-c718a51cdaea"}},"devEngines":{"packageManager":{"name":"pnpm","onFail":"download","version":"11.17.0"}},"repository":{"url":"git+https://github.com/ani-uni/fastcap.git","type":"git"},"description":"A tool to quickly configure the map of progress between the videos and the real episodes'.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"zod":"^4.4.3","smol-toml":"^1.7.0","@js-temporal/polyfill":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"npm:@voidzero-dev/vite-plus-core@0.2.6","vite-plus":"0.2.6","typescript":"^7.0.2","@types/node":"^26.1.1"},"_npmOperationalInternal":{"tmp":"tmp/fastcap_0.0.2_1785084308278_0.026736523653420274","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@ani-uni/fastcap","version":"0.0.3","author":"rinne","license":"LGPL-3.0-or-later","_id":"@ani-uni/fastcap@0.0.3","maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"homepage":"https://github.com/ani-uni/fastcap#readme","bugs":{"url":"https://github.com/ani-uni/fastcap/issues"},"dist":{"shasum":"211080a56d71b0382ffab6916c8a067011e16018","tarball":"https://registry.npmjs.org/@ani-uni/fastcap/-/fastcap-0.0.3.tgz","fileCount":5,"integrity":"sha512-JEFTPjqJdBU47tb7MybfQkm8rYjH4aHeu0MuWhWkRVGnW1zQ9SS3aeLnYTQAokUsU8qJo1G7rmqCoALeWmupzA==","signatures":[{"sig":"MEUCIQCcePGhTVpZw1IsWtsfoLowAbzFXKXyL5dDYwJn3gT5igIgWZrVlIHnLAVLJDItDjcWPuRq0QfIBGWIs9iqodYMccs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ani-uni%2ffastcap@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":18320},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"vp pack --watch","test":"vp test","build":"vp pack","check":"vp check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c95c3b67-f15f-49ba-acbc-c718a51cdaea"}},"devEngines":{"packageManager":{"name":"pnpm","onFail":"download","version":"11.17.0"}},"repository":{"url":"git+https://github.com/ani-uni/fastcap.git","type":"git"},"description":"A tool to quickly configure the map of progress between the videos and the real episodes'.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"zod":"^4.4.3","smol-toml":"^1.7.0","@js-temporal/polyfill":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"npm:@voidzero-dev/vite-plus-core@0.2.6","vite-plus":"0.2.6","typescript":"^7.0.2","@types/node":"^26.1.1"},"_npmOperationalInternal":{"tmp":"tmp/fastcap_0.0.3_1785087866236_0.020646066604262492","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@ani-uni/fastcap","version":"0.0.5","author":"rinne","license":"LGPL-3.0-or-later","_id":"@ani-uni/fastcap@0.0.5","maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"homepage":"https://github.com/ani-uni/fastcap#readme","bugs":{"url":"https://github.com/ani-uni/fastcap/issues"},"dist":{"shasum":"cea51f24f86638859912cbe12a52cd0b1950efa6","tarball":"https://registry.npmjs.org/@ani-uni/fastcap/-/fastcap-0.0.5.tgz","fileCount":5,"integrity":"sha512-DBfaNN9S3L4q+rF2BI1Zlp88wbfYeJ6dyjJanofXtp5GiOdhHmGDkPVAt59Sa/SeM5D54875PPxyIT0VLc9oeA==","signatures":[{"sig":"MEQCIHbjp+nE+kbiepPcCEdl3sYa7DALAkDJrO31VizloMopAiAmNQXqgd1yNdLvatcIJV0hWqI6+xqlVbTrP0wgL1wN6g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ani-uni%2ffastcap@0.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21203},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"vp pack --watch","test":"vp test","build":"vp pack","check":"vp check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c95c3b67-f15f-49ba-acbc-c718a51cdaea"}},"devEngines":{"packageManager":{"name":"pnpm","onFail":"download","version":"11.17.0"}},"repository":{"url":"git+https://github.com/ani-uni/fastcap.git","type":"git"},"description":"A tool to quickly configure the map of progress between the videos and the real episodes'.","directories":{},"_nodeVersion":"26.5.1","dependencies":{"zod":"^4.4.3","smol-toml":"^1.7.1","@js-temporal/polyfill":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"npm:@voidzero-dev/vite-plus-core@0.2.6","vite-plus":"0.2.6","typescript":"^7.0.2","@types/node":"^26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/fastcap_0.0.5_1785494702015_0.2614858093557235","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@ani-uni/fastcap","version":"0.0.6","author":"rinne","license":"LGPL-3.0-or-later","_id":"@ani-uni/fastcap@0.0.6","maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"homepage":"https://github.com/ani-uni/fastcap#readme","bugs":{"url":"https://github.com/ani-uni/fastcap/issues"},"dist":{"shasum":"d2d47bf8006958f18a1229fbc4fe47a485881f45","tarball":"https://registry.npmjs.org/@ani-uni/fastcap/-/fastcap-0.0.6.tgz","fileCount":16,"integrity":"sha512-cevFNd3tOpfAGp7VRR8OqVm/RdZ92RilC8heU9aHW/Xce2l3Q6toH2udptdZIMzvtXnUCla4wefL1Rm+SWMOkg==","signatures":[{"sig":"MEUCIQDxk5KgZhnNuepRna6zgmUkbb4vZO/Q/bxDa4HDkDmwPAIgL6s3FESGKi34Aqf87sZ5GvpszrNf+HHRD9dLsqV+/fA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ani-uni%2ffastcap@0.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":27521},"type":"module","exports":{".":"./dist/index.mjs","./model":"./dist/model.mjs","./bridge":"./dist/bridge.mjs","./catalog":"./dist/catalog.mjs","./package.json":"./package.json","./platform/tmdb":"./dist/platform/tmdb.mjs","./platform/bilibili":"./dist/platform/bilibili.mjs"},"scripts":{"dev":"vp pack --watch","test":"vp test","build":"vp pack","check":"vp check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c95c3b67-f15f-49ba-acbc-c718a51cdaea"}},"devEngines":{"packageManager":{"name":"pnpm","onFail":"download","version":"11.21.0"}},"repository":{"url":"git+https://github.com/ani-uni/fastcap.git","type":"git"},"description":"A tool to quickly configure the map of progress between the videos and the real episodes'.","directories":{},"sideEffects":false,"_nodeVersion":"26.7.0","dependencies":{"zod":"^4.4.3","smol-toml":"^1.8.0","@js-temporal/polyfill":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"npm:@voidzero-dev/vite-plus-core@0.2.9","vite-plus":"0.2.9","typescript":"^7.0.2","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/fastcap_0.0.6_1786810844020_0.4194956242686678","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@ani-uni/fastcap","version":"0.0.7","description":"A tool to quickly configure the map of progress between the videos and the real episodes'.","homepage":"https://github.com/ani-uni/fastcap#readme","bugs":{"url":"https://github.com/ani-uni/fastcap/issues"},"license":"LGPL-3.0-or-later","author":"rinne","repository":{"type":"git","url":"git+https://github.com/ani-uni/fastcap.git"},"type":"module","sideEffects":false,"exports":{".":"./dist/index.mjs","./bridge":"./dist/bridge.mjs","./catalog":"./dist/catalog.mjs","./model":"./dist/model.mjs","./platform/bilibili":"./dist/platform/bilibili.mjs","./platform/tmdb":"./dist/platform/tmdb.mjs","./package.json":"./package.json"},"publishConfig":{"access":"public"},"dependencies":{"@js-temporal/polyfill":"^0.5.1","smol-toml":"^1.8.0","zod":"^4.4.3"},"devDependencies":{"@types/node":"^26.2.0","typescript":"^7.0.2","vite":"npm:@voidzero-dev/vite-plus-core@0.3.0","vite-plus":"0.3.0"},"devEngines":{"packageManager":{"name":"pnpm","version":"11.21.0","onFail":"download"}},"scripts":{"build":"vp pack","dev":"vp pack --watch","test":"vp test","check":"vp check"},"_nodeVersion":"26.7.0","_id":"@ani-uni/fastcap@0.0.7","dist":{"integrity":"sha512-9OsYjYtcV5mahA3NyHlhG+HxS0SI006lFUvoYNyowwZBAHgWCxHl7yet7AxprHqLHek5xhTtVqdiksIiR9f6Qw==","shasum":"ab174058e79e63216c48981509692e98b86adb42","tarball":"https://registry.npmjs.org/@ani-uni/fastcap/-/fastcap-0.0.7.tgz","fileCount":16,"unpackedSize":27662,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ani-uni%2ffastcap@0.0.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDYYXMd7f8MyD6FuoN4kIhigwV8HAvEl3YTjqq5lEVNgQIgFcdqqEPFCAaTha1EhV0ePMdLe/G1wh3IaLRmW/HKa+o="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c95c3b67-f15f-49ba-acbc-c718a51cdaea"}},"directories":{},"maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fastcap_0.0.7_1787653963237_0.5327121183910135"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-25T17:54:03.778Z","modified":"2026-08-25T10:32:43.712Z","0.0.0":"2026-07-25T17:54:04.203Z","0.0.1":"2026-07-25T18:09:19.950Z","0.0.2":"2026-07-26T16:45:08.440Z","0.0.3":"2026-07-26T17:44:26.382Z","0.0.5":"2026-07-31T10:45:02.162Z","0.0.6":"2026-08-15T16:20:44.163Z","0.0.7":"2026-08-25T10:32:43.374Z"},"bugs":{"url":"https://github.com/ani-uni/fastcap/issues"},"author":"rinne","license":"LGPL-3.0-or-later","homepage":"https://github.com/ani-uni/fastcap#readme","repository":{"type":"git","url":"git+https://github.com/ani-uni/fastcap.git"},"description":"A tool to quickly configure the map of progress between the videos and the real episodes'.","maintainers":[{"name":"dan-uni","email":"npm@rinne.in"}],"readme":"# fastcap\n\n这是一个快速配置视频与真实剧集进度映射的工具。\n\n“大航海”时代，面临许多平台的番剧资源与它们实际上的进度不一致的问题，为了便于弹幕的进度偏移、标记不同资源之间的细节差异，`fastcap`提供了一套结构化语言规范来描述这一差异。\n\n## 配置语言载体\n\n[了解TOML](https://toml.io/cn/) | [TOML转JSON](https://it-tools.tech/toml-to-json)\n\n我们使用`TOML`作为基础配置语言载体，TOML代码块外侧包裹markdown标准的代码块标识如下，作为去除无关内容的分割符。\n\n以下这个`TOML`示例保存了2个B站视频的配置及其对应关系。\n\n````toml\n# 代码块外部可以随意添加内容\n```fastcap\n[[f]]\ni = \"bili_cid\"\nid = \"37322032240\"\np = [ [ 0, 1371_000, 0, 1 ] ]\n[f.t.1]\nbgmtv_epid = \"1670640\"\n\n[[f]]\ni = \"bili_cid\"\nid = \"37157930397\"\np = [ [ 354_000, 1670_000, 0, 1 ] ]\n[f.t.1]\nbgmtv_epid = \"1654608\"\n```\n# 只要不在里面加东西就行\n````\n\n但同时额外提供了一种中文格式化自然语言的配置载体`fastcap-yue`(曰)，便于人类阅读，并防止被评论区审核误判/TOML依赖的标记字符被错误转化。  \n_例如: B站的评论区会将半角中括号变成中文全角中括号_  \n同时，`fastcap-yue`支持压缩至一行(不依赖缩进/换行)，其分割依赖其中的标点符号。  \n生成器输出的每一个字和标点都是有实际意义并影响解析的。\n\n```fastcap-yue\n+ 当然，你可以在这里添加任意你想说的话。\n本资源FastCap配置如下：\n\n索引：bili_cid，ID：37322032240；\n标记了1个片段，共1个剧集；\n片段0：从00:00:00.000到00:22:51.000，对应实际剧集00:00:00.000，归属下方剧集1；\n剧集1：bgmtv_epid=1670640。\n\n索引：bili_cid，ID：37157930397；\n标记了1个片段，共1个剧集；\n片段0：从00:05:54.000到00:27:50.000，对应实际剧集00:00:00.000，归属下方剧集1；\n剧集1：bgmtv_epid=1654608。\n+ 在配置的前后可以任意添加其它内容\n```\n\n`fastcap-toml`与`fastcap-yue`是等价的，且可以互相转换。  \n需要**注意**的是，你可以在上述例子所给的配置外添加任意其它内容而不影响解析，但**不允许**在代码块/文本内部添加其它内容，否则会导致解析失败。\n\n## 主体结构\n\n```toml\n# f - fastcap: (list)\n# 用于声明下方到另一个`[[f]]`或到底为止 作为一个fastcap配置的主体\n# 即一个fastcap代码块内可以存放多份配置\n[[f]]\n\n# i - index: (str)\n# 用于标识该fastcap配置应使用的索引解析方式\n# 即 该配置应当被用于描述哪一类视频平台/资源\ni = \"\"\n\n# id: (str)\n# 在该i(索引)模式下指向的唯一资源的标识符\nid = \"\"\n\n# p: (list)\n# 为一个含多组<clip>的列表\np = [\n  [0, 0, 0, 0],\n  [0, 0, 0, 0],\n  # ...\n  # clip: tuple<int, int, int, int>\n  # [video_begin, video_end, offset, temp_ep_id]\n  # clip[0:2]的单位均为毫秒(ms)\n  # clip[0:1]描述该视频的某一片段\n  # clip[2]表示该片段的偏移量: 该clip的video_begin进度在实际剧集进度的位置\n  # clip[3]表示该片段对应的临时剧集id\n]\n\n# t - temp: (record)\n# 这里维护一个临时剧集表，用于将上面的片段解析到实际的剧集\n# 这里的id需要来自可靠第三方剧集信息平台\n# [t.<temp_ep_id>] 表示临时剧集<temp_ep_id>的剧集信息\n\n[t.1] # epid = 1\n# <platform_id_type> = <platform_id>(str)\n# 键名(key)一个唯一的剧集信息平台的id类型，值(value)为该剧集在该平台上的id\n# 以下所有 平台+id 需保证能仅靠该单一信息就能定位到某一特定剧集上，以确定到该剧集的实际信息(含进度)\n# 允许存在多条目保证解析方更有可能成功匹配到该条目\n# 但实际上仅需存在至少1条即可\nbgmtv_epid = \"544109\"\ntmdb_urlc = \"tv/285933/season/1/episode/1\"\n# 以上内容表示:\n# p中temp_ep_id=1的clip对应到番剧《午夜的倾心旋律》的[offset, offset+video_end-video_begin]的进度\n```\n\n## 格式转换\n\n安装npm包:\n\n```sh\nvp add @ani-uni/fastcap\n#[pnpm | bun | npm | yarn] install @ani-uni/fastcap\n```\n\n调用方法:\n\n```ts\nimport FastCap from \"@ani-uni/fastcap\";\n\n// 创建空的FastCap实例\nconst fc = new FastCap();\n\n// 解析fastcap-toml\nconst fc = new FastCap(toml);\n// 解析fastcap-yue\nconst fc = new FastCap(yue);\n// 传入fastcap-json\nconst fc = new FastCap(json);\n\n// 原地精简配置，并返回当前实例以支持链式调用\nfc.fmt();\nconst formattedToml = new FastCap(json).fmt().toString(\"toml\");\n\n// 导出\nconst toml = fc.toString(\"toml\");\nconst yue = fc.toString(\"yue\");\nconst json = fc.toJSON();\n```\n\n公共模型和平台解析器使用独立子路径导入，未使用的平台代码不会进入消费者构建：\n\n```ts\nimport { parseFastCapText } from \"@ani-uni/fastcap/model\";\nimport { parseTmdbUrlc } from \"@ani-uni/fastcap/platform/tmdb\";\n\nconst config = parseFastCapText(input);\nconst reference = parseTmdbUrlc(\"tv/42/season/1/episode/2\");\n```\n\n`fmt()`会删除没有片段和临时剧集的空资源，并根据共通的`bgmtv_epid`或`tmdb_urlc`在全局补全、合并剧集信息及统一临时剧集ID。若同一剧集关联了冲突的第三方ID，格式化会抛出错误，原实例保持不变。\n","readmeFilename":""}