jk-vue-comps 0.1.13 → 0.1.14
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 +1 -1
- package/dist/chunks/index-CB6PmcJE.js +0 -11
- package/dist/chunks/index-ChgNR2U8.js +0 -171
- package/dist/chunks/index-DyiqKziC.js +0 -13
- package/dist/components/GoogleAuth.d.ts +0 -95
- package/dist/components/GoogleAuth.js +0 -71
- package/dist/components/TelegramAuth.d.ts +0 -96
- package/dist/components/TelegramAuth.js +0 -91
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +0 -9
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.js +0 -7
- package/dist/hooks/useCopyToClipboard.d.ts +0 -8
- package/dist/hooks/useCopyToClipboard.js +0 -26
- package/dist/hooks/useMemo.d.ts +0 -2
- package/dist/hooks/useMemo.js +0 -10
- package/dist/index.d.ts +0 -269
- package/dist/index.js +0 -98
- package/dist/utils/index.d.ts +0 -54
- package/dist/utils/index.js +0 -80
- package/dist/utils/is.d.ts +0 -59
- package/dist/utils/is.js +0 -120
- package/dist/utils/math.d.ts +0 -107
- package/dist/utils/math.js +0 -821
- package/dist/utils/timeZone.d.ts +0 -9
- package/dist/utils/timeZone.js +0 -839
- package/dist/utils/vuePropTypes.d.ts +0 -65
- package/dist/utils/vuePropTypes.js +0 -29
- package/dist/utils/withInstall.d.ts +0 -3
- package/dist/utils/withInstall.js +0 -9
package/dist/utils/math.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import BJS from 'bignumber.js';
|
|
2
|
-
export type BigNumVal = Parameters<typeof BJS>[0];
|
|
3
|
-
export type BigNumValType = BigNumVal | undefined | null | boolean;
|
|
4
|
-
export type BigNumObj = BJS;
|
|
5
|
-
export declare const DOWN: 1;
|
|
6
|
-
export declare const UP: 0;
|
|
7
|
-
export declare const BigNumber: typeof BJS;
|
|
8
|
-
export declare function helper(val: BigNumValType): BigNumObj;
|
|
9
|
-
/** 是否为boolean值 */
|
|
10
|
-
export declare function isBool(val: any): val is boolean;
|
|
11
|
-
/** 是否为BigNumber对象 */
|
|
12
|
-
export declare function isBigNum(val: any): val is BigNumObj;
|
|
13
|
-
/** 是否为数字 */
|
|
14
|
-
export declare function isNum(val: any): val is number;
|
|
15
|
-
/** 是否为NaN值(传入任意值转bignumber是否为NaN) */
|
|
16
|
-
export declare function isNanValue(val: any): boolean;
|
|
17
|
-
/** 是否为整数(传入任意值转bignumber是否为整数) */
|
|
18
|
-
export declare function isInt(val: any): boolean;
|
|
19
|
-
/** 是否大于
|
|
20
|
-
* @example isGreaterThan('456', 132) => true
|
|
21
|
-
*/
|
|
22
|
-
export declare function isGreaterThan(num1: BigNumVal, num2: BigNumVal): boolean;
|
|
23
|
-
/** 是否小于
|
|
24
|
-
* @example isLessThan('123', 132) => true
|
|
25
|
-
*/
|
|
26
|
-
export declare function isLessThan(num1: BigNumVal, num2: BigNumVal): boolean;
|
|
27
|
-
/** 是否等于
|
|
28
|
-
* @example isEqualTo('123', 123) => true
|
|
29
|
-
*/
|
|
30
|
-
export declare function isEqualTo(num1: BigNumVal, num2: BigNumVal): boolean;
|
|
31
|
-
/** 是否大于等于
|
|
32
|
-
* @example isGreaterThanOrEqualTo('1223', 123) => true
|
|
33
|
-
* @example isGreaterThanOrEqualTo('123', 123) => true
|
|
34
|
-
*/
|
|
35
|
-
export declare function isGreaterThanOrEqualTo(num1: BigNumVal, num2: BigNumVal): boolean;
|
|
36
|
-
/** 是否小于等于
|
|
37
|
-
* @example isLessThanOrEqualTo('123', 123) => true
|
|
38
|
-
* @example isLessThanOrEqualTo('13', 123) => true
|
|
39
|
-
*/
|
|
40
|
-
export declare function isLessThanOrEqualTo(num1: BigNumVal, num2: BigNumVal): boolean;
|
|
41
|
-
/** 转为BigNumber对象 */
|
|
42
|
-
export declare function toBigNum(val: BigNumValType): BJS;
|
|
43
|
-
/** 转为数字 */
|
|
44
|
-
export declare function toNum(val: BigNumValType): number;
|
|
45
|
-
/**
|
|
46
|
-
* 转为整数
|
|
47
|
-
* @example toInt(15.99) => 15
|
|
48
|
-
* @example toInt(-22.22) => -22
|
|
49
|
-
*/
|
|
50
|
-
export declare function toInt(val: BigNumValType, isUp?: boolean): number;
|
|
51
|
-
/** 转为字符串 */
|
|
52
|
-
export declare function toString(val: BigNumValType): string;
|
|
53
|
-
/**
|
|
54
|
-
* 保留小数位(超过指定位数截断,小于位数不进行0补充)
|
|
55
|
-
* @param val val
|
|
56
|
-
* @param decimal 保留小数位数
|
|
57
|
-
* @param isUp 是否向上舍入 default: false
|
|
58
|
-
* @example toDecimalPlaces(2.326, 2) => 2.32
|
|
59
|
-
* @example toDecimalPlaces(-5.526, 2) => -5.52
|
|
60
|
-
* @example toDecimalPlaces(2.326, 2, true) => 2.33
|
|
61
|
-
* @example toDecimalPlaces(-5.526, 2, true) => -5.53
|
|
62
|
-
*/
|
|
63
|
-
export declare function toDecimalPlaces(val: BigNumValType, decimal?: number, isUp?: boolean): number;
|
|
64
|
-
/** 转为千位符数字 */
|
|
65
|
-
export declare function toLocaleString(val: BigNumValType): string;
|
|
66
|
-
/**
|
|
67
|
-
* 相加
|
|
68
|
-
* @example add(3, 3) => 6
|
|
69
|
-
* @example add(3, 3, 4) => 10
|
|
70
|
-
*/
|
|
71
|
-
export declare function add(...vals: BigNumValType[]): number;
|
|
72
|
-
/**
|
|
73
|
-
* 相减
|
|
74
|
-
* @example subtract('5', 3) => 2
|
|
75
|
-
* @example subtract(5, 3, '2') => 0
|
|
76
|
-
*/
|
|
77
|
-
export declare function subtract(...vals: BigNumValType[]): number;
|
|
78
|
-
/**
|
|
79
|
-
* 相乘
|
|
80
|
-
* @example multiply('3', 5) => 15
|
|
81
|
-
* @example multiply(3, 5, '2') => 30
|
|
82
|
-
*/
|
|
83
|
-
export declare function multiply(...vals: BigNumValType[]): number;
|
|
84
|
-
/**
|
|
85
|
-
* 相除
|
|
86
|
-
* @example divide('9', 3) => 3
|
|
87
|
-
* @example divide('100', 2, 10) => 5
|
|
88
|
-
* @example divide('100', 0, 10) => 0
|
|
89
|
-
*/
|
|
90
|
-
export declare function divide(...vals: BigNumValType[]): number;
|
|
91
|
-
/**
|
|
92
|
-
* 幂运算
|
|
93
|
-
* @example power('2', '3') => 8
|
|
94
|
-
* @example power('10', 2) => 100
|
|
95
|
-
* @example power('-2', 3) => -8
|
|
96
|
-
*/
|
|
97
|
-
export declare function power(base: BigNumValType, exponent: BigNumValType): number;
|
|
98
|
-
/**
|
|
99
|
-
* 小数转为百分比
|
|
100
|
-
* @example 0.1111 => 11.11%
|
|
101
|
-
*/
|
|
102
|
-
export declare function formatRate(val: BigNumValType, unit?: string): string;
|
|
103
|
-
/**
|
|
104
|
-
* 转为百分小数
|
|
105
|
-
* @example 22.22 => 0.2222
|
|
106
|
-
*/
|
|
107
|
-
export declare function unFormatRate(val: BigNumValType): number;
|