@dan-uni/dan-any 0.0.5 → 0.1.0

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/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  - 多种弹幕格式之间互相转换
8
8
  - 对多平台弹幕进行统一格式化
9
+ - 获取一组弹幕中的共通值
10
+ - 对弹幕按一定key值进行分组
9
11
 
10
12
  ## Formats 支持转换的格式
11
13
 
package/dist/index.d.ts CHANGED
@@ -42,11 +42,15 @@ export interface DM_JSON_DDPlay {
42
42
  }[];
43
43
  }
44
44
  export type DM_format = 'danuni.json' | 'danuni.bin' | 'danuni.pb.zst' | 'bili.xml' | 'bili.bin' | 'bili.cmd.bin' | 'dplayer.json' | 'artplayer.json' | 'ddplay.json';
45
+ type shareItems = Partial<Pick<UniDMTools.UniDMObj, 'FCID' | 'senderID' | 'platform' | 'SPMO' | 'pool' | 'mode'>>;
45
46
  export declare class UniPool {
46
47
  dans: UniDM[];
48
+ readonly shared: shareItems;
47
49
  constructor(dans: UniDM[]);
48
50
  static create(): UniPool;
49
51
  assign(dans: UniPool | UniDM | UniDM[]): UniPool;
52
+ split(key: keyof shareItems): UniPool[];
53
+ minify(): (Partial<UniDMTools.UniDMObj> & Pick<UniDMTools.UniDMObj, "FCID">)[];
50
54
  convert2(format: DM_format): string | Uint8Array<ArrayBufferLike> | DM_JSON_Dplayer | DM_JSON_DDPlay | DM_JSON_Artplayer[];
51
55
  static fromPb(bin: Uint8Array | ArrayBuffer): UniPool;
52
56
  /**