@hysc/meeting 6.1.3 → 6.1.5

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.
Files changed (80) hide show
  1. package/esm/boom-meeting/src/BMChat/BMMessageInfo.d.ts +31 -0
  2. package/esm/boom-meeting/src/BMRoom/BMLiveVM.d.ts +35 -0
  3. package/esm/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +215 -0
  4. package/esm/boom-meeting/src/BMStream/BMSpeaker.d.ts +26 -0
  5. package/esm/boom-meeting/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
  6. package/esm/boom-meeting/src/BMStream/sortStream.d.ts +30 -0
  7. package/esm/boom-meeting/src/SingletonQueue/SingletonQueue.d.ts +26 -0
  8. package/esm/boom-meeting/src/bjy-common/function/execute.d.ts +9 -0
  9. package/esm/boom-meeting/src/bjy-common/function/isNative.d.ts +1 -0
  10. package/esm/boom-meeting/src/bjy-common/function/nextTick.d.ts +2 -0
  11. package/esm/boom-meeting/src/bjy-common/function/toString.d.ts +1 -0
  12. package/esm/boom-meeting/src/bjy-common/util/constant.d.ts +50 -0
  13. package/esm/boom-meeting/src/bjy-common/util/is.d.ts +49 -0
  14. package/esm/boom-meeting/src/bjy-common/util/string.d.ts +102 -0
  15. package/esm/boom-meeting/src/constants.d.ts +129 -0
  16. package/esm/boom-meeting/src/error/RTCError.d.ts +20 -0
  17. package/esm/boom-meeting/src/error/errorType.d.ts +96 -0
  18. package/esm/boom-meeting/src/logger/logger.d.ts +86 -0
  19. package/esm/boom-meeting/src/util/Pqueue.d.ts +62 -0
  20. package/esm/boom-meeting/src/util/Thread.d.ts +12 -0
  21. package/esm/boom-meeting/src/util/benchmark.d.ts +1 -0
  22. package/esm/boom-meeting/src/util/constant.d.ts +67 -0
  23. package/esm/boom-meeting/src/util/emitter.d.ts +43 -0
  24. package/esm/boom-meeting/src/util/sortUtils.d.ts +10 -0
  25. package/esm/boom-meeting/src/util/util.d.ts +78 -0
  26. package/esm/index.js +2 -2
  27. package/esm/index.js.map +3 -3
  28. package/esm/src/BMChat/BMMessageInfo.d.ts +31 -31
  29. package/esm/src/BMRoom/BMLiveVM.d.ts +35 -35
  30. package/esm/src/BMRoom/BMRoomInfo.d.ts +215 -215
  31. package/esm/src/BMStream/BMSpeaker.d.ts +26 -26
  32. package/esm/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -35
  33. package/esm/src/BMStream/sortStream.d.ts +30 -30
  34. package/esm/src/SingletonQueue/SingletonQueue.d.ts +26 -26
  35. package/esm/src/bjy-common/function/execute.d.ts +9 -9
  36. package/esm/src/bjy-common/function/isNative.d.ts +1 -1
  37. package/esm/src/bjy-common/function/nextTick.d.ts +2 -2
  38. package/esm/src/bjy-common/function/toString.d.ts +1 -1
  39. package/esm/src/bjy-common/util/constant.d.ts +50 -50
  40. package/esm/src/bjy-common/util/is.d.ts +49 -49
  41. package/esm/src/bjy-common/util/string.d.ts +102 -102
  42. package/esm/src/constants.d.ts +129 -129
  43. package/esm/src/error/RTCError.d.ts +20 -20
  44. package/esm/src/error/errorType.d.ts +96 -96
  45. package/esm/src/logger/logger.d.ts +86 -86
  46. package/esm/src/util/Pqueue.d.ts +62 -62
  47. package/esm/src/util/Thread.d.ts +12 -12
  48. package/esm/src/util/benchmark.d.ts +1 -0
  49. package/esm/src/util/constant.d.ts +67 -67
  50. package/esm/src/util/emitter.d.ts +43 -43
  51. package/esm/src/util/sortUtils.d.ts +10 -10
  52. package/esm/src/util/util.d.ts +78 -78
  53. package/package.json +6 -6
  54. package/umd/boom-meeting/src/BMChat/BMMessageInfo.d.ts +31 -0
  55. package/umd/boom-meeting/src/BMRoom/BMLiveVM.d.ts +35 -0
  56. package/umd/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +215 -0
  57. package/umd/boom-meeting/src/BMStream/BMSpeaker.d.ts +26 -0
  58. package/umd/boom-meeting/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
  59. package/umd/boom-meeting/src/BMStream/sortStream.d.ts +30 -0
  60. package/umd/boom-meeting/src/SingletonQueue/SingletonQueue.d.ts +26 -0
  61. package/umd/boom-meeting/src/bjy-common/function/execute.d.ts +9 -0
  62. package/umd/boom-meeting/src/bjy-common/function/isNative.d.ts +1 -0
  63. package/umd/boom-meeting/src/bjy-common/function/nextTick.d.ts +2 -0
  64. package/umd/boom-meeting/src/bjy-common/function/toString.d.ts +1 -0
  65. package/umd/boom-meeting/src/bjy-common/util/constant.d.ts +50 -0
  66. package/umd/boom-meeting/src/bjy-common/util/is.d.ts +49 -0
  67. package/umd/boom-meeting/src/bjy-common/util/string.d.ts +102 -0
  68. package/umd/boom-meeting/src/constants.d.ts +129 -0
  69. package/umd/boom-meeting/src/error/RTCError.d.ts +20 -0
  70. package/umd/boom-meeting/src/error/errorType.d.ts +96 -0
  71. package/umd/boom-meeting/src/logger/logger.d.ts +86 -0
  72. package/umd/boom-meeting/src/util/Pqueue.d.ts +62 -0
  73. package/umd/boom-meeting/src/util/Thread.d.ts +12 -0
  74. package/umd/boom-meeting/src/util/benchmark.d.ts +1 -0
  75. package/umd/boom-meeting/src/util/constant.d.ts +67 -0
  76. package/umd/boom-meeting/src/util/emitter.d.ts +43 -0
  77. package/umd/boom-meeting/src/util/sortUtils.d.ts +10 -0
  78. package/umd/boom-meeting/src/util/util.d.ts +78 -0
  79. package/umd/index.js +2 -2
  80. package/umd/src/BMStream/BMStreamModel.d.ts +2 -1
