Skip to content

Commit

Permalink
Docs: V.2.2.28-306 func.
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaoh committed Nov 12, 2024
1 parent cde0cab commit b0fd482
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
9 changes: 3 additions & 6 deletions src/Others/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: HxB
* @Date: 2022-04-26 14:53:39
* @LastEditors: DoubleAm
* @LastEditTime: 2024-11-12 16:36:39
* @LastEditTime: 2024-11-12 17:08:29
* @Description: 因项目需要常用函数,不管任何项目,都放到一起。注意甄别,没有复用意义的函数就不要添加了。
* @FilePath: \js-xxx\src\Others\index.ts
*/
Expand Down Expand Up @@ -664,11 +664,8 @@ export function getDataStr(value: any, defaultValue = '-', prefix = '', suffix =
* @param replacement 替换值,默认为 `undefined`,如果传入值则替换为该值。
* @returns
* @example
* clearObject({ a: 1, b: null, c: undefined, d: '', e: ' ' });
* // 返回: { a: 1 }
*
* clearObject({ a: 1, b: null, c: undefined, d: '', e: ' ' }, '');
* // 返回: { a: 1, b: '', c: '', d: '', e: '' }
* clearObject({ a: 1, b: null, c: undefined, d: '', e: ' ' }); /// 返回: { a: 1 }
* clearObject({ a: 1, b: null, c: undefined, d: '', e: ' ' }, ''); /// 返回: { a: 1, b: '', c: '', d: '', e: '' }
* @category Others-业务/其他
*/
export function clearObject(obj: any, replacement?: any) {
Expand Down
14 changes: 5 additions & 9 deletions src/String/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -977,19 +977,15 @@ export function loadStr(str: string, params: any, emptyStr?: string): string {
* @param separatorIncludesSpace 默认 false,是否将空格作为分隔符之一
* @example
* splitString("Hello world\nThis is a test\nGood luck!");
* // 返回: ["Hello world", "This is a test", "Good luck!"]
*
* /// 返回: ["Hello world", "This is a test", "Good luck!"]
* splitString("Hello world\nThis is a\ntest\nGood luck!", true);
* // 返回: ["Hello", "world", "This", "is", "a", "test", "Good", "luck!"]
*
* /// 返回: ["Hello", "world", "This", "is", "a", "test", "Good", "luck!"]
* splitString("Hello\n\n\nworld\n\n", false);
* // 返回: ["Hello", "world"]
*
* /// 返回: ["Hello", "world"]
* splitString("", true);
* // 返回: []
*
* /// 返回: []
* splitString(" ", false);
* // 返回: []
* /// 返回: []
* @returns
* @category String-字符串
*/
Expand Down

0 comments on commit b0fd482

Please sign in to comment.