@yelon/util 18.2.0 → 19.0.0
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/LICENSE +21 -21
- package/README.md +1 -1
- package/browser/cookie.service.d.ts +1 -3
- package/browser/style.d.ts +1 -3
- package/config/abc/date-picker.type.d.ts +2 -5
- package/config/abc/exception.type.d.ts +5 -7
- package/config/abc/loading.type.d.ts +1 -3
- package/config/abc/media.type.d.ts +1 -2
- package/config/abc/st.type.d.ts +11 -18
- package/config/acl/acl.type.d.ts +1 -2
- package/config/chart/chart.type.d.ts +1 -4
- package/config/config.service.d.ts +5 -4
- package/config/sf/sf.type.d.ts +3 -6
- package/config/theme/responsive.type.d.ts +8 -10
- package/date-time/time.d.ts +1 -2
- package/decorator/convert.d.ts +2 -3
- package/fesm2022/array.mjs +4 -4
- package/fesm2022/array.mjs.map +1 -1
- package/fesm2022/browser.mjs +13 -16
- package/fesm2022/browser.mjs.map +1 -1
- package/fesm2022/config.mjs +33 -18
- package/fesm2022/config.mjs.map +1 -1
- package/fesm2022/date-time.mjs +1 -1
- package/fesm2022/date-time.mjs.map +1 -1
- package/fesm2022/decorator.mjs.map +1 -1
- package/fesm2022/form.mjs.map +1 -1
- package/fesm2022/format.mjs +9 -7
- package/fesm2022/format.mjs.map +1 -1
- package/fesm2022/math.mjs.map +1 -1
- package/fesm2022/mcache.mjs.map +1 -1
- package/fesm2022/mtypes.mjs +4 -5
- package/fesm2022/mtypes.mjs.map +1 -1
- package/fesm2022/other.mjs +14 -17
- package/fesm2022/other.mjs.map +1 -1
- package/fesm2022/pipe-currency.mjs +20 -26
- package/fesm2022/pipe-currency.mjs.map +1 -1
- package/fesm2022/pipe-filter.mjs +8 -8
- package/fesm2022/pipe-filter.mjs.map +1 -1
- package/fesm2022/pipe-format.mjs +8 -8
- package/fesm2022/pipe-format.mjs.map +1 -1
- package/fesm2022/token.mjs.map +1 -1
- package/format/string.d.ts +3 -6
- package/mtypes/header-menu.type.d.ts +2 -3
- package/mtypes/menu.type.d.ts +5 -6
- package/mtypes/page.d.ts +1 -2
- package/other/deep.d.ts +4 -7
- package/other/lazy.service.d.ts +2 -5
- package/other/logger.d.ts +3 -4
- package/other/path-to-regexp.service.d.ts +11 -12
- package/package.json +12 -46
- package/pipes/filter/filter.pipe.d.ts +1 -2
- package/esm2022/array/array-type.service.mjs +0 -2
- package/esm2022/array/array.mjs +0 -5
- package/esm2022/array/array.service.mjs +0 -278
- package/esm2022/array/index.mjs +0 -3
- package/esm2022/browser/browser.mjs +0 -5
- package/esm2022/browser/cookie.service.mjs +0 -100
- package/esm2022/browser/copy.mjs +0 -28
- package/esm2022/browser/index.mjs +0 -6
- package/esm2022/browser/is-empty.mjs +0 -19
- package/esm2022/browser/scroll.service.mjs +0 -85
- package/esm2022/browser/style.mjs +0 -38
- package/esm2022/config/abc/cell.type.mjs +0 -2
- package/esm2022/config/abc/date-picker.type.mjs +0 -2
- package/esm2022/config/abc/error-collect.type.mjs +0 -2
- package/esm2022/config/abc/exception.type.mjs +0 -2
- package/esm2022/config/abc/image.type.mjs +0 -2
- package/esm2022/config/abc/index.mjs +0 -18
- package/esm2022/config/abc/loading.type.mjs +0 -2
- package/esm2022/config/abc/lodop.type.mjs +0 -2
- package/esm2022/config/abc/media.type.mjs +0 -2
- package/esm2022/config/abc/onboarding.type.mjs +0 -2
- package/esm2022/config/abc/page-header.type.mjs +0 -2
- package/esm2022/config/abc/pdf.type.mjs +0 -2
- package/esm2022/config/abc/se.type.mjs +0 -2
- package/esm2022/config/abc/sg.type.mjs +0 -2
- package/esm2022/config/abc/st.type.mjs +0 -2
- package/esm2022/config/abc/sv.type.mjs +0 -3
- package/esm2022/config/abc/xlsx.type.mjs +0 -2
- package/esm2022/config/abc/zip.type.mjs +0 -2
- package/esm2022/config/acl/acl.type.mjs +0 -2
- package/esm2022/config/auth/auth.type.mjs +0 -2
- package/esm2022/config/bis/bis.type.mjs +0 -2
- package/esm2022/config/cache/cache.type.mjs +0 -2
- package/esm2022/config/chart/chart.type.mjs +0 -2
- package/esm2022/config/config.mjs +0 -5
- package/esm2022/config/config.service.mjs +0 -38
- package/esm2022/config/config.types.mjs +0 -12
- package/esm2022/config/index.mjs +0 -15
- package/esm2022/config/mock/mock.type.mjs +0 -2
- package/esm2022/config/sf/sf.type.mjs +0 -2
- package/esm2022/config/socket/socket.type.mjs +0 -2
- package/esm2022/config/theme/http.type.mjs +0 -2
- package/esm2022/config/theme/i18n.type.mjs +0 -2
- package/esm2022/config/theme/index.mjs +0 -5
- package/esm2022/config/theme/pipe.type.mjs +0 -2
- package/esm2022/config/theme/responsive.type.mjs +0 -2
- package/esm2022/config/util/array.type.mjs +0 -2
- package/esm2022/config/util/currency.type.mjs +0 -2
- package/esm2022/date-time/date-time.mjs +0 -5
- package/esm2022/date-time/index.mjs +0 -3
- package/esm2022/date-time/picker.mjs +0 -116
- package/esm2022/date-time/time.mjs +0 -103
- package/esm2022/decorator/convert.mjs +0 -66
- package/esm2022/decorator/decorator.mjs +0 -5
- package/esm2022/decorator/index.mjs +0 -3
- package/esm2022/decorator/zone-outside.mjs +0 -57
- package/esm2022/form/form.mjs +0 -5
- package/esm2022/form/index.mjs +0 -3
- package/esm2022/form/match-control.mjs +0 -30
- package/esm2022/form/validators.mjs +0 -81
- package/esm2022/format/currency.service.mjs +0 -233
- package/esm2022/format/currency.types.mjs +0 -8
- package/esm2022/format/format.mjs +0 -5
- package/esm2022/format/index.mjs +0 -5
- package/esm2022/format/string.mjs +0 -85
- package/esm2022/format/validate.mjs +0 -94
- package/esm2022/index.mjs +0 -14
- package/esm2022/math/in-range.mjs +0 -25
- package/esm2022/math/index.mjs +0 -3
- package/esm2022/math/math.mjs +0 -5
- package/esm2022/math/round.mjs +0 -53
- package/esm2022/mcache/index.mjs +0 -2
- package/esm2022/mcache/localStorageUtils.mjs +0 -60
- package/esm2022/mcache/mcache.mjs +0 -5
- package/esm2022/mtypes/authority.type.mjs +0 -2
- package/esm2022/mtypes/header-menu.type.mjs +0 -2
- package/esm2022/mtypes/index.mjs +0 -10
- package/esm2022/mtypes/menu.type.mjs +0 -2
- package/esm2022/mtypes/mtypes.mjs +0 -5
- package/esm2022/mtypes/nav.types.mjs +0 -9
- package/esm2022/mtypes/page.mjs +0 -42
- package/esm2022/mtypes/project-info.types.mjs +0 -2
- package/esm2022/mtypes/response.mjs +0 -2
- package/esm2022/mtypes/role.type.mjs +0 -2
- package/esm2022/mtypes/user.types.mjs +0 -2
- package/esm2022/other/assert.mjs +0 -67
- package/esm2022/other/deep.mjs +0 -78
- package/esm2022/other/favicon.mjs +0 -29
- package/esm2022/other/index.mjs +0 -8
- package/esm2022/other/lazy.service.mjs +0 -129
- package/esm2022/other/logger.mjs +0 -33
- package/esm2022/other/other.mjs +0 -5
- package/esm2022/other/path-to-regexp.service.mjs +0 -239
- package/esm2022/other/resize.mjs +0 -4
- package/esm2022/pipes/currency/cny.pipe.mjs +0 -23
- package/esm2022/pipes/currency/index.mjs +0 -5
- package/esm2022/pipes/currency/mega.pipe.mjs +0 -25
- package/esm2022/pipes/currency/module.mjs +0 -19
- package/esm2022/pipes/currency/pipe-currency.mjs +0 -5
- package/esm2022/pipes/currency/price.pipe.mjs +0 -27
- package/esm2022/pipes/filter/filter.pipe.mjs +0 -20
- package/esm2022/pipes/filter/index.mjs +0 -3
- package/esm2022/pipes/filter/module.mjs +0 -17
- package/esm2022/pipes/filter/pipe-filter.mjs +0 -5
- package/esm2022/pipes/format/index.mjs +0 -3
- package/esm2022/pipes/format/mask.pipe.mjs +0 -34
- package/esm2022/pipes/format/module.mjs +0 -17
- package/esm2022/pipes/format/pipe-format.mjs +0 -5
- package/esm2022/pipes/index.mjs +0 -4
- package/esm2022/pipes/pipes.mjs +0 -5
- package/esm2022/token/index.mjs +0 -3
- package/esm2022/token/page-visibility.mjs +0 -15
- package/esm2022/token/token.mjs +0 -5
- package/esm2022/token/window.mjs +0 -17
- package/esm2022/yelon-util.mjs +0 -5
@@ -1,233 +0,0 @@
|
|
1
|
-
import { CurrencyPipe, formatNumber } from '@angular/common';
|
2
|
-
import { DEFAULT_CURRENCY_CODE, Injectable, LOCALE_ID, inject } from '@angular/core';
|
3
|
-
import { CurrencyMega_Powers } from './currency.types';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
import * as i1 from "@yelon/util/config";
|
6
|
-
export class CurrencyService {
|
7
|
-
constructor(cog) {
|
8
|
-
this.locale = inject(LOCALE_ID);
|
9
|
-
this.defCurrencyCode = inject(DEFAULT_CURRENCY_CODE, { optional: true }) ?? 'USD';
|
10
|
-
this.currencyPipe = new CurrencyPipe(this.locale, this.defCurrencyCode);
|
11
|
-
this.c = cog.merge('utilCurrency', {
|
12
|
-
startingUnit: 'yuan',
|
13
|
-
megaUnit: { Q: '京', T: '兆', B: '亿', M: '万', K: '千' },
|
14
|
-
precision: 2,
|
15
|
-
ignoreZeroPrecision: true
|
16
|
-
});
|
17
|
-
}
|
18
|
-
/**
|
19
|
-
* Format a number with commas as thousands separators
|
20
|
-
*
|
21
|
-
* 格式化货币,用逗号将数字格式化为千位分隔符
|
22
|
-
* ```ts
|
23
|
-
* 10000 => `10,000`
|
24
|
-
* 10000.567 => `10,000.57`
|
25
|
-
* ```
|
26
|
-
*/
|
27
|
-
format(value, options) {
|
28
|
-
options = {
|
29
|
-
startingUnit: this.c.startingUnit,
|
30
|
-
precision: this.c.precision,
|
31
|
-
ignoreZeroPrecision: this.c.ignoreZeroPrecision,
|
32
|
-
ngCurrency: this.c.ngCurrency,
|
33
|
-
...options
|
34
|
-
};
|
35
|
-
let truthValue = Number(value);
|
36
|
-
if (value == null || isNaN(truthValue)) {
|
37
|
-
return '';
|
38
|
-
}
|
39
|
-
if (options.startingUnit === 'cent') {
|
40
|
-
truthValue = truthValue / 100;
|
41
|
-
}
|
42
|
-
if (options.ngCurrency != null) {
|
43
|
-
const cur = options.ngCurrency;
|
44
|
-
return this.currencyPipe.transform(truthValue, cur.currencyCode, cur.display, cur.digitsInfo, cur.locale || this.locale);
|
45
|
-
}
|
46
|
-
const res = formatNumber(truthValue, this.locale, `.${options.ignoreZeroPrecision ? 1 : options.precision}-${options.precision}`);
|
47
|
-
return options.ignoreZeroPrecision ? res.replace(/(?:\.[0]+)$/g, '') : res;
|
48
|
-
}
|
49
|
-
/**
|
50
|
-
* Large number format filter
|
51
|
-
*
|
52
|
-
* 大数据格式化
|
53
|
-
* ```ts
|
54
|
-
* 1000 => { value: '1', unit: 'K', unitI18n: '千' }
|
55
|
-
* 12456 => { value: '12.46', unit: 'K', unitI18n: '千' }
|
56
|
-
* ```
|
57
|
-
*/
|
58
|
-
mega(value, options) {
|
59
|
-
options = { precision: this.c.precision, unitI18n: this.c.megaUnit, startingUnit: this.c.startingUnit, ...options };
|
60
|
-
let num = Number(value);
|
61
|
-
const res = { raw: value, value: '', unit: '', unitI18n: '' };
|
62
|
-
if (isNaN(num) || num === 0) {
|
63
|
-
res.value = value.toString();
|
64
|
-
return res;
|
65
|
-
}
|
66
|
-
if (options.startingUnit === 'cent') {
|
67
|
-
num = num / 100;
|
68
|
-
}
|
69
|
-
let abs = Math.abs(+num);
|
70
|
-
const rounder = Math.pow(10, options.precision);
|
71
|
-
const isNegative = num < 0;
|
72
|
-
for (const p of CurrencyMega_Powers) {
|
73
|
-
let reduced = abs / p.value;
|
74
|
-
reduced = Math.round(reduced * rounder) / rounder;
|
75
|
-
if (reduced >= 1) {
|
76
|
-
abs = reduced;
|
77
|
-
res.unit = p.unit;
|
78
|
-
break;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
res.value = (isNegative ? '-' : '') + abs;
|
82
|
-
res.unitI18n = options.unitI18n[res.unit];
|
83
|
-
return res;
|
84
|
-
}
|
85
|
-
/**
|
86
|
-
* Converted into RMB notation.
|
87
|
-
*
|
88
|
-
* 转化成人民币表示法
|
89
|
-
*/
|
90
|
-
cny(value, options) {
|
91
|
-
options = {
|
92
|
-
inWords: true,
|
93
|
-
minusSymbol: '负',
|
94
|
-
startingUnit: this.c.startingUnit,
|
95
|
-
...options
|
96
|
-
};
|
97
|
-
value = Number(value);
|
98
|
-
if (isNaN(value)) {
|
99
|
-
return '';
|
100
|
-
}
|
101
|
-
if (options.startingUnit === 'cent') {
|
102
|
-
value = value / 100;
|
103
|
-
}
|
104
|
-
value = value.toString();
|
105
|
-
let integer;
|
106
|
-
let decimal;
|
107
|
-
[integer, decimal] = value.split('.');
|
108
|
-
let symbol = '';
|
109
|
-
if (integer.startsWith('-')) {
|
110
|
-
symbol = options.minusSymbol;
|
111
|
-
integer = integer.substring(1);
|
112
|
-
}
|
113
|
-
if (/^-?\d+$/.test(value)) {
|
114
|
-
decimal = null;
|
115
|
-
}
|
116
|
-
integer = (+integer).toString();
|
117
|
-
const inWords = options.inWords;
|
118
|
-
const unit = {
|
119
|
-
num: inWords
|
120
|
-
? ['', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '点']
|
121
|
-
: ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '点'],
|
122
|
-
radice: inWords
|
123
|
-
? [
|
124
|
-
'',
|
125
|
-
'拾',
|
126
|
-
'佰',
|
127
|
-
'仟',
|
128
|
-
'万',
|
129
|
-
'拾',
|
130
|
-
'佰',
|
131
|
-
'仟',
|
132
|
-
'亿',
|
133
|
-
'拾',
|
134
|
-
'佰',
|
135
|
-
'仟',
|
136
|
-
'万亿',
|
137
|
-
'拾',
|
138
|
-
'佰',
|
139
|
-
'仟',
|
140
|
-
'兆',
|
141
|
-
'拾',
|
142
|
-
'佰',
|
143
|
-
'仟'
|
144
|
-
]
|
145
|
-
: [
|
146
|
-
'',
|
147
|
-
'十',
|
148
|
-
'百',
|
149
|
-
'千',
|
150
|
-
'万',
|
151
|
-
'十',
|
152
|
-
'百',
|
153
|
-
'千',
|
154
|
-
'亿',
|
155
|
-
'十',
|
156
|
-
'百',
|
157
|
-
'千',
|
158
|
-
'万亿',
|
159
|
-
'十',
|
160
|
-
'百',
|
161
|
-
'千',
|
162
|
-
'兆',
|
163
|
-
'十',
|
164
|
-
'百',
|
165
|
-
'千'
|
166
|
-
],
|
167
|
-
dec: ['角', '分', '厘', '毫']
|
168
|
-
};
|
169
|
-
if (inWords) {
|
170
|
-
value = (+value).toFixed(5).toString();
|
171
|
-
}
|
172
|
-
let integerRes = '';
|
173
|
-
const integerCount = integer.length;
|
174
|
-
if (integer === '0' || integerCount === 0) {
|
175
|
-
integerRes = '零';
|
176
|
-
}
|
177
|
-
else {
|
178
|
-
let cnDesc = '';
|
179
|
-
for (let i = 0; i < integerCount; i++) {
|
180
|
-
const n = +integer[i];
|
181
|
-
const j = integerCount - i - 1;
|
182
|
-
const isZero = i > 1 && n !== 0 && integer[i - 1] === '0';
|
183
|
-
const cnZero = isZero ? '零' : '';
|
184
|
-
const isEmpptyUnit = (n === 0 && j % 4 !== 0) || integer.substring(i - 3, i - 3 + 4) === '0000';
|
185
|
-
const descMark = cnDesc;
|
186
|
-
let cnNum = unit.num[n];
|
187
|
-
cnDesc = isEmpptyUnit ? '' : unit.radice[j];
|
188
|
-
// 第一位是一十
|
189
|
-
if (i === 0 && cnNum === '一' && cnDesc === '十')
|
190
|
-
cnNum = '';
|
191
|
-
const isChangeEr = n > 1 &&
|
192
|
-
cnNum === '二' && // 去除首位
|
193
|
-
['', '十', '百'].indexOf(cnDesc) === -1 && // 不读两\两十\两百
|
194
|
-
descMark !== '十'; // 不读十两
|
195
|
-
if (isChangeEr)
|
196
|
-
cnNum = '两';
|
197
|
-
integerRes += cnZero + cnNum + cnDesc;
|
198
|
-
}
|
199
|
-
}
|
200
|
-
// 小数部分拼接
|
201
|
-
let decimalRes = '';
|
202
|
-
const decimalCount = decimal ? decimal.toString().length : 0;
|
203
|
-
if (decimal === null) {
|
204
|
-
decimalRes = inWords ? '整' : '';
|
205
|
-
}
|
206
|
-
else if (decimal === '0') {
|
207
|
-
decimalRes = '零';
|
208
|
-
}
|
209
|
-
else {
|
210
|
-
for (let i = 0; i < decimalCount; i++) {
|
211
|
-
if (inWords && i > unit.dec.length - 1)
|
212
|
-
break;
|
213
|
-
const n = decimal[i];
|
214
|
-
const cnZero = n === '0' ? '零' : '';
|
215
|
-
const cnNum = unit.num[+n];
|
216
|
-
const cnDesc = inWords ? unit.dec[i] : '';
|
217
|
-
decimalRes += cnZero + cnNum + cnDesc;
|
218
|
-
}
|
219
|
-
}
|
220
|
-
const ret = symbol +
|
221
|
-
(inWords
|
222
|
-
? integerRes + (decimalRes === '零' ? '元整' : `元${decimalRes}`)
|
223
|
-
: integerRes + (decimalRes === '' ? '' : `点${decimalRes}`));
|
224
|
-
return ret;
|
225
|
-
}
|
226
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, deps: [{ token: i1.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
227
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
|
228
|
-
}
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: CurrencyService, decorators: [{
|
230
|
-
type: Injectable,
|
231
|
-
args: [{ providedIn: 'root' }]
|
232
|
-
}], ctorParameters: () => [{ type: i1.YunzaiConfigService }] });
|
233
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3kuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvZm9ybWF0L2N1cnJlbmN5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUM3RCxPQUFPLEVBQUUscUJBQXFCLEVBQUUsVUFBV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fpmYYnLCAn5p+SJywgJ+aNjCcsICfnjpYnLCAn54K5J11cbiAgICAgICAgOiBbJycsICfkuIAnLCAn5LqMJywgJ+S4iScsICflm5snLCAn5LqUJywgJ+WFrScsICfkuIMnLCAn5YWrJywgJ+S5nScsICfngrknXSxcbiAgICAgIHJhZGljZTogaW5Xb3Jkc1xuICAgICAgICA/IFtcbiAgICAgICAgICAgICcnLFxuICAgICAgICAgICAgJ+aLvicsXG4gICAgICAgICAgICAn5L2wJyxcbiAgICAgICAgICAgICfku58nLFxuICAgICAgICAgICAgJ+S4hycsXG4gICAgICAgICAgICAn5ou+JyxcbiAgICAgICAgICAgICfkvbAnLFxuICAgICAgICAgICAgJ+S7nycsXG4gICAgICAgICAgICAn5Lq/JyxcbiAgICAgICAgICAgICfmi74nLFxuICAgICAgICAgICAgJ+S9sCcsXG4gICAgICAgICAgICAn5LufJyxcbiAgICAgICAgICAgICfkuIfkur8nLFxuICAgICAgICAgICAgJ+aLvicsXG4gICAgICAgICAgICAn5L2wJyxcbiAgICAgICAgICAgICfku58nLFxuICAgICAgICAgICAgJ+WFhicsXG4gICAgICAgICAgICAn5ou+JyxcbiAgICAgICAgICAgICfkvbAnLFxuICAgICAgICAgICAgJ+S7nydcbiAgICAgICAgICBdXG4gICAgICAgIDogW1xuICAgICAgICAgICAgJycsXG4gICAgICAgICAgICAn5Y2BJyxcbiAgICAgICAgICAgICfnmb4nLFxuICAgICAgICAgICAgJ+WNgycsXG4gICAgICAgICAgICAn5LiHJyxcbiAgICAgICAgICAgICfljYEnLFxuICAgICAgICAgICAgJ+eZvicsXG4gICAgICAgICAgICAn5Y2DJyxcbiAgICAgICAgICAgICfkur8nLFxuICAgICAgICAgICAgJ+WNgScsXG4gICAgICAgICAgICAn55m+JyxcbiAgICAgICAgICAgICfljYMnLFxuICAgICAgICAgICAgJ+S4h+S6vycsXG4gICAgICAgICAgICAn5Y2BJyxcbiAgICAgICAgICAgICfnmb4nLFxuICAgICAgICAgICAgJ+WNgycsXG4gICAgICAgICAgICAn5YWGJyxcbiAgICAgICAgICAgICfljYEnLFxuICAgICAgICAgICAgJ+eZvicsXG4gICAgICAgICAgICAn5Y2DJ1xuICAgICAgICAgIF0sXG4gICAgICBkZWM6IFsn6KeSJywgJ+WIhicsICfljpgnLCAn5q+rJ11cbiAgICB9O1xuICAgIGlmIChpbldvcmRzKSB7XG4gICAgICB2YWx1ZSA9ICgrdmFsdWUpLnRvRml4ZWQoNSkudG9TdHJpbmcoKTtcbiAgICB9XG4gICAgbGV0IGludGVnZXJSZXMgPSAnJztcbiAgICBjb25zdCBpbnRlZ2VyQ291bnQgPSBpbnRlZ2VyLmxlbmd0aDtcbiAgICBpZiAoaW50ZWdlciA9PT0gJzAnIHx8IGludGVnZXJDb3VudCA9PT0gMCkge1xuICAgICAgaW50ZWdlclJlcyA9ICfpm7YnO1xuICAgIH0gZWxzZSB7XG4gICAgICBsZXQgY25EZXNjID0gJyc7XG4gICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGludGVnZXJDb3VudDsgaSsrKSB7XG4gICAgICAgIGNvbnN0IG4gPSAraW50ZWdlcltpXTtcbiAgICAgICAgY29uc3QgaiA9IGludGVnZXJDb3VudCAtIGkgLSAxO1xuICAgICAgICBjb25zdCBpc1plcm8gPSBpID4gMSAmJiBuICE9PSAwICYmIGludGVnZXJbaSAtIDFdID09PSAnMCc7XG4gICAgICAgIGNvbnN0IGNuWmVybyA9IGlzWmVybyA/ICfpm7YnIDogJyc7XG4gICAgICAgIGNvbnN0IGlzRW1wcHR5VW5pdCA9IChuID09PSAwICYmIGogJSA0ICE9PSAwKSB8fCBpbnRlZ2VyLnN1YnN0cmluZyhpIC0gMywgaSAtIDMgKyA0KSA9PT0gJzAwMDAnO1xuICAgICAgICBjb25zdCBkZXNjTWFyayA9IGNuRGVzYztcbiAgICAgICAgbGV0IGNuTnVtID0gdW5pdC5udW1bbl07XG5cbiAgICAgICAgY25EZXNjID0gaXNFbXBwdHlVbml0ID8gJycgOiB1bml0LnJhZGljZVtqXTtcbiAgICAgICAgLy8g56ys5LiA5L2N5piv5LiA5Y2BXG4gICAgICAgIGlmIChpID09PSAwICYmIGNuTnVtID09PSAn5LiAJyAmJiBjbkRlc2MgPT09ICfljYEnKSBjbk51bSA9ICcnO1xuICAgICAgICBjb25zdCBpc0NoYW5nZUVyID1cbiAgICAgICAgICBuID4gMSAmJlxuICAgICAgICAgIGNuTnVtID09PSAn5LqMJyAmJiAvLyDljrvpmaTpppbkvY1cbiAgICAgICAgICBbJycsICfljYEnLCAn55m+J10uaW5kZXhPZihjbkRlc2MpID09PSAtMSAmJiAvLyDkuI3or7vkuKRcXOS4pOWNgVxc5Lik55m+XG4gICAgICAgICAgZGVzY01hcmsgIT09ICfljYEnOyAvLyDkuI3or7vljYHkuKRcbiAgICAgICAgaWYgKGlzQ2hhbmdlRXIpIGNuTnVtID0gJ+S4pCc7XG4gICAgICAgIGludGVnZXJSZXMgKz0gY25aZXJvICsgY25OdW0gKyBjbkRlc2M7XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8g5bCP5pWw6YOo5YiG5ou85o6lXG4gICAgbGV0IGRlY2ltYWxSZXMgPSAnJztcbiAgICBjb25zdCBkZWNpbWFsQ291bnQgPSBkZWNpbWFsID8gZGVjaW1hbC50b1N0cmluZygpLmxlbmd0aCA6IDA7XG4gICAgaWYgKGRlY2ltYWwgPT09IG51bGwpIHtcbiAgICAgIGRlY2ltYWxSZXMgPSBpbldvcmRzID8gJ+aVtCcgOiAnJztcbiAgICB9IGVsc2UgaWYgKGRlY2ltYWwgPT09ICcwJykge1xuICAgICAgZGVjaW1hbFJlcyA9ICfpm7YnO1xuICAgIH0gZWxzZSB7XG4gICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRlY2ltYWxDb3VudDsgaSsrKSB7XG4gICAgICAgIGlmIChpbldvcmRzICYmIGkgPiB1bml0LmRlYy5sZW5ndGggLSAxKSBicmVhaztcbiAgICAgICAgY29uc3QgbiA9IGRlY2ltYWxbaV07XG4gICAgICAgIGNvbnN0IGNuWmVybyA9IG4gPT09ICcwJyA/ICfpm7YnIDogJyc7XG4gICAgICAgIGNvbnN0IGNuTnVtID0gdW5pdC5udW1bK25dO1xuICAgICAgICBjb25zdCBjbkRlc2MgPSBpbldvcmRzID8gdW5pdC5kZWNbaV0gOiAnJztcbiAgICAgICAgZGVjaW1hbFJlcyArPSBjblplcm8gKyBjbk51bSArIGNuRGVzYztcbiAgICAgIH1cbiAgICB9XG4gICAgY29uc3QgcmV0ID1cbiAgICAgIHN5bWJvbCArXG4gICAgICAoaW5Xb3Jkc1xuICAgICAgICA/IGludGVnZXJSZXMgKyAoZGVjaW1hbFJlcyA9PT0gJ+mbticgPyAn5YWD5pW0JyA6IGDlhYMke2RlY2ltYWxSZXN9YClcbiAgICAgICAgOiBpbnRlZ2VyUmVzICsgKGRlY2ltYWxSZXMgPT09ICcnID8gJycgOiBg54K5JHtkZWNpbWFsUmVzfWApKTtcbiAgICByZXR1cm4gcmV0O1xuICB9XG59XG4iXX0=
|
@@ -1,8 +0,0 @@
|
|
1
|
-
export const CurrencyMega_Powers = [
|
2
|
-
{ unit: 'Q', value: Math.pow(10, 15) },
|
3
|
-
{ unit: 'T', value: Math.pow(10, 12) },
|
4
|
-
{ unit: 'B', value: Math.pow(10, 9) },
|
5
|
-
{ unit: 'M', value: Math.pow(10, 6) },
|
6
|
-
{ unit: 'K', value: 1000 }
|
7
|
-
];
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3kudHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Zvcm1hdC9jdXJyZW5jeS50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRUEsTUFBTSxDQUFDLE1BQU0sbUJBQW1CLEdBQUc7SUFDakMsRUFBRSxJQUFJLEVBQU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XJmYWNlIEN1cnJlbmN5TWVnYVVuaXRJMThuIHtcbiAgUTogc3RyaW5nO1xuICBUOiBzdHJpbmc7XG4gIEI6IHN0cmluZztcbiAgTTogc3RyaW5nO1xuICBLOiBzdHJpbmc7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgQ3VycmVuY3lDTllPcHRpb25zIGV4dGVuZHMgQ3VycmVuY3lTdGFydGluZ1VuaXRPcHRpb25zIHtcbiAgLyoqXG4gICAqIFdoZXRoZXIgdG8gcmV0dXJuIHRvIHVwcGVyY2FzZSBub3RhdGlvbiwgZGVmYXVsdDogYHRydWVgXG4gICAqXG4gICAqIOaYr+WQpui/lOWbnuWkp+WGmeihqOekuuazle+8jOm7mOiupO+8mmB0cnVlYFxuICAgKi9cbiAgaW5Xb3Jkcz86IGJvb2xlYW47XG4gIC8qKlxuICAgKiBTcGVjaWZ5IG5lZ2F0aXZlIHNpZ24sIGRlZmF1bHQ6IGBuZWdhdGl2ZWBcbiAgICpcbiAgICog5oyH5a6a6LSf5pWw56ym5Y+377yM6buY6K6k77yaYOi0n2BcbiAgICovXG4gIG1pbnVzU3ltYm9sPzogc3RyaW5nO1xufVxuIl19
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Generated bundle index. Do not edit.
|
3
|
-
*/
|
4
|
-
export * from './index';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9mb3JtYXQvZm9ybWF0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
package/esm2022/format/index.mjs
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
export * from './string';
|
2
|
-
export * from './validate';
|
3
|
-
export * from './currency.service';
|
4
|
-
export * from './currency.types';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Zvcm1hdC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFVBQVUsQ0FBQztBQUN6QixjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3N0cmluZyc7XG5leHBvcnQgKiBmcm9tICcuL3ZhbGlkYXRlJztcbmV4cG9ydCAqIGZyb20gJy4vY3VycmVuY3kuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2N1cnJlbmN5LnR5cGVzJztcbiJdfQ==
|
@@ -1,85 +0,0 @@
|
|
1
|
-
import { deepGet } from '@yelon/util/other';
|
2
|
-
/**
|
3
|
-
* String formatting
|
4
|
-
*
|
5
|
-
* 字符串格式化
|
6
|
-
* ```
|
7
|
-
* format('this is ${name}', { name: 'asdf' })
|
8
|
-
* // output: this is asdf
|
9
|
-
* format('this is ${user.name}', { user: { name: 'asdf' } }, true)
|
10
|
-
* // output: this is asdf
|
11
|
-
* ```
|
12
|
-
*/
|
13
|
-
export function format(str, obj, needDeepGet = false) {
|
14
|
-
return (str || '').replace(/\${([^}]+)}/g, (_work, key) => needDeepGet ? deepGet(obj, key.split('.'), '') : (obj || {})[key] || '');
|
15
|
-
}
|
16
|
-
/**
|
17
|
-
* Format mask
|
18
|
-
*
|
19
|
-
* 格式化掩码
|
20
|
-
*
|
21
|
-
* | 字符 | 描述 |
|
22
|
-
* | --- | --- |
|
23
|
-
* | `0` | 任意数字,若该位置字符不符合,则默认为 `0` 填充 |
|
24
|
-
* | `9` | 任意数字 |
|
25
|
-
* | `#` | 任意字符 |
|
26
|
-
* | `U` | 转换大写 |
|
27
|
-
* | `L` | 转换小写 |
|
28
|
-
* | `*` | 转换为 `*` 字符 |
|
29
|
-
*
|
30
|
-
* ```ts
|
31
|
-
* formatMask('123', '(###)') => (123)
|
32
|
-
* formatMask('15900000000', '999****9999') => 159****0000
|
33
|
-
* ```
|
34
|
-
*/
|
35
|
-
export function formatMask(value, option) {
|
36
|
-
if (!value) {
|
37
|
-
return '';
|
38
|
-
}
|
39
|
-
const opt = {
|
40
|
-
...(typeof option === 'string' ? { mask: option } : option)
|
41
|
-
};
|
42
|
-
const tokens = {
|
43
|
-
'0': { pattern: /\d/, default: '0' },
|
44
|
-
'9': { pattern: /\d/ },
|
45
|
-
'#': { pattern: /[a-zA-Z0-9]/ },
|
46
|
-
U: {
|
47
|
-
pattern: /[a-zA-Z]/,
|
48
|
-
transform: char => char.toLocaleUpperCase()
|
49
|
-
},
|
50
|
-
L: {
|
51
|
-
pattern: /[a-zA-Z]/,
|
52
|
-
transform: char => char.toLocaleLowerCase()
|
53
|
-
},
|
54
|
-
'*': {
|
55
|
-
pattern: /.*/,
|
56
|
-
transform: _ => `*`
|
57
|
-
},
|
58
|
-
...opt.tokens
|
59
|
-
};
|
60
|
-
const splitValue = value.split('');
|
61
|
-
return opt.mask
|
62
|
-
.split('')
|
63
|
-
.reduce((res, cur) => {
|
64
|
-
const token = tokens[cur];
|
65
|
-
if (!token) {
|
66
|
-
res.push(cur);
|
67
|
-
return res;
|
68
|
-
}
|
69
|
-
const value = splitValue.shift() ?? '';
|
70
|
-
if (!token.pattern.test(value)) {
|
71
|
-
if (token.default)
|
72
|
-
res.push(token.default);
|
73
|
-
return res;
|
74
|
-
}
|
75
|
-
if (typeof token.transform === 'function') {
|
76
|
-
res.push(token.transform(value));
|
77
|
-
}
|
78
|
-
else {
|
79
|
-
res.push(value);
|
80
|
-
}
|
81
|
-
return res;
|
82
|
-
}, [])
|
83
|
-
.join('');
|
84
|
-
}
|
85
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdXRpbC9mb3JtYXQvc3RyaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUc1Qzs7Ozs7Ozs7OztHQVVHO0FBQ0gsTUFBTSxVQUFVLE1BQU0sQ0FDcEIsR0FBOEIsRUFDOUIsR0FBaUMsRUFDakMsY0FBdUIsS0FBSztJQUU1QixPQUFPLENBQUMsR0FBRyxJQUFJLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxjQUFjLEVBQUUsQ0FBQyxLQUFhLEVBQUUsR0FBVyxFQUFFLEVBQUUsQ0FDeEUsV0FBVyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxJQUFJLEVBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxJQUFJLEVBQUUsQ0FDeEUsQ0FBQztBQUNKLENBQUM7QUFhRDs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBa0JHO0FBQ0gsTUFBTSxVQUFVLFVBQVUsQ0FBQyxLQUFhLEVBQUUsTUFBaUM7SUFDekUsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQ1gsT0FBTyxFQUFFLENBQUM7SUFDWixDQUFDO0lB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:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)`,
|
7
|
-
color: `(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\\b|(?:rgb|hsl)a?\\([^\\)]*\\)`,
|
8
|
-
chinese: `[\u4e00-\u9fa5]+`
|
9
|
-
};
|
10
|
-
function genRegex(str, flags) {
|
11
|
-
return new RegExp(`^${str}$`, flags);
|
12
|
-
}
|
13
|
-
export const REGEX = {
|
14
|
-
num: genRegex(REGEX_STR.num),
|
15
|
-
idCard: genRegex(REGEX_STR.idCard, 'i'),
|
16
|
-
mobile: genRegex(REGEX_STR.mobile),
|
17
|
-
url: genRegex(REGEX_STR.url),
|
18
|
-
ip: genRegex(REGEX_STR.ip),
|
19
|
-
color: genRegex(REGEX_STR.color),
|
20
|
-
chinese: genRegex(REGEX_STR.chinese)
|
21
|
-
};
|
22
|
-
/**
|
23
|
-
* Wheter is number
|
24
|
-
*
|
25
|
-
* 是否为数字
|
26
|
-
*/
|
27
|
-
export function isNum(value) {
|
28
|
-
return REGEX.num.test(value.toString());
|
29
|
-
}
|
30
|
-
/**
|
31
|
-
* Wheter is integer
|
32
|
-
*
|
33
|
-
* 是否为整数
|
34
|
-
*/
|
35
|
-
export function isInt(value) {
|
36
|
-
return isNum(value) && parseInt(value.toString(), 10).toString() === value.toString();
|
37
|
-
}
|
38
|
-
/**
|
39
|
-
* Wheter is decimal
|
40
|
-
*
|
41
|
-
* 是否为小数点数值
|
42
|
-
*/
|
43
|
-
export function isDecimal(value) {
|
44
|
-
return isNum(value) && !isInt(value);
|
45
|
-
}
|
46
|
-
/**
|
47
|
-
* Wheter is People's Republic of China identity card
|
48
|
-
*
|
49
|
-
* 是否为中华人民共和国居民身份证
|
50
|
-
*/
|
51
|
-
export function isIdCard(value) {
|
52
|
-
return REGEX.idCard.test(value);
|
53
|
-
}
|
54
|
-
/**
|
55
|
-
* Wheter is china mobile (China)
|
56
|
-
*
|
57
|
-
* 是否为手机号(中国)
|
58
|
-
*/
|
59
|
-
export function isMobile(value) {
|
60
|
-
return REGEX.mobile.test(value);
|
61
|
-
}
|
62
|
-
/**
|
63
|
-
* Wheter is url address
|
64
|
-
*
|
65
|
-
* 是否URL地址
|
66
|
-
*/
|
67
|
-
export function isUrl(url) {
|
68
|
-
return REGEX.url.test(url);
|
69
|
-
}
|
70
|
-
/**
|
71
|
-
* Wheter is IPv4 address (Support v4, v6)
|
72
|
-
*
|
73
|
-
* 是否IP4地址(支持v4、v6)
|
74
|
-
*/
|
75
|
-
export function isIp(ip) {
|
76
|
-
return REGEX.ip.test(ip);
|
77
|
-
}
|
78
|
-
/**
|
79
|
-
* Wheter is color
|
80
|
-
*
|
81
|
-
* 是否颜色代码值
|
82
|
-
*/
|
83
|
-
export function isColor(color) {
|
84
|
-
return REGEX.color.test(color);
|
85
|
-
}
|
86
|
-
/**
|
87
|
-
* Wheter is chinese
|
88
|
-
*
|
89
|
-
* 是否中文
|
90
|
-
*/
|
91
|
-
export function isChinese(value) {
|
92
|
-
return REGEX.chinese.test(value);
|
93
|
-
}
|
94
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL2Zvcm1hdC92YWxpZGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxTQUFTLEdBQUc7SUFDdkIsR0FBRyxFQUFFLHFFQUFxRTtJQUMxRSxNQUFNLEVBQUUsb0NBQW9DO0lBQzVDLE1BQU0sRUFBRSwrQkFBK0I7SUFDdkMsR0FBRyxFQUFFLG9MQUFvTDtJQUN6TCxFQUFFLEVBQUUsdzBDQUF3MEM7SUFDNTBDLEtBQUssRUFBRSxtRUFBbUU7SUFDMUUsT0FBTyxFQUFFLGtCQUFrQjtDQUM1QixDQUFDO0FBRUYsU0FBUyxRQUFRLENBQUMsR0FBVyxFQUFFLEtBQWM7SUFDM0MsT0FBTyxJQUFJLE1BQU0sQ0FBQyxJQUFJLEdBQUcsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBQ3ZDLENBQUM7QUFFRCxNQUFNLENBQUMsTUFBTSxLQUFLLEdBQUc7SUFDbkIsR0FBRyxFQUFFLFFBQVEsQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDO0lBQzVCLE1BQU0sRUFBRSxRQUFRLENBQUMsU0FBUyxDQUFDLE1BQU0sRUFBRSxHQUFHLENBQUM7SUFDdkMsTUFBTSxFQUFFLFFBQVEsQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDO0lBQ2xD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b24gaXNVcmwodXJsOiBzdHJpbmcpOiBib29sZWFuIHtcbiAgcmV0dXJuIFJFR0VYLnVybC50ZXN0KHVybCk7XG59XG5cbi8qKlxuICogV2hldGVyIGlzIElQdjQgYWRkcmVzcyAoU3VwcG9ydCB2NCwgdjYpXG4gKlxuICog5piv5ZCmSVA05Zyw5Z2A77yI5pSv5oyBdjTjgIF2Nu+8iVxuICovXG5leHBvcnQgZnVuY3Rpb24gaXNJcChpcDogc3RyaW5nKTogYm9vbGVhbiB7XG4gIHJldHVybiBSRUdFWC5pcC50ZXN0KGlwKTtcbn1cblxuLyoqXG4gKiBXaGV0ZXIgaXMgY29sb3JcbiAqXG4gKiDmmK/lkKbpopzoibLku6PnoIHlgLxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzQ29sb3IoY29sb3I6IHN0cmluZyk6IGJvb2xlYW4ge1xuICByZXR1cm4gUkVHRVguY29sb3IudGVzdChjb2xvcik7XG59XG5cbi8qKlxuICogV2hldGVyIGlzIGNoaW5lc2VcbiAqXG4gKiDmmK/lkKbkuK3mlodcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzQ2hpbmVzZSh2YWx1ZTogc3RyaW5nKTogYm9vbGVhbiB7XG4gIHJldHVybiBSRUdFWC5jaGluZXNlLnRlc3QodmFsdWUpO1xufVxuIl19
|
package/esm2022/index.mjs
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
export * from '@yelon/util/array';
|
2
|
-
export * from '@yelon/util/browser';
|
3
|
-
export * from '@yelon/util/config';
|
4
|
-
export * from '@yelon/util/date-time';
|
5
|
-
export * from '@yelon/util/form';
|
6
|
-
export * from '@yelon/util/format';
|
7
|
-
export * from '@yelon/util/math';
|
8
|
-
export * from '@yelon/util/decorator';
|
9
|
-
export * from '@yelon/util/other';
|
10
|
-
export * from '@yelon/util/pipes';
|
11
|
-
export * from '@yelon/util/token';
|
12
|
-
export * from '@yelon/util/mtypes';
|
13
|
-
export * from '@yelon/util/mcache';
|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SAnQHllbG9uL3V0aWwvcGlwZXMnO1xuZXhwb3J0ICogZnJvbSAnQHllbG9uL3V0aWwvdG9rZW4nO1xuZXhwb3J0ICogZnJvbSAnQHllbG9uL3V0aWwvbXR5cGVzJztcbmV4cG9ydCAqIGZyb20gJ0B5ZWxvbi91dGlsL21jYWNoZSc7XG4iXX0=
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { assertNumber } from '@yelon/util/other';
|
2
|
-
/**
|
3
|
-
* Checks if `value` is between `start` and `end` to, but not including `end`. If `end` is not specified, it's set to start with `start` then set to `0`. If `start` is greater than `end` the params are swapped to support negative ranges.
|
4
|
-
*
|
5
|
-
* 检查 `value` 是否在 `start` 与 `end` 之间,但不包括 `end`。 如果 `end` 没有指定,那么 `start` 设置为 `0`。 如果 `start` 大于 `end`,那么参数会交换以便支持负范围。
|
6
|
-
* ```ts
|
7
|
-
* inRange(3, 2, 4); // true
|
8
|
-
* inRange(4, 8); // true
|
9
|
-
* inRange(4, 2); // false
|
10
|
-
* inRange(2, 2); // false
|
11
|
-
* inRange(1.2, 2); // true
|
12
|
-
* inRange(-3, -2, -6); // true
|
13
|
-
* ```
|
14
|
-
*/
|
15
|
-
export function inRange(value, start, end) {
|
16
|
-
if (end === undefined) {
|
17
|
-
end = start;
|
18
|
-
start = 0;
|
19
|
-
}
|
20
|
-
assertNumber(value);
|
21
|
-
assertNumber(start);
|
22
|
-
assertNumber(end);
|
23
|
-
return value >= Math.min(start, end) && value < Math.max(start, end);
|
24
|
-
}
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW4tcmFuZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL21hdGgvaW4tcmFuZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQ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6wgYGVuZGDjgIIg5aaC5p6cIGBlbmRgIOayoeacieaMh+Wumu+8jOmCo+S5iCBgc3RhcnRgIOiuvue9ruS4uiBgMGDjgIIg5aaC5p6cIGBzdGFydGAg5aSn5LqOIGBlbmRg77yM6YKj5LmI5Y+C5pWw5Lya5Lqk5o2i5Lul5L6/5pSv5oyB6LSf6IyD5Zu044CCXG4gKiBgYGB0c1xuICogaW5SYW5nZSgzLCAyLCA0KTsgLy8gdHJ1ZVxuICogaW5SYW5nZSg0LCA4KTsgLy8gdHJ1ZVxuICogaW5SYW5nZSg0LCAyKTsgLy8gZmFsc2VcbiAqIGluUmFuZ2UoMiwgMik7IC8vIGZhbHNlXG4gKiBpblJhbmdlKDEuMiwgMik7IC8vIHRydWVcbiAqIGluUmFuZ2UoLTMsIC0yLCAtNik7IC8vIHRydWVcbiAqIGBgYFxuICovXG5leHBvcnQgZnVuY3Rpb24gaW5SYW5nZSh2YWx1ZTogbnVtYmVyLCBzdGFydDogbnVtYmVyLCBlbmQ/OiBudW1iZXIpOiBib29sZWFuIHtcbiAgaWYgKGVuZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgZW5kID0gc3RhcnQ7XG4gICAgc3RhcnQgPSAwO1xuICB9XG4gIGFzc2VydE51bWJlcih2YWx1ZSk7XG4gIGFzc2VydE51bWJlcihzdGFydCk7XG4gIGFzc2VydE51bWJlcihlbmQpO1xuICByZXR1cm4gdmFsdWUgPj0gTWF0aC5taW4oc3RhcnQsIGVuZCkgJiYgdmFsdWUgPCBNYXRoLm1heChzdGFydCwgZW5kKTtcbn1cbiJdfQ==
|
package/esm2022/math/index.mjs
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
export * from './in-range';
|
2
|
-
export * from './round';
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL21hdGgvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2luLXJhbmdlJztcbmV4cG9ydCAqIGZyb20gJy4vcm91bmQnO1xuIl19
|
package/esm2022/math/math.mjs
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Generated bundle index. Do not edit.
|
3
|
-
*/
|
4
|
-
export * from './index';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0aC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3V0aWwvbWF0aC9tYXRoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
package/esm2022/math/round.mjs
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Computes `number` rounded up to `precision`.
|
3
|
-
*
|
4
|
-
* 根据 `precision`(精度) 向上舍入 `number`。
|
5
|
-
* ```ts
|
6
|
-
* ceil(4.006); // 5
|
7
|
-
* ceil(6.004, 2); // 6.01
|
8
|
-
* ceil(6040, -2); // 6100
|
9
|
-
* ```
|
10
|
-
*/
|
11
|
-
export function ceil(number, precision = 0) {
|
12
|
-
return createRound(number, precision, 'ceil');
|
13
|
-
}
|
14
|
-
/**
|
15
|
-
* Computes `number` rounded down to `precision`.
|
16
|
-
*
|
17
|
-
* 根据 `precision`(精度) 向下舍入 `number`。
|
18
|
-
* ```ts
|
19
|
-
* floor(4.006); // 4
|
20
|
-
* floor(0.046, 2); // 0.04
|
21
|
-
* floor(4060, -2); // 4000
|
22
|
-
* ```
|
23
|
-
*/
|
24
|
-
export function floor(number, precision = 0) {
|
25
|
-
return createRound(number, precision, 'floor');
|
26
|
-
}
|
27
|
-
/**
|
28
|
-
* Computes `number` rounded to `precision`.
|
29
|
-
*
|
30
|
-
* 根据 `precision`(精度) 四舍五入 `number`。
|
31
|
-
* ```ts
|
32
|
-
* round(4.006); // 4
|
33
|
-
* round(4.006, 2); // 4.01
|
34
|
-
* round(4060, -2); // 4100
|
35
|
-
* ```
|
36
|
-
*/
|
37
|
-
export function round(number, precision = 0) {
|
38
|
-
return createRound(number, precision, 'round');
|
39
|
-
}
|
40
|
-
function createRound(number, precision, methodName) {
|
41
|
-
const func = Math[methodName];
|
42
|
-
precision = precision == null ? 0 : Math.min(precision, 292);
|
43
|
-
if (!precision) {
|
44
|
-
return func(number);
|
45
|
-
}
|
46
|
-
// Shift with exponential notation to avoid floating-point issues.
|
47
|
-
// See [MDN](https://mdn.io/round#Examples) for more details.
|
48
|
-
let pair = `${number}e`.split('e');
|
49
|
-
const value = func(Number(`${pair[0]}e${Number(pair[1]) + precision}`));
|
50
|
-
pair = `${value}e`.split('e');
|
51
|
-
return Number(`${pair[0]}e${Number(pair[1]) - precision}`);
|
52
|
-
}
|
53
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91bmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL21hdGgvcm91bmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLElBQUksQ0FBQyxNQUFjLEVBQUUsWUFBb0IsQ0FBQztJQUN4RCxPQUFPLFdBQVcsQ0FBQyxN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lZSBbTUROXShodHRwczovL21kbi5pby9yb3VuZCNFeGFtcGxlcykgZm9yIG1vcmUgZGV0YWlscy5cbiAgbGV0IHBhaXIgPSBgJHtudW1iZXJ9ZWAuc3BsaXQoJ2UnKTtcbiAgY29uc3QgdmFsdWUgPSBmdW5jKE51bWJlcihgJHtwYWlyWzBdfWUke051bWJlcihwYWlyWzFdKSArIHByZWNpc2lvbn1gKSk7XG4gIHBhaXIgPSBgJHt2YWx1ZX1lYC5zcGxpdCgnZScpO1xuICByZXR1cm4gTnVtYmVyKGAke3BhaXJbMF19ZSR7TnVtYmVyKHBhaXJbMV0pIC0gcHJlY2lzaW9ufWApO1xufVxuIl19
|
package/esm2022/mcache/index.mjs
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './localStorageUtils';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91dGlsL21jYWNoZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9sb2NhbFN0b3JhZ2VVdGlscyc7XG4iXX0=
|