@@ -0,0 +1,31 @@
1
+ interface IMessageInfo {
2
+ userId?: string;
3
+ message: string;
4
+ role?: string;
5
+ isLocal?: boolean;
6
+ avatar?: string;
7
+ nickName?: string;
8
+ sendTime?: number;
9
+ isMeetingNotice?: boolean;
10
+ to?: string | undefined;
11
+ isDanger?: boolean;
12
+ seq?: number;
13
+ failed?: boolean;
14
+ }
15
+ export default class BMMessageInfo {
16
+ userId?: any;
17
+ message: string;
18
+ time: string;
19
+ timeStamp: number;
20
+ role?: string;
21
+ isLocal?: boolean;
22
+ avatar?: any;
23
+ nickName?: any;
24
+ isMeetingNotice: boolean;
25
+ to: string | undefined;
26
+ isDanger: boolean | undefined;
27
+ seq: number | undefined;
28
+ failed: boolean | undefined;
29
+ constructor(props: IMessageInfo);
30
+ }
31
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @name: BMLiveVM.ts
3
+ * @author: yangliye
4
+ * @date: 2022-07-15 13:53
5
+ * @description:处理直播相关的流处理
6
+ * @update: 2022-07-15 13:53
7
+ */
8
+ import BMRoom from "./BMRoom";
9
+ import BMStreamModel from "../BMStream/BMStreamModel";
10
+ declare class BMLiveVM {
11
+ private room;
12
+ constructor(room: BMRoom);
13
+ private get localBMUser();
14
+ private get localIsAudience();
15
+ /**
16
+ * 拉流处理
17
+ * @param bmStreamModel
18
+ */
19
+ handlePull(bmStreamModel: BMStreamModel): Promise<void>;
20
+ /**
21
+ * 切换大小流处理
22
+ * @param bmStreamModel
23
+ */
24
+ handleChangeStreamType(bmStreamModel: BMStreamModel): Promise<void>;
25
+ handlePlay(bmStreamModel: BMStreamModel, noPlayChanged: boolean): Promise<void>;
26
+ /**
27
+ * 处理观众端举手发言完了,然后在禁止发言,这个时候,没有必要在拉所有人的流,把除了混流的人的流都取消订阅,然后播放混流的声音
28
+ */
29
+ handleAudienceDisable(): Promise<void>;
30
+ /**
31
+ * 观众允许发言,允许发言之后,要把所有的流都拉,然后混流静音
32
+ */
33
+ handleAudienceEnable(): Promise<void>;
34
+ }
35
+ export default BMLiveVM;
@@ -0,0 +1,215 @@
1
+ /**
2
+ * @name: BMRoomInfo
3
+ * @author: yangliye
4
+ * @date: 2022-05-18 13:52
5
+ * @description:BMRoomInfo
6
+ * @update: 2022-05-18 13:52
7
+ */
8
+ import { BehaviorSubject, Subject } from 'rxjs';
9
+ import { audioOffWatcherValue } from '../type';
10
+ import BMRoom from './BMRoom';
11
+ import BMUser from '../BMUser/BMUser';
12
+ import { CloudRecord, FilePermission } from "./BMRoomVM";
13
+ interface OperationCustomStats {
14
+ /**
15
+ * 是否允许点赞 0 不可用 1可用
16
+ */
17
+ giveLikeEnable: 0 | 1;
18
+ /**
19
+ * 聊天是否可以用 0 不可用 1可用 2仅主持人 3嘉宾
20
+ */
21
+ chatEnable: 0 | 1 | 2 | 3;
22
+ /**
23
+ * 上传文档权限 设置-文档上传模式 0仅主持人 1 嘉宾 2 全员
24
+ */
25
+ fileUpdateModel: FilePermission;
26
+ /**
27
+ * 文档查看权限 设置-文档查看模式 0仅主持人 1 嘉宾 2 全员
28
+ */
29
+ fileUpdateLook: FilePermission;
30
+ /**
31
+ * 文档下载权限 设置-文档下载模式 0仅主持人 1 嘉宾 2 全员
32
+ */
33
+ fileUpdateDown: FilePermission;
34
+ /**
35
+ * 文档编辑权限 设置-文档编辑模式 0仅主持人 1 嘉宾 2 全员
36
+ */
37
+ fileUpdateEdit: FilePermission;
38
+ /**
39
+ * 共享屏幕权限 设置-屏幕共享模式 0仅主持人 1全员
40
+ */
41
+ screenShareModel: 0 | 1;
42
+ /**
43
+ * 是否仅一人共享 1:是 2:否
44
+ */
45
+ onlyOnePersonShare: 0 | 1;
46
+ /**
47
+ * 云录对象
48
+ * recordStatus 录制状态:0=暂未开始,1=录制中,2=申请中
49
+ * userId:开启人
50
+ */
51
+ cloudRecord: CloudRecord;
52
+ /**
53
+ * 入会时麦克风权限 0全员 1嘉宾 2主持人
54
+ */
55
+ joinAudioEnable: 0 | 1 | 2;
56
+ /**
57
+ * 入会时开启摄像头权限 0全员 1嘉宾 2主持人
58
+ */
59
+ joinVideoEnable: 0 | 1 | 2;
60
+ /**
61
+ * 参会者列表权限 0全员 1嘉宾 2主持人
62
+ */
63
+ userListEnable: 0 | 1 | 2;
64
+ /**
65
+ * 会议中是否允许开启麦克风 0全员 1嘉宾 2主持人
66
+ */
67
+ audioEnable: 0 | 1 | 2;
68
+ /**
69
+ * 会议中是否允许开启摄像头 0全员 1嘉宾 2主持人
70
+ */
71
+ videoEnable: 0 | 1 | 2;
72
+ /**
73
+ * 是否允许自行改名 0全员 1嘉宾
74
+ */
75
+ modifyNameEnable: 0 | 1;
76
+ /**
77
+ * 是否允许开启虚拟背景 0全员 1嘉宾 2主持人
78
+ */
79
+ backgroundAIEnable: 0 | 1 | 2;
80
+ /**
81
+ * 是否允许举手 0禁止全员 1允许嘉宾 2全员可举手
82
+ */
83
+ raiseHandEnable: 0 | 1 | 2;
84
+ /**
85
+ * 入会提示音设置
86
+ */
87
+ joinCueVoice: 0 | 1;
88
+ }
89
+ export default class BMRoomInfo {
90
+ private room;
91
+ /**
92
+ * 房间名
93
+ */
94
+ private _roomName;
95
+ /**
96
+ * 消息序列号
97
+ */
98
+ msgSeq: string;
99
+ /**
100
+ * 房间 号
101
+ */
102
+ roomID: string;
103
+ /**
104
+ * 是否全员静音(业务端用)
105
+ */
106
+ audioOff: boolean;
107
+ /**
108
+ * 是否可以自行开启(业务端用)
109
+ */
110
+ selfopenaudio: boolean;
111
+ /**
112
+ * 是否锁定
113
+ */
114
+ lock: boolean;
115
+ /**
116
+ * 离开提示
117
+ */
118
+ private leaveNotice;
119
+ /**
120
+ * 全员静音状态下是否允许打开麦克风
121
+ * @private
122
+ */
123
+ private openSelf;
124
+ /**
125
+ * 通知公告信息
126
+ */
127
+ chatNotice: string;
128
+ /**
129
+ * 通知公告信息富文本
130
+ */
131
+ chatNoticeRich: string;
132
+ /**
133
+ * 所有的音频举手人员
134
+ */
135
+ private raiseHandsList;
136
+ raiseHandsWatcher: BehaviorSubject<BMUser[]>;
137
+ /**
138
+ * 所有的视频举手的人员
139
+ */
140
+ private raiseVideoHandsList;
141
+ raiseVideoHandsWatcher: BehaviorSubject<BMUser[]>;
142
+ /**
143
+ * 所有的举手的人员
144
+ */
145
+ private raiseSimpleHandsList;
146
+ raiseSimpleHandsWatcher: BehaviorSubject<BMUser[]>;
147
+ operationPermission: OperationCustomStats | undefined;
148
+ operationPermissionWatcher: Subject<OperationCustomStats>;
149
+ chatNoticeWatcher: Subject<unknown>;
150
+ totalUserWatcher: BehaviorSubject<number>;
151
+ totalWaitRoomUserWatcher: BehaviorSubject<number>;
152
+ isOpenWaitRoom: Subject<boolean>;
153
+ constructor();
154
+ get roomName(): string;
155
+ /**
156
+ * 判断是不是大房间使用
157
+ */
158
+ get isBigRoom(): boolean;
159
+ setup(info: any): void;
160
+ bindRoom(room: BMRoom): void;
161
+ initCustomStats(customStats: any): void;
162
+ updateOperationPermission(stats: any): void;
163
+ private handleInitParams;
164
+ audioOffWatcher: Subject<audioOffWatcherValue>;
165
+ lockWatcher: BehaviorSubject<boolean>;
166
+ leaveNoticeWatcher: BehaviorSubject<boolean>;
167
+ openSelfWatcher: BehaviorSubject<boolean>;
168
+ /**
169
+ * 设置是否全员静音
170
+ * @param audioOff
171
+ * @param selfopenaudio 是否可以自行开启
172
+ */
173
+ setAudioOff(audioOff: boolean, selfopenaudio: boolean): void;
174
+ /**
175
+ * 设置是否锁定
176
+ * @param lock
177
+ */
178
+ setlock(lock: boolean): void;
179
+ setLeaveNotice(leaveNotice: boolean): void;
180
+ setRaiseHandsList(userList: BMUser[]): void;
181
+ /**
182
+ * 音频举手处理
183
+ * @param user
184
+ */
185
+ addRaiseHandUser(user: BMUser): void;
186
+ /**
187
+ * 取消音频举手处理
188
+ * @param userId
189
+ */
190
+ removeRaiseHandUser(userId: string): void;
191
+ /**
192
+ * 视频申请处理
193
+ * @param user
194
+ */
195
+ addVideoRaiseHandUser(user: BMUser): void;
196
+ /**
197
+ * 取消视频申请处理
198
+ * @param userId
199
+ */
200
+ removeVideoRaiseHandUser(userId: string): void;
201
+ /**
202
+ * 举手处理
203
+ * @param user
204
+ */
205
+ addSimpleRaiseHandUser(user: BMUser): void;
206
+ /**
207
+ * 取消举手处理
208
+ * @param userId
209
+ */
210
+ removeSimpleRaiseHandUser(userId: string): void;
211
+ private setRaiseHandsWatcherValue;
212
+ private setVideoRaiseHandsWatcherValue;
213
+ private setSimpleRaiseHandsWatcherValue;
214
+ }
215
+ export {};
@@ -0,0 +1,26 @@
1
+ import BMUser from '../BMUser/BMUser';
2
+ import { SingleStream } from '../type';
3
+ /**
4
+ * @name: BMSpeaker
5
+ * @author: liuxinghai
6
+ * @date: 2022-06-07 11:41
7
+ * @description:BMSpeaker
8
+ * 适配 brtc 流对象到 bloud 流对象接口,
9
+ * 用户辅助采用 bloud SpeakerDetector 做说话人检测
10
+ * @date: 2022-06-07 11:41
11
+ */
12
+ export default class BMSpeaker {
13
+ user: BMUser;
14
+ stream: SingleStream;
15
+ constructor(user: BMUser, stream: SingleStream);
16
+ /**
17
+ * 获取对象 ID 标识,此处使用流 ID 标识
18
+ * @returns
19
+ */
20
+ getID(): string;
21
+ /**
22
+ * 获取用户 BMUser 对象
23
+ * @returns
24
+ */
25
+ getUser(): BMUser;
26
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @name: getHTMLMediaStreamOptions
3
+ * @author: yangliye
4
+ * @date: 2022-09-15 14:58
5
+ * @description:getHTMLMediaStreamOptions
6
+ * @update: 2022-09-15 14:58
7
+ */
8
+ interface Options {
9
+ videoElement: HTMLVideoElement;
10
+ }
11
+ export interface Result {
12
+ video: boolean;
13
+ audio: boolean;
14
+ videoSource: MediaStreamTrack;
15
+ audioSource: MediaStreamTrack;
16
+ width: number;
17
+ height: number;
18
+ }
19
+ /**
20
+ * 获取video标签中的mediaStream
21
+ * @param opts
22
+ */
23
+ export declare function getHTMLMediaStreamOptions(opts: Options): Result | null;
24
+ export declare function getMediaStreamInfo(mediaStream: MediaStream, videoInfo: {
25
+ width: number;
26
+ height: number;
27
+ }): {
28
+ video: boolean;
29
+ audio: boolean;
30
+ videoSource: MediaStreamTrack;
31
+ audioSource: MediaStreamTrack;
32
+ width: number;
33
+ height: number;
34
+ } | null;
35
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @name: sortStream
3
+ * @author: yangliye
4
+ * @date: 2023-04-18 11:40
5
+ * @description:sortStream
6
+ * @update: 2023-04-18 11:40
7
+ */
8
+ export declare function getMasterSort(a: boolean, v: boolean): number;
9
+ /**
10
+ * 12 - 15
11
+ */
12
+ export declare function getLocalSort(a: boolean, v: boolean): number;
13
+ /**
14
+ * 8 - 11
15
+ * @param a
16
+ * @param v
17
+ */
18
+ export declare function getManagerSort(a: boolean, v: boolean): number;
19
+ /**
20
+ * 取值范围 4 - 7
21
+ * @param a
22
+ * @param v
23
+ */
24
+ export declare function getGuestSort(a: boolean, v: boolean): number;
25
+ /**
26
+ * 取值范围 0 - 3
27
+ * @param a
28
+ * @param v
29
+ */
30
+ export declare function getCommonSort(a: boolean, v: boolean): number;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @name: SingletonQueue
3
+ * @author: yangliye
4
+ * @date: 2023-05-18 09:47
5
+ * @description:SingletonQueue
6
+ * @update: 2023-05-18 09:47
7
+ */
8
+ declare type CallBack = (arg: Map<string, PullItem>, ...args: any) => void;
9
+ export declare type PullItem = {
10
+ id: string;
11
+ isScreen: boolean;
12
+ isWeb?: boolean;
13
+ force?: boolean;
14
+ };
15
+ export default class SingletonQueue {
16
+ private static instance;
17
+ private _callback;
18
+ private pullMap;
19
+ constructor();
20
+ addUsers(userIds: PullItem[]): void;
21
+ removeUsers(userId: PullItem[]): void;
22
+ restart(): void;
23
+ setQueueProcessor(callback: CallBack): void;
24
+ removeQueueProcessor(): void;
25
+ }
26
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 任性地执行一个函数,不管它有没有、是不是
3
+ *
4
+ * @param fn 调用的函数
5
+ * @param context 执行函数时的 this 指向
6
+ * @param args 调用函数的参数,多参数时传入数组
7
+ * @return 调用函数的返回值
8
+ */
9
+ export default function (fn: any, context?: any, args?: any): any;
@@ -0,0 +1 @@
1
+ export default function (target: any): boolean;
@@ -0,0 +1,2 @@
1
+ declare let nextTick: Function;
2
+ export default nextTick;
@@ -0,0 +1 @@
1
+ export default function (target: any, defaultValue?: string): string;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * 为了压缩,定义的常量
3
+ */
4
+ export declare const TRUE = true;
5
+ export declare const FALSE = false;
6
+ export declare const NULL: null;
7
+ export declare const UNDEFINED: undefined;
8
+ export declare const MINUS_ONE = -1;
9
+ export declare const RAW_TRUE = "true";
10
+ export declare const RAW_FALSE = "false";
11
+ export declare const RAW_NULL = "null";
12
+ export declare const RAW_UNDEFINED = "undefined";
13
+ export declare const RAW_THIS = "this";
14
+ export declare const RAW_VALUE = "value";
15
+ export declare const RAW_LENGTH = "length";
16
+ export declare const RAW_FUNCTION = "function";
17
+ export declare const RAW_WILDCARD = "*";
18
+ export declare const RAW_DOT = ".";
19
+ export declare const RAW_SLASH = "/";
20
+ export declare const RAW_TAG = "tag";
21
+ export declare const KEYPATH_PARENT = "..";
22
+ export declare const KEYPATH_CURRENT = "this";
23
+ /**
24
+ * Single instance for window in browser
25
+ */
26
+ export declare const WINDOW: (Window & typeof globalThis) | undefined;
27
+ /**
28
+ * Single instance for document in browser
29
+ */
30
+ export declare const DOCUMENT: Document | undefined;
31
+ /**
32
+ * Single instance for global in nodejs or browser
33
+ */
34
+ export declare const GLOBAL: typeof globalThis | undefined;
35
+ /**
36
+ * Single instance for noop function
37
+ */
38
+ export declare const EMPTY_FUNCTION: () => void;
39
+ /**
40
+ * 空对象,很多地方会用到,比如 `a || EMPTY_OBJECT` 确保是个对象
41
+ */
42
+ export declare const EMPTY_OBJECT: Readonly<{}>;
43
+ /**
44
+ * 空数组
45
+ */
46
+ export declare const EMPTY_ARRAY: readonly never[];
47
+ /**
48
+ * 空字符串
49
+ */
50
+ export declare const EMPTY_STRING = "";
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Check if value is a function.
3
+ *
4
+ * @param value
5
+ * @return
6
+ */
7
+ export declare function func(value: any): boolean;
8
+ /**
9
+ * Check if value is an array.
10
+ *
11
+ * @param value
12
+ * @return
13
+ */
14
+ export declare function array(value: any): boolean;
15
+ /**
16
+ * Check if value is an object.
17
+ *
18
+ * @param value
19
+ * @return
20
+ */
21
+ export declare function object(value: any): boolean;
22
+ /**
23
+ * Check if value is a string.
24
+ *
25
+ * @param value
26
+ * @return
27
+ */
28
+ export declare function string(value: any): boolean;
29
+ /**
30
+ * Check if value is a number.
31
+ *
32
+ * @param value
33
+ * @return
34
+ */
35
+ export declare function number(value: any): boolean;
36
+ /**
37
+ * Check if value is boolean.
38
+ *
39
+ * @param value
40
+ * @return
41
+ */
42
+ export declare function boolean(value: any): boolean;
43
+ /**
44
+ * Check if value is numeric.
45
+ *
46
+ * @param value
47
+ * @return
48
+ */
49
+ export declare function numeric(value: any): boolean;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * 连字符转成驼峰
3
+ *
4
+ * @param str
5
+ * @return 驼峰格式的字符串
6
+ */
7
+ export declare function camelize(str: string): string;
8
+ /**
9
+ * 驼峰转成连字符
10
+ *
11
+ * @param str
12
+ * @return 连字符格式的字符串
13
+ */
14
+ export declare function hyphenate(str: string): string;
15
+ /**
16
+ * 首字母大写
17
+ *
18
+ * @param str
19
+ * @return
20
+ */
21
+ export declare function capitalize(str: string): string;
22
+ /**
23
+ * 清除两侧空白符
24
+ *
25
+ * @param str
26
+ * @return 清除两侧空白符的字符串
27
+ */
28
+ export declare function trim(str: any): string;
29
+ /**
30
+ * 截取字符串
31
+ *
32
+ * @param str
33
+ * @param start
34
+ * @param end
35
+ * @return
36
+ */
37
+ export declare function slice(str: string, start: number, end?: number): string;
38
+ /**
39
+ * 获取子串的起始位置
40
+ *
41
+ * @param str
42
+ * @param part
43
+ * @param start
44
+ * @return
45
+ */
46
+ export declare function indexOf(str: string, part: string, start?: number): number;
47
+ /**
48
+ * 获取子串的起始位置
49
+ *
50
+ * @param str
51
+ * @param part
52
+ * @param end
53
+ * @return
54
+ */
55
+ export declare function lastIndexOf(str: string, part: string, end?: number): number;
56
+ /**
57
+ * str 是否以 part 开头
58
+ *
59
+ * @param str
60
+ * @param part
61
+ * @return
62
+ */
63
+ export declare function startsWith(str: string, part: string): boolean;
64
+ /**
65
+ * str 是否以 part 结束
66
+ *
67
+ * @param str
68
+ * @param part
69
+ * @return
70
+ */
71
+ export declare function endsWith(str: string, part: string): boolean;
72
+ /**
73
+ * 获取某个位置的字符
74
+ */
75
+ export declare function charAt(str: string, index?: number): string;
76
+ /**
77
+ * 获取某个位置的字符编码
78
+ */
79
+ export declare function codeAt(str: string, index?: number): number;
80
+ /**
81
+ * 大写格式
82
+ */
83
+ export declare function upper(str: string): string;
84
+ /**
85
+ * 小写格式
86
+ */
87
+ export declare function lower(str: string): string;
88
+ /**
89
+ * str 是否包含 part
90
+ *
91
+ * @param str
92
+ * @param part
93
+ * @return 是否包含
94
+ */
95
+ export declare function has(str: string, part: string): boolean;
96
+ /**
97
+ * 判断长度大于 0 的字符串
98
+ *
99
+ * @param str
100
+ * @return
101
+ */
102
+ export declare function falsy(str: any): boolean;