Skip to content

Commit

Permalink
Feat: 增加 5 个函数,1.8.5-228 functions。
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaoh committed Jul 17, 2023
1 parent 09f97c5 commit 403e341
Show file tree
Hide file tree
Showing 289 changed files with 3,875 additions and 725 deletions.
6 changes: 6 additions & 0 deletions dist/Cookies/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ export declare function setCookie(key: string, value: any, expires: number): voi
* @returns
*/
export declare function removeCookie(key: string): void;
/**
* Clear Cookie
* Example: `clearCookies() => 删除所有的 Cookie`
* @returns
*/
export declare function clearCookies(): void;
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion dist/Cookies/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/Date/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ export declare function isWeekday(date?: string | Date): boolean;
* @returns
*/
export declare function getMonthDays(date?: string | Date): number;
/**
* 获取日期所在的年份中的天数
* Example: `getDayInYear('2023/06/23') => 174`
* @param date 日期
* @returns
*/
export declare function getDayInYear(date?: string | Date): number;
/**
* 获取月份天数
* Example: `getMonthDayCount(new Date()) => 30`
Expand Down
2 changes: 1 addition & 1 deletion dist/Date/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dist/Math/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ export declare function average(...args: any[]): number;
* @returns
*/
export declare function abs(value: number): number;
/**
* 检查一个数字是否偶数
* Example:
* `isEven(-2) => true`
* `isEven(1) => false`
* @param value
* @returns
*/
export declare function isEven(value: number): boolean;
/**
* 去尾法获取数值
* Example:
Expand Down
2 changes: 1 addition & 1 deletion dist/Math/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/Others/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export declare function setIcon(iconLink: string): void;
* @returns
*/
export declare function copyToClipboard(text: string): void;
/**
* 获取鼠标选中内容
* Example: `getSelectText()`
* @returns
*/
export declare function getSelectText(): string | undefined;
/**
* 获取浏览器信息
* Example: `getUserAgent() => { browserName: 'Chrome', browserVersion: '102.0.0.0', osName: 'Windows', osVersion: '10.0', deviceName: '' }`
Expand Down
2 changes: 1 addition & 1 deletion dist/Others/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions dist/Tools/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,17 @@ export declare function showVar(value: any): any;
* @returns
*/
export declare function contains(value: any[], target: any): boolean;
/**
* 反转数组或者字符串
* Example:
* `inversion([1, 2, 3]) => [3, 2, 1]`
* `inversion('123') => '321'`
* `inversion() => undefined`
* `inversion(true) => true`
* @param value
* @returns
*/
export declare function inversion(value: any): any;
/**
* 直到某个函数返回 toBool(true) 的结果(执行完成)
* Example:
Expand Down
Loading

0 comments on commit 403e341

Please sign in to comment.