@unicom-cloud/utils 0.1.15 → 0.1.17
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/class-name/index.js +5 -5
- package/constant/index.js +24 -2
- package/constant/platform.js +13 -12
- package/constant.js +24 -2
- package/content-disposition/index.js +3 -3
- package/date/convertTime.js +4 -4
- package/event-emitter/index.js +2 -4
- package/filesize/types/constants.d.ts +81 -0
- package/filesize/types/filesize.d.ts +97 -0
- package/index.js +66 -60
- package/js-cookie/index.d.ts +116 -0
- package/js-cookie/index.js +4 -0
- package/js-cookie/src/api.js +56 -0
- package/js-cookie/src/assign.js +11 -0
- package/js-cookie/src/converter.js +14 -0
- package/jsCookie.js +4 -0
- package/lunar/lib/Holiday.js +2 -6
- package/lunar/lib/HolidayUtil.js +113 -100
- package/lunar/lib/I18n.js +395 -975
- package/lunar/lib/JieQi.js +12 -16
- package/lunar/lib/Lunar.js +224 -672
- package/lunar/lib/LunarMonth.js +35 -98
- package/lunar/lib/LunarTime.js +24 -103
- package/lunar/lib/LunarUtil.js +426 -1728
- package/lunar/lib/LunarYear.js +473 -566
- package/lunar/lib/ShouXingUtil.js +6714 -6690
- package/lunar/lib/Solar.js +24 -49
- package/lunar/lib/SolarHalfYear.js +0 -2
- package/lunar/lib/SolarMonth.js +4 -6
- package/lunar/lib/SolarSeason.js +0 -2
- package/lunar/lib/SolarUtil.js +238 -226
- package/lunar/lib/SolarWeek.js +7 -11
- package/lunar/lib/SolarYear.js +0 -1
- package/nzh/nzh.d.ts +74 -0
- package/package.json +1 -1
- package/query-string/base.d.ts +717 -0
- package/query-string/base.js +268 -0
- package/query-string/index.d.ts +16 -0
- package/query-string/index.js +4 -0
- package/query-string/splitOnFirst.js +14 -0
- package/queryString.js +4 -0
- package/random/index.js +56 -35
- package/snapdom/src/api/preCache.js +51 -28
- package/snapdom/src/core/cache.js +1 -4
- package/snapdom/src/core/capture.js +45 -44
- package/snapdom/src/core/clone.js +82 -66
- package/snapdom/src/core/prepare.js +168 -46
- package/snapdom/src/modules/background.js +29 -19
- package/snapdom/src/modules/fonts.js +146 -91
- package/snapdom/src/modules/images.js +14 -9
- package/snapdom/src/modules/pseudo.js +55 -58
- package/snapdom/src/modules/styles.js +22 -22
- package/snapdom/src/modules/svgDefs.js +39 -20
- package/snapdom/src/utils/cssTools.js +58 -51
- package/snapdom/src/utils/helpers.js +197 -140
- package/snapdom/types/snapdom.d.ts +101 -0
- package/tinycolor/src/conversion.js +1 -1
- package/tinycolor/src/index.js +2 -19
- package/turbo-stream/src/encode.js +5 -8
- package/turbo-stream/src/shared.js +117 -119
- package/types/constant/index.d.ts +11 -0
- package/types/constant/platform.d.ts +1 -0
- package/types/index.d.ts +3 -0
- package/types/js-cookie/index.d.ts +1 -0
- package/types/js-cookie/src/api.d.mts +2 -0
- package/types/js-cookie/src/assign.d.mts +1 -0
- package/types/js-cookie/src/converter.d.mts +5 -0
- package/types/lunar/lib/Lunar.d.ts +0 -98
- package/types/lunar/lib/LunarMonth.d.ts +0 -12
- package/types/lunar/lib/LunarTime.d.ts +0 -22
- package/types/lunar/lib/LunarUtil.d.ts +0 -90
- package/types/lunar/lib/LunarYear.d.ts +0 -30
- package/types/lunar/lib/Solar.d.ts +0 -5
- package/types/query-string/base.d.ts +11 -0
- package/types/query-string/index.d.ts +2 -0
- package/types/query-string/splitOnFirst.d.ts +1 -0
- package/types/random/index.d.ts +14 -23
- package/types/snapdom/src/api/preCache.d.ts +2 -5
- package/types/snapdom/src/core/cache.d.ts +0 -3
- package/types/snapdom/src/core/clone.d.ts +1 -1
- package/types/snapdom/src/modules/background.d.ts +16 -6
- package/types/snapdom/src/modules/fonts.d.ts +5 -1
- package/types/snapdom/src/modules/pseudo.d.ts +1 -1
- package/types/snapdom/src/modules/styles.d.ts +1 -1
- package/types/snapdom/src/modules/svgDefs.d.ts +13 -13
- package/types/snapdom/src/utils/cssTools.d.ts +2 -10
- package/types/snapdom/src/utils/helpers.d.ts +13 -7
- package/types/tinycolor/src/conversion.d.ts +1 -1
- package/types/turbo-stream/src/shared.d.ts +3 -3
- package/url-toolkit/src/url-toolkit.d.ts +22 -0
package/nzh/nzh.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
/*
|
|
3
|
+
* 十的口语化开关, 默认值为 false
|
|
4
|
+
* 注:Nzh.cn和Nzh.hk中的encodeS方法默认 true
|
|
5
|
+
* */
|
|
6
|
+
tenMin?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* "万万"化开关, 默认值为 true
|
|
9
|
+
* */
|
|
10
|
+
ww?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface ToMoneyOptions extends Options {
|
|
13
|
+
/**
|
|
14
|
+
* 输出完整金额开关, toMoney 函数专用配置, 默认 false
|
|
15
|
+
* */
|
|
16
|
+
complete?: boolean;
|
|
17
|
+
/*
|
|
18
|
+
* 输出金额前缀字符, toMoney 函数专用配置, 默认 true
|
|
19
|
+
* */
|
|
20
|
+
outSymbol?: boolean;
|
|
21
|
+
/*
|
|
22
|
+
* 个位为0时不省略元,toMoney 函数专用配置, 默认 false
|
|
23
|
+
* */
|
|
24
|
+
unOmitYuan?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 不以源数据加整,以输出结果加“整”(只要输出的结果没有到分位就加“整”)
|
|
27
|
+
*/
|
|
28
|
+
forceZheng?: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface Lang {
|
|
31
|
+
ch: string;
|
|
32
|
+
ch_u: string;
|
|
33
|
+
ch_f: string;
|
|
34
|
+
ch_d: string;
|
|
35
|
+
m_t: string;
|
|
36
|
+
m_z: string;
|
|
37
|
+
m_u: string;
|
|
38
|
+
}
|
|
39
|
+
interface Langs {
|
|
40
|
+
s: Lang;
|
|
41
|
+
b: Lang;
|
|
42
|
+
hk_s: Lang;
|
|
43
|
+
hk_b: Lang;
|
|
44
|
+
}
|
|
45
|
+
interface BuiltIn {
|
|
46
|
+
encodeS(num: number | string, options?: Options): string;
|
|
47
|
+
encodeB(num: number | string, options?: Options): string;
|
|
48
|
+
decodeS(zhnum: string, options?: Options): string;
|
|
49
|
+
decodeB(zhnum: string, options?: Options): string;
|
|
50
|
+
toMoney(num: number | string, options?: ToMoneyOptions): string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare module 'nzh' {
|
|
54
|
+
export default class Nzh {
|
|
55
|
+
constructor(lang: Lang);
|
|
56
|
+
public encode(num: number | string, options?: Options): string;
|
|
57
|
+
public decode(zhnum: string, options?: Options): string;
|
|
58
|
+
public toMoney(num: number | string, options?: ToMoneyOptions): string;
|
|
59
|
+
|
|
60
|
+
static cn: BuiltIn;
|
|
61
|
+
static hk: BuiltIn;
|
|
62
|
+
static langs: Langs;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare module 'nzh/cn' {
|
|
67
|
+
const nzhcn: BuiltIn;
|
|
68
|
+
export default nzhcn;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare module 'nzh/hk' {
|
|
72
|
+
const nzhhk: BuiltIn;
|
|
73
|
+
export default nzhhk;
|
|
74
|
+
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/utils","version":"0.1.
|
|
1
|
+
{"name":"@unicom-cloud/utils","version":"0.1.17","dependencies":{},"peerDependencies":{"lodash":"^4.17.21"},"main":"./index.js","type":"module","types":"types/index.d.ts","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|