@laplace.live/internal 1.3.46 → 1.3.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laplace.live/internal",
3
- "version": "1.3.46",
3
+ "version": "1.3.48",
4
4
  "module": "src/index.d.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -0,0 +1,18 @@
1
+ /** Renamed Bilibili live guilds, former name → current name. Values must be current names, never another key. */
2
+ export const guildRenames: ReadonlyMap<string, string> = new Map([['萌鸽传媒', 'MoeLive']])
3
+
4
+ /** Current name of a guild, following renames. */
5
+ export function getNormalizedGuildName(name: string): string {
6
+ return guildRenames.get(name) ?? name
7
+ }
8
+
9
+ /** Whether two guild names refer to the same guild once renames are followed. */
10
+ export function isSameGuild(a: string, b: string): boolean {
11
+ return getNormalizedGuildName(a) === getNormalizedGuildName(b)
12
+ }
13
+
14
+ /** Every name a guild has gone by, current name first. */
15
+ export function getGuildNameVariants(name: string): string[] {
16
+ const current = getNormalizedGuildName(name)
17
+ return [current, ...[...guildRenames].filter(([, to]) => to === current).map(([from]) => from)]
18
+ }
@@ -131,6 +131,8 @@ export declare namespace LaplaceInternal {
131
131
  videos: number,
132
132
  group: string,
133
133
  room: number,
134
+ /** 粉丝团人数,直播间从未同步过的主播为 0 */
135
+ fanClub: number,
134
136
  ][]
135
137
  }
136
138