lgutils 1.3.12 → 1.3.13

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/index.d.ts CHANGED
@@ -1,179 +1,227 @@
1
- export declare const accAdd: (arg1: number, arg2: number) => number;
2
-
3
- export declare const accDiv: (arg1: number, arg2: number) => number;
4
-
5
- export declare const accMul: (arg1: number, arg2: number) => number;
6
-
7
- export declare const accSub: (arg1: number, arg2: number) => string;
8
-
9
- export declare const cutTimeFn: (n: number) => string;
10
-
11
- export declare const DATE_FORMAT = "YYYY/MM/DD";
12
-
13
- export declare function digitCnUppercase(n: number): string;
14
-
15
- export declare function disableBrowserZoom(): void;
16
-
17
- export declare const download: (data: string, strFileName?: string, strMimeType?: string, isImgUrl?: boolean | undefined) => true | undefined;
18
-
19
- export declare const fileReaderToBase64: (target: any) => (cb: (p: any) => void) => void;
20
-
21
- export declare const format10k: (n: number) => string;
22
-
23
- export declare const format10kNil: (d: number | NIL) => string;
24
-
25
- export declare const FORMAT_DATE = "YYYY-MM-DD";
26
-
27
- export declare const FORMAT_TIME = "YYYY-MM-DD HH:mm:ss";
28
-
29
- export declare const formatCash: (n: number | {
30
- valueOf(): number;
31
- }) => string;
32
-
33
- export declare const formatCash2: (num: number) => string;
34
-
35
- export declare const formatCashInt: (n: number | {
36
- valueOf(): number;
37
- }) => string;
38
-
39
- export declare const formatCashIntNil: (d: number | {
40
- valueOf(): number;
41
- } | NIL) => string;
42
-
43
- export declare const formatCashNil: (d: number | {
44
- valueOf(): number;
45
- } | NIL) => string;
46
-
47
- export declare const formatCreditEnhanced: (yes: boolean) => string;
48
-
49
- export declare function formatDate(d: string | number, formatType?: string): string;
50
-
51
- export declare const formatDateNil: (d: string | number | null | undefined) => string;
52
-
53
- export declare function formatDuration(period: string): string;
54
-
55
- export declare const formatDurationNil: (d: string | null | undefined) => string;
56
-
57
- export declare const formatRatio: (n: number | {
58
- valueOf(): number;
59
- }) => string;
60
-
61
- export declare const formatRatioNil: (d: number | {
62
- valueOf(): number;
63
- } | NIL) => string;
64
-
65
- export declare const getBase64: (file: File) => Promise<unknown>;
66
-
67
- export declare const getItem: (key: string) => any;
68
-
69
- export declare const getQueryObject: (url?: string) => any;
70
-
71
- export declare const getSearchParams: (search: string) => URLSearchParams;
72
-
73
- export declare const getValOfArr: (_array: number[]) => {
74
- min: any;
75
- max: any;
76
- sum: number;
77
- average: number;
78
- mull: number;
79
- };
80
-
81
- export declare const getValueWithNil: (val: any) => any;
82
-
83
- export declare const inBrowser: boolean;
84
-
85
- declare type IndexType = {
86
- [x: string]: any;
87
- };
88
-
89
- export declare const isArray: (value: any) => boolean;
90
-
91
- export declare const isBlob: (value: any) => any;
92
-
93
- export declare const isCardNo: (cardNum: any) => boolean;
94
-
95
- export declare const isDate: (value: any) => boolean;
96
-
97
- export declare const isEmail: (emailStr: string) => boolean;
98
-
99
- export declare const isFile: (value: any) => any;
100
-
101
- export declare const isNil: (val: any) => val is NIL;
102
-
103
- export declare const isNull: (value: any) => boolean;
104
-
105
- export declare const isObject: (value: any) => boolean;
106
-
107
- export declare const isPhone: (phone: any) => boolean;
108
-
109
- export declare const isSMSCode: (code: any) => any;
110
-
111
- export declare const isUndefined: (value: any) => boolean;
112
-
113
- declare interface IWSObj {
114
- open?: (params?: any) => any;
115
- msg: (params: any) => any;
116
- error?: (params?: any) => any;
117
- disconnect?: (params?: any) => any;
118
- close?: (params?: any) => any;
119
- heartInfo?: any;
120
- }
121
-
122
- export declare const log: (...rest: any) => void;
123
-
124
- declare type NIL = undefined | null | '';
125
-
126
- export declare const NIL_STRING = "\u2014\u2014";
127
-
128
- export declare function normalizeFormValues<T extends IndexType>(values: T): any;
129
-
130
- export declare function normalizeSearchParams(params: IndexType): IndexType;
131
-
132
- export declare const os: () => {
133
- isTablet: boolean;
134
- isPhone: boolean;
135
- isAndroid: boolean;
136
- isPc: boolean;
137
- };
138
-
139
- export declare const playAudio: (mp3Id: string) => void;
140
-
141
- export declare const random: (min: number, max: number) => number;
142
-
143
- export declare const randomString: (len?: number) => string;
144
-
145
- export declare const removeAll: () => any;
146
-
147
- export declare const removeItem: (key: string) => any;
148
-
149
- export declare const setItem: (key: string, value: any) => any;
150
-
151
- export declare const setProxyObj: (data: object, getFn: () => void, setFn: () => void) => object;
152
-
153
- export declare const sortObj: <T extends keyof D, D extends {
154
- [key: string]: any;
155
- }>(obj: D[], property: T, type?: 'asc' | 'desc') => D[];
156
-
157
- export declare const sumObj: <T extends keyof D, D extends {
158
- [key: string]: any;
159
- }>(obj: D[], key: T) => number;
160
-
161
- export declare const trimString: (str: string) => string;
162
-
163
- export declare class WS {
164
- socket: any;
165
- timer: any;
166
- ioUrl: string;
167
- heartInfo: any;
168
- private heartTime;
169
- constructor(ioUrl: string, token?: string);
170
- init(obj: IWSObj): void;
171
- close(): void;
172
- start(info: string): void;
173
- send(msg: AnyObj): void;
174
- reset(): void;
175
- getSocketState(): any;
176
- setHeartTime(time: number): void;
177
- }
178
-
179
- export { }
1
+ export declare const accAdd: (arg1: number, arg2: number) => number
2
+
3
+ export declare const accDiv: (arg1: number, arg2: number) => number
4
+
5
+ export declare const accMul: (arg1: number, arg2: number) => number
6
+
7
+ export declare const accSub: (arg1: number, arg2: number) => string
8
+
9
+ export declare function copyToClipboard(txt: string): void
10
+
11
+ export declare const cutTimeFn: (n: number) => string
12
+
13
+ export declare const DATE_FORMAT = 'YYYY/MM/DD'
14
+
15
+ export declare function digitCnUppercase(n: number): string
16
+
17
+ export declare function disableBrowserZoom(): void
18
+
19
+ export declare const download: (
20
+ data: string,
21
+ strFileName?: string,
22
+ strMimeType?: string,
23
+ isImgUrl?: boolean | undefined
24
+ ) => true | undefined
25
+
26
+ export declare const fileReaderToBase64: (
27
+ target: any
28
+ ) => (cb: (p: any) => void) => void
29
+
30
+ export declare const format10k: (n: number) => string
31
+
32
+ export declare const format10kNil: (d: number | NIL) => string
33
+
34
+ export declare const FORMAT_DATE = 'YYYY-MM-DD'
35
+
36
+ export declare const FORMAT_TIME = 'YYYY-MM-DD HH:mm:ss'
37
+
38
+ export declare const formatCash: (
39
+ n:
40
+ | number
41
+ | {
42
+ valueOf(): number
43
+ }
44
+ ) => string
45
+
46
+ export declare const formatCash2: (num: number) => string
47
+
48
+ export declare const formatCashInt: (
49
+ n:
50
+ | number
51
+ | {
52
+ valueOf(): number
53
+ }
54
+ ) => string
55
+
56
+ export declare const formatCashIntNil: (
57
+ d:
58
+ | number
59
+ | {
60
+ valueOf(): number
61
+ }
62
+ | NIL
63
+ ) => string
64
+
65
+ export declare const formatCashNil: (
66
+ d:
67
+ | number
68
+ | {
69
+ valueOf(): number
70
+ }
71
+ | NIL
72
+ ) => string
73
+
74
+ export declare function formatDate(
75
+ d: string | number,
76
+ formatType?: string
77
+ ): string
78
+
79
+ export declare const formatDateNil: (
80
+ d: string | number | null | undefined
81
+ ) => string
82
+
83
+ export declare function formatDuration(period: string): string
84
+
85
+ export declare const formatDurationNil: (d: string | null | undefined) => string
86
+
87
+ export declare const formatRatio: (
88
+ n:
89
+ | number
90
+ | {
91
+ valueOf(): number
92
+ }
93
+ ) => string
94
+
95
+ export declare const formatRatioNil: (
96
+ d:
97
+ | number
98
+ | {
99
+ valueOf(): number
100
+ }
101
+ | NIL
102
+ ) => string
103
+
104
+ export declare const getBase64: (file: File) => Promise<unknown>
105
+
106
+ export declare const getItem: (key: string) => any
107
+
108
+ export declare const getQueryObject: (url?: string) => any
109
+
110
+ export declare const getSearchParams: (search: string) => URLSearchParams
111
+
112
+ export declare const getValOfArr: (_array: number[]) => {
113
+ min: any
114
+ max: any
115
+ sum: number
116
+ average: number
117
+ mull: number
118
+ }
119
+
120
+ export declare const getValueWithNil: (val: any) => any
121
+
122
+ export declare const inBrowser: boolean
123
+
124
+ export declare const isArray: (value: any) => boolean
125
+
126
+ export declare const isBlob: (value: any) => any
127
+
128
+ export declare const isCardNo: (cardNum: any) => boolean
129
+
130
+ export declare const isDate: (value: any) => boolean
131
+
132
+ export declare const isEmail: (emailStr: string) => boolean
133
+
134
+ export declare const isFile: (value: any) => any
135
+
136
+ export declare const isNil: (val: any) => val is NIL
137
+
138
+ export declare const isNull: (value: any) => boolean
139
+
140
+ export declare const isObject: (value: any) => boolean
141
+
142
+ export declare const isPhone: (phone: any) => boolean
143
+
144
+ export declare const isSMSCode: (code: any) => any
145
+
146
+ export declare const isUndefined: (value: any) => boolean
147
+
148
+ declare interface IWSObj {
149
+ open?: (params?: any) => any
150
+ msg: (params: any) => any
151
+ error?: (params?: any) => any
152
+ disconnect?: (params?: any) => any
153
+ close?: (params?: any) => any
154
+ heartInfo?: any
155
+ }
156
+
157
+ export declare const log: (...rest: any) => void
158
+
159
+ declare type NIL = undefined | null | ''
160
+
161
+ export declare const NIL_STRING = '\u2014\u2014'
162
+
163
+ export declare const os: () => {
164
+ isTablet: boolean
165
+ isPhone: boolean
166
+ isAndroid: boolean
167
+ isPc: boolean
168
+ }
169
+
170
+ export declare const playAudio: (mp3Id: string) => void
171
+
172
+ export declare const random: (min: number, max: number) => number
173
+
174
+ export declare const randomString: (len?: number) => string
175
+
176
+ export declare const removeAll: () => any
177
+
178
+ export declare const removeItem: (key: string) => any
179
+
180
+ export declare const setItem: (key: string, value: any) => any
181
+
182
+ export declare const setProxyObj: (
183
+ data: object,
184
+ getFn: () => void,
185
+ setFn: () => void
186
+ ) => object
187
+
188
+ export declare const sortObj: <
189
+ T extends keyof D,
190
+ D extends {
191
+ [key: string]: any
192
+ }
193
+ >(
194
+ obj: D[],
195
+ property: T,
196
+ type?: 'asc' | 'desc'
197
+ ) => D[]
198
+
199
+ export declare const sumObj: <
200
+ T extends keyof D,
201
+ D extends {
202
+ [key: string]: any
203
+ }
204
+ >(
205
+ obj: D[],
206
+ key: T
207
+ ) => number
208
+
209
+ export declare const trimString: (str: string) => string
210
+
211
+ export declare class WS {
212
+ socket: any
213
+ timer: any
214
+ ioUrl: string
215
+ heartInfo: any
216
+ private heartTime
217
+ constructor(ioUrl: string, token?: string)
218
+ init(obj: IWSObj): void
219
+ close(): void
220
+ start(info: string): void
221
+ send(msg: AnyObj): void
222
+ reset(): void
223
+ getSocketState(): any
224
+ setHeartTime(time: number): void
225
+ }
226
+
227
+ export {}
@@ -4,12 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var qs = require('qs');
6
6
  var d3Format = require('d3-format');
7
- var omit = require('lodash/omit');
8
7
  var moment = require('moment');
9
8
 
10
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
11
10
 
12
- var omit__default = /*#__PURE__*/_interopDefaultLegacy(omit);
13
11
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
14
12
 
15
13
  const log = (...rest) => {
@@ -238,49 +236,44 @@ const SERVER_DATE_FROMAT = 'YYYY-MM-DD';
238
236
  const DATE_FORMAT = 'YYYY/MM/DD';
239
237
  const FORMAT_DATE = SERVER_DATE_FROMAT;
240
238
  const FORMAT_TIME = 'YYYY-MM-DD HH:mm:ss';
241
- function normalizeFormValues(values) {
242
- return Object.entries(values)
243
- .filter(([key, value]) => value !== undefined && value !== 'all')
244
- .reduce((mem, [key, value]) => {
245
- // array for [moment, moment]
246
- if (Array.isArray(value) && value.some(val => moment__default.isMoment(val))) {
247
- if (value[0]) {
248
- mem.startDate = value[0].format(SERVER_DATE_FROMAT);
249
- }
250
- if (value[1]) {
251
- mem.endDate = value[1].format(SERVER_DATE_FROMAT);
252
- }
253
- }
254
- else if (moment__default.isMoment(value)) {
255
- mem[key] = value.format(SERVER_DATE_FROMAT);
256
- }
257
- else
258
- mem[key] = value;
259
- return mem;
260
- }, {});
261
- }
262
- function normalizeSearchParams(params) {
263
- if (params.startDate || params.endDate) {
264
- params = Object.assign(Object.assign({}, omit__default(params, ['startDate', 'endDate'])), { dateRange: [
265
- params.startDate && moment__default(params.startDate),
266
- params.endDate && moment__default(params.endDate)
267
- ] });
268
- }
269
- Object.entries(params).forEach(([key, value]) => {
270
- if (typeof value === 'string' && value.includes(',')) {
271
- params[key] = 'all';
272
- }
273
- });
274
- return params;
275
- }
276
- function formatBool(field) {
277
- return function (yes) {
278
- return yes ? field : '不' + field;
279
- };
280
- }
239
+ // type IndexType = { [x: string]: any }
240
+ // export function normalizeFormValues<T extends IndexType>(values: T) {
241
+ // return Object.entries(values)
242
+ // .filter(([key, value]) => value !== undefined && value !== 'all')
243
+ // .reduce((mem: any, [key, value]) => {
244
+ // // array for [moment, moment]
245
+ // if (Array.isArray(value) && value.some((val) => moment.isMoment(val))) {
246
+ // if (value[0]) {
247
+ // mem.startDate = value[0].format(SERVER_DATE_FROMAT)
248
+ // }
249
+ // if (value[1]) {
250
+ // mem.endDate = value[1].format(SERVER_DATE_FROMAT)
251
+ // }
252
+ // } else if (moment.isMoment(value)) {
253
+ // mem[key] = value.format(SERVER_DATE_FROMAT)
254
+ // } else mem[key] = value
255
+ // return mem
256
+ // }, {} as T)
257
+ // }
258
+ // export function normalizeSearchParams(params: IndexType) {
259
+ // if (params.startDate || params.endDate) {
260
+ // params = {
261
+ // ...omit(params, ['startDate', 'endDate']),
262
+ // dateRange: [
263
+ // params.startDate && moment(params.startDate),
264
+ // params.endDate && moment(params.endDate),
265
+ // ],
266
+ // }
267
+ // }
268
+ // Object.entries(params).forEach(([key, value]) => {
269
+ // if (typeof value === 'string' && value.includes(',')) {
270
+ // params[key] = 'all'
271
+ // }
272
+ // })
273
+ // return params
274
+ // }
281
275
  const format10k = (n) => formatCash(n / 10000);
282
276
  const format10kNil = withDefaultNil(format10k);
283
- const formatCreditEnhanced = formatBool('增信');
284
277
  // null == undefined
285
278
  const isNil = (val) => val == null || val === '';
286
279
  const NIL_STRING = '——';
@@ -289,7 +282,10 @@ const getValueWithNil = (val) => (isNil(val) ? NIL_STRING : val);
289
282
  function digitCnUppercase(n) {
290
283
  var fraction = ['角', '分'];
291
284
  var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
292
- var unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
285
+ var unit = [
286
+ ['元', '万', '亿'],
287
+ ['', '拾', '佰', '仟'],
288
+ ];
293
289
  var head = n < 0 ? '欠' : '';
294
290
  n = Math.abs(n);
295
291
  var s = '';
@@ -319,7 +315,7 @@ const formatDateNil = withDefaultNil(formatDate);
319
315
  const unit = {
320
316
  d: '天',
321
317
  m: '个月',
322
- y: '年'
318
+ y: '年',
323
319
  };
324
320
  function formatDuration(period) {
325
321
  if (!period)
@@ -557,6 +553,15 @@ function disableBrowserZoom() {
557
553
  });
558
554
  }
559
555
 
556
+ function copyToClipboard(txt) {
557
+ var textarea = document.createElement('textarea');
558
+ textarea.value = txt;
559
+ document.body.appendChild(textarea);
560
+ textarea.select();
561
+ document.execCommand('copy');
562
+ document.body.removeChild(textarea);
563
+ }
564
+
560
565
  exports.DATE_FORMAT = DATE_FORMAT;
561
566
  exports.FORMAT_DATE = FORMAT_DATE;
562
567
  exports.FORMAT_TIME = FORMAT_TIME;
@@ -566,6 +571,7 @@ exports.accAdd = accAdd;
566
571
  exports.accDiv = accDiv;
567
572
  exports.accMul = accMul;
568
573
  exports.accSub = accSub;
574
+ exports.copyToClipboard = copyToClipboard;
569
575
  exports.cutTimeFn = cutTimeFn;
570
576
  exports.digitCnUppercase = digitCnUppercase;
571
577
  exports.disableBrowserZoom = disableBrowserZoom;
@@ -578,7 +584,6 @@ exports.formatCash2 = formatCash2;
578
584
  exports.formatCashInt = formatCashInt;
579
585
  exports.formatCashIntNil = formatCashIntNil;
580
586
  exports.formatCashNil = formatCashNil;
581
- exports.formatCreditEnhanced = formatCreditEnhanced;
582
587
  exports.formatDate = formatDate;
583
588
  exports.formatDateNil = formatDateNil;
584
589
  exports.formatDuration = formatDuration;
@@ -605,8 +610,6 @@ exports.isPhone = isPhone;
605
610
  exports.isSMSCode = isSMSCode;
606
611
  exports.isUndefined = isUndefined;
607
612
  exports.log = log;
608
- exports.normalizeFormValues = normalizeFormValues;
609
- exports.normalizeSearchParams = normalizeSearchParams;
610
613
  exports.os = os;
611
614
  exports.playAudio = playAudio;
612
615
  exports.random = random;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("qs"),t=require("d3-format"),r=require("lodash/omit"),o=require("moment");function s(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=s(r),a=s(o);const i=(...e)=>{console.group("====================="),console.info(...e),console.groupEnd()},c="undefined"!=typeof window,l=e=>e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice,d=c?localStorage:{};let p={};const u=t.format(",.2f"),m=t.format(","),h=t.format(".2%"),f=y(u),x=y(m),g=y(h);function y(e){return t=>S(t)?v:e(t)}const w=e=>u(e/1e4),M=y(w),D=(b="增信",function(e){return e?b:"不"+b});var b;const S=e=>null==e||""===e,v="——";function Y(e,t="YYYY-MM-DD"){return a(new Date(e)).format(t)}const A=y(Y),T={d:"天",m:"个月",y:"年"};function R(e){return e?`${parseInt(e,10)}${T[e.slice(-1).toLowerCase()]}`:e}const k=y(R);exports.DATE_FORMAT="YYYY/MM/DD",exports.FORMAT_DATE="YYYY-MM-DD",exports.FORMAT_TIME="YYYY-MM-DD HH:mm:ss",exports.NIL_STRING=v,exports.WS=class{constructor(e,t){this.socket=null,this.timer=null,this.ioUrl="",this.heartTime=1e4;this.ioUrl=e,this.socket=t?new WebSocket(e,t):new WebSocket(e)}init(e){const t=this;t.heartInfo=(null==e?void 0:e.heartInfo)?JSON.stringify(null==e?void 0:e.heartInfo):"ws HeartBeat!",t.socket.addEventListener("open",(()=>{i("ws connect!"),t.start(t.heartInfo),e.open&&e.open()}),!1),t.socket.addEventListener("disconnect",(()=>{console.info("[ws info]: disconnect and reconnect... "),e.disconnect&&e.disconnect(),t.socket=new WebSocket(t.ioUrl)}),!1),t.socket.addEventListener("error",(t=>{console.info("---------------"),console.info("[ws error]: "),console.info(t),console.info("---------------"),e.error&&e.error()}),!1),t.socket.addEventListener("close",e.close,!1),t.socket.addEventListener("message",(r=>{t.reset(),e.msg(r)}),!1)}close(){this.timer&&clearTimeout(this.timer),console.info("[ws close]: close!"),this.socket.close()}start(e){const t=this;t.timer=setTimeout((()=>{t.socket.send(e)}),t.heartTime)}send(e){this.socket.send(e)}reset(){const e=this;clearTimeout(e.timer),e.start(e.heartInfo)}getSocketState(){return this.socket.readyState}setHeartTime(e){this.heartTime=e,this.reset()}},exports.accAdd=(e,t)=>{let r,o,s;try{r=e.toString().split(".")[1].length}catch(n){r=0}try{o=t.toString().split(".")[1].length}catch(n){o=0}return s=Math.pow(10,Math.max(r,o)),(e*s+t*s)/s},exports.accDiv=(e,t)=>{let r,o,s=0,n=0;try{s=e.toString().split(".")[1].length}catch(a){}try{n=t.toString().split(".")[1].length}catch(a){}return r=Number(e.toString().replace(".","")),o=Number(t.toString().replace(".","")),r/o*Math.pow(10,n-s)},exports.accMul=(e,t)=>{let r=0,o=e.toString(),s=t.toString();try{r+=o.split(".")[1].length}catch(n){}try{r+=s.split(".")[1].length}catch(n){}return Number(o.replace(".",""))*Number(s.replace(".",""))/Math.pow(10,r)},exports.accSub=function(e,t){let r,o,s,n;try{r=e.toString().split(".")[1].length}catch(a){r=0}try{o=t.toString().split(".")[1].length}catch(a){o=0}return s=Math.pow(10,Math.max(r,o)),n=r>=o?r:o,((e*s-t*s)/s).toFixed(n)},exports.cutTimeFn=e=>`00‘${0===e?"00":"0"+Math.floor(e/60)}’${0===e?"00":e%60>=10?e%60:"0"+e%60}`,exports.digitCnUppercase=function(e){var t=["角","分"],r=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],o=[["元","万","亿"],["","拾","佰","仟"]],s=e<0?"欠":"";e=Math.abs(e);for(var n="",a=0;a<t.length;a++)n+=(r[Math.floor(10*e*Math.pow(10,a))%10]+t[a]).replace(/零./,"");for(n=n||"整",e=Math.floor(e),a=0;a<o[0].length&&e>0;a++){for(var i="",c=0;c<o[1].length&&e>0;c++)i=r[e%10]+o[1][c]+i,e=Math.floor(e/10);n=i.replace(/(零.)*零$/,"").replace(/^$/,"零")+o[0][a]+n}return s+n.replace(/(零.)*零元/,"元").replace(/(零.)+/g,"零").replace(/^整$/,"零元整")},exports.disableBrowserZoom=function(){document.addEventListener("keydown",(function(e){!0!==e.ctrlKey&&!0!==e.metaKey||61!==e.which&&107!==e.which&&173!==e.which&&109!==e.which&&187!==e.which&&189!==e.which||e.preventDefault()}),!1),window.addEventListener("mousewheel",(function(e){(!0===e.ctrlKey||e.metaKey)&&e.preventDefault()}),{passive:!1}),window.addEventListener("DOMMouseScroll",(function(e){(!0===e.ctrlKey||e.metaKey)&&e.preventDefault()}),{passive:!1})},exports.download=(e,t="download",r="application/octet-stream",o)=>{const s=window;let n=r,a=e;const i=document,c=i.createElement("a"),l=e=>String(e),d=s.Blob||l(c),p=t;let u=null,m=null;const h=(t,r)=>{if("download"in c)return c.href=o?e:t,c.setAttribute("download",p),c.innerHTML="downloading...",i.body.appendChild(c),setTimeout((()=>{c.click(),i.body.removeChild(c),!0===r&&setTimeout((()=>{s.URL.revokeObjectURL(c.href)}),250)}),66),!0;const n=i.createElement("iframe");i.body.appendChild(n),r||(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,"application/octet-stream")),n.src=t,setTimeout((()=>{i.body.removeChild(n)}),333)};if(String(a).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/))return h(a);try{u=a instanceof d?a:new d([a],{type:n})}catch(f){}if(s.URL)h(s.URL.createObjectURL(u),!0);else{if("string"==typeof u||u.constructor===l(c))try{return h("data:"+n+";base64,"+s.btoa(u))}catch(f){return h("data:"+n+","+encodeURIComponent(u))}m=new FileReader,m.onload=function(){h(this.result)},m.readAsDataURL(u)}return!0},exports.fileReaderToBase64=e=>t=>{const r=new FileReader;r.onload=e=>{t&&t(e.target.result)},r.readAsDataURL(e)},exports.format10k=w,exports.format10kNil=M,exports.formatCash=u,exports.formatCash2=e=>(Math.floor(100*e)/100).toFixed(2),exports.formatCashInt=m,exports.formatCashIntNil=x,exports.formatCashNil=f,exports.formatCreditEnhanced=D,exports.formatDate=Y,exports.formatDateNil=A,exports.formatDuration=R,exports.formatDurationNil=k,exports.formatRatio=h,exports.formatRatioNil=g,exports.getBase64=e=>new Promise(((t,r)=>{const o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=e=>r(e)})),exports.getItem=e=>((p[e]||d.getItem(""+e))&&(p[e]=JSON.parse(d.getItem(""+e)||"null")),p[e]),exports.getQueryObject=(t=window.location.href)=>{const r=t.split("?")[1];return e.parse(r||"")},exports.getSearchParams=e=>new URLSearchParams(e),exports.getValOfArr=e=>{const t=e.length,r=e.reduce(((e,t)=>e+t),0),o=e.reduce(((e,t)=>e*t),1);return{min:Math.min.apply(null,e),max:Math.max.apply(null,e),sum:r,average:r/t,mull:o}},exports.getValueWithNil=e=>S(e)?v:e,exports.inBrowser=c,exports.isArray=e=>Array.isArray(e),exports.isBlob=l,exports.isCardNo=e=>/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/.test(e),exports.isDate=e=>e instanceof Date,exports.isEmail=e=>/^(.+)@(.+)\.(.+)$/.test(e),exports.isFile=e=>l(e)&&"string"==typeof e.name&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified),exports.isNil=S,exports.isNull=e=>null===e,exports.isObject=e=>e===Object(e),exports.isPhone=e=>/^[1](\d{10})$/.test(e),exports.isSMSCode=e=>e.match(/^\d{6}$/),exports.isUndefined=e=>void 0===e,exports.log=i,exports.normalizeFormValues=function(e){return Object.entries(e).filter((([e,t])=>void 0!==t&&"all"!==t)).reduce(((e,[t,r])=>(Array.isArray(r)&&r.some((e=>a.isMoment(e)))?(r[0]&&(e.startDate=r[0].format("YYYY-MM-DD")),r[1]&&(e.endDate=r[1].format("YYYY-MM-DD"))):e[t]=a.isMoment(r)?r.format("YYYY-MM-DD"):r,e)),{})},exports.normalizeSearchParams=function(e){return(e.startDate||e.endDate)&&(e=Object.assign(Object.assign({},n(e,["startDate","endDate"])),{dateRange:[e.startDate&&a(e.startDate),e.endDate&&a(e.endDate)]})),Object.entries(e).forEach((([t,r])=>{"string"==typeof r&&r.includes(",")&&(e[t]="all")})),e},exports.os=()=>{if(!c)return{isTablet:!1,isPhone:!1,isAndroid:!1,isPc:!1};const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),r=/(?:SymbianOS)/.test(e)||t,o=/(?:Android)/.test(e),s=/(?:Firefox)/.test(e),n=/(?:iPad|PlayBook)/.test(e)||o&&!/(?:Mobile)/.test(e)||s&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!n;return{isTablet:n,isPhone:a,isAndroid:o,isPc:!a&&!o&&!r}},exports.playAudio=e=>{const t=document.querySelectorAll("audio");Array.from(t).forEach((e=>{e.pause(),e.currentTime=0})),document.querySelector(`#${e}`).play()},exports.random=(e,t)=>Math.round(Math.random()*(t-e)+e),exports.randomString=(e=32)=>{const t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",r=t.length;let o="";for(let s=0;s<e;s++)o+=t.charAt(Math.floor(Math.random()*r));return o},exports.removeAll=()=>(p={},d.clear()),exports.removeItem=e=>(delete p[e],d.removeItem(""+e)),exports.setItem=(e,t)=>(p[e]=t,d.setItem(""+e,JSON.stringify(t))),exports.setProxyObj=(e,t,r)=>new Proxy(e,{get:(e,r)=>(t(),Reflect.get(e,r)),set:(e,t,o)=>(r(),Reflect.set(e,t,o))}),exports.sortObj=(e,t,r="asc")=>e.sort(((e,o)=>"asc"===r?o[t]-e[t]:e[t]-o[t])),exports.sumObj=(e,t)=>e.reduce(((e,r)=>r[t]+e),0),exports.trimString=e=>e.replace(/(^\s*)|(\s*$)/g,"");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("qs"),t=require("d3-format");function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=o(require("moment"));const s=(...e)=>{console.group("====================="),console.info(...e),console.groupEnd()},n="undefined"!=typeof window,a=e=>e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice,i=n?localStorage:{};let c={};const l=t.format(",.2f"),p=t.format(","),d=t.format(".2%"),u=f(l),h=f(p),m=f(d);function f(e){return t=>y(t)?w:e(t)}const x=e=>l(e/1e4),g=f(x),y=e=>null==e||""===e,w="——";function b(e,t="YYYY-MM-DD"){return r(new Date(e)).format(t)}const M=f(b),S={d:"天",m:"个月",y:"年"};function v(e){return e?`${parseInt(e,10)}${S[e.slice(-1).toLowerCase()]}`:e}const D=f(v);exports.DATE_FORMAT="YYYY/MM/DD",exports.FORMAT_DATE="YYYY-MM-DD",exports.FORMAT_TIME="YYYY-MM-DD HH:mm:ss",exports.NIL_STRING=w,exports.WS=class{constructor(e,t){this.socket=null,this.timer=null,this.ioUrl="",this.heartTime=1e4;this.ioUrl=e,this.socket=t?new WebSocket(e,t):new WebSocket(e)}init(e){const t=this;t.heartInfo=(null==e?void 0:e.heartInfo)?JSON.stringify(null==e?void 0:e.heartInfo):"ws HeartBeat!",t.socket.addEventListener("open",(()=>{s("ws connect!"),t.start(t.heartInfo),e.open&&e.open()}),!1),t.socket.addEventListener("disconnect",(()=>{console.info("[ws info]: disconnect and reconnect... "),e.disconnect&&e.disconnect(),t.socket=new WebSocket(t.ioUrl)}),!1),t.socket.addEventListener("error",(t=>{console.info("---------------"),console.info("[ws error]: "),console.info(t),console.info("---------------"),e.error&&e.error()}),!1),t.socket.addEventListener("close",e.close,!1),t.socket.addEventListener("message",(o=>{t.reset(),e.msg(o)}),!1)}close(){this.timer&&clearTimeout(this.timer),console.info("[ws close]: close!"),this.socket.close()}start(e){const t=this;t.timer=setTimeout((()=>{t.socket.send(e)}),t.heartTime)}send(e){this.socket.send(e)}reset(){const e=this;clearTimeout(e.timer),e.start(e.heartInfo)}getSocketState(){return this.socket.readyState}setHeartTime(e){this.heartTime=e,this.reset()}},exports.accAdd=(e,t)=>{let o,r,s;try{o=e.toString().split(".")[1].length}catch(n){o=0}try{r=t.toString().split(".")[1].length}catch(n){r=0}return s=Math.pow(10,Math.max(o,r)),(e*s+t*s)/s},exports.accDiv=(e,t)=>{let o,r,s=0,n=0;try{s=e.toString().split(".")[1].length}catch(a){}try{n=t.toString().split(".")[1].length}catch(a){}return o=Number(e.toString().replace(".","")),r=Number(t.toString().replace(".","")),o/r*Math.pow(10,n-s)},exports.accMul=(e,t)=>{let o=0,r=e.toString(),s=t.toString();try{o+=r.split(".")[1].length}catch(n){}try{o+=s.split(".")[1].length}catch(n){}return Number(r.replace(".",""))*Number(s.replace(".",""))/Math.pow(10,o)},exports.accSub=function(e,t){let o,r,s,n;try{o=e.toString().split(".")[1].length}catch(a){o=0}try{r=t.toString().split(".")[1].length}catch(a){r=0}return s=Math.pow(10,Math.max(o,r)),n=o>=r?o:r,((e*s-t*s)/s).toFixed(n)},exports.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},exports.cutTimeFn=e=>`00‘${0===e?"00":"0"+Math.floor(e/60)}’${0===e?"00":e%60>=10?e%60:"0"+e%60}`,exports.digitCnUppercase=function(e){var t=["角","分"],o=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],r=[["元","万","亿"],["","拾","佰","仟"]],s=e<0?"欠":"";e=Math.abs(e);for(var n="",a=0;a<t.length;a++)n+=(o[Math.floor(10*e*Math.pow(10,a))%10]+t[a]).replace(/零./,"");for(n=n||"整",e=Math.floor(e),a=0;a<r[0].length&&e>0;a++){for(var i="",c=0;c<r[1].length&&e>0;c++)i=o[e%10]+r[1][c]+i,e=Math.floor(e/10);n=i.replace(/(零.)*零$/,"").replace(/^$/,"零")+r[0][a]+n}return s+n.replace(/(零.)*零元/,"元").replace(/(零.)+/g,"零").replace(/^整$/,"零元整")},exports.disableBrowserZoom=function(){document.addEventListener("keydown",(function(e){!0!==e.ctrlKey&&!0!==e.metaKey||61!==e.which&&107!==e.which&&173!==e.which&&109!==e.which&&187!==e.which&&189!==e.which||e.preventDefault()}),!1),window.addEventListener("mousewheel",(function(e){(!0===e.ctrlKey||e.metaKey)&&e.preventDefault()}),{passive:!1}),window.addEventListener("DOMMouseScroll",(function(e){(!0===e.ctrlKey||e.metaKey)&&e.preventDefault()}),{passive:!1})},exports.download=(e,t="download",o="application/octet-stream",r)=>{const s=window;let n=o,a=e;const i=document,c=i.createElement("a"),l=e=>String(e),p=s.Blob||l(c),d=t;let u=null,h=null;const m=(t,o)=>{if("download"in c)return c.href=r?e:t,c.setAttribute("download",d),c.innerHTML="downloading...",i.body.appendChild(c),setTimeout((()=>{c.click(),i.body.removeChild(c),!0===o&&setTimeout((()=>{s.URL.revokeObjectURL(c.href)}),250)}),66),!0;const n=i.createElement("iframe");i.body.appendChild(n),o||(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,"application/octet-stream")),n.src=t,setTimeout((()=>{i.body.removeChild(n)}),333)};if(String(a).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/))return m(a);try{u=a instanceof p?a:new p([a],{type:n})}catch(f){}if(s.URL)m(s.URL.createObjectURL(u),!0);else{if("string"==typeof u||u.constructor===l(c))try{return m("data:"+n+";base64,"+s.btoa(u))}catch(f){return m("data:"+n+","+encodeURIComponent(u))}h=new FileReader,h.onload=function(){m(this.result)},h.readAsDataURL(u)}return!0},exports.fileReaderToBase64=e=>t=>{const o=new FileReader;o.onload=e=>{t&&t(e.target.result)},o.readAsDataURL(e)},exports.format10k=x,exports.format10kNil=g,exports.formatCash=l,exports.formatCash2=e=>(Math.floor(100*e)/100).toFixed(2),exports.formatCashInt=p,exports.formatCashIntNil=h,exports.formatCashNil=u,exports.formatDate=b,exports.formatDateNil=M,exports.formatDuration=v,exports.formatDurationNil=D,exports.formatRatio=d,exports.formatRatioNil=m,exports.getBase64=e=>new Promise(((t,o)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>o(e)})),exports.getItem=e=>((c[e]||i.getItem(""+e))&&(c[e]=JSON.parse(i.getItem(""+e)||"null")),c[e]),exports.getQueryObject=(t=window.location.href)=>{const o=t.split("?")[1];return e.parse(o||"")},exports.getSearchParams=e=>new URLSearchParams(e),exports.getValOfArr=e=>{const t=e.length,o=e.reduce(((e,t)=>e+t),0),r=e.reduce(((e,t)=>e*t),1);return{min:Math.min.apply(null,e),max:Math.max.apply(null,e),sum:o,average:o/t,mull:r}},exports.getValueWithNil=e=>y(e)?w:e,exports.inBrowser=n,exports.isArray=e=>Array.isArray(e),exports.isBlob=a,exports.isCardNo=e=>/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/.test(e),exports.isDate=e=>e instanceof Date,exports.isEmail=e=>/^(.+)@(.+)\.(.+)$/.test(e),exports.isFile=e=>a(e)&&"string"==typeof e.name&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified),exports.isNil=y,exports.isNull=e=>null===e,exports.isObject=e=>e===Object(e),exports.isPhone=e=>/^[1](\d{10})$/.test(e),exports.isSMSCode=e=>e.match(/^\d{6}$/),exports.isUndefined=e=>void 0===e,exports.log=s,exports.os=()=>{if(!n)return{isTablet:!1,isPhone:!1,isAndroid:!1,isPc:!1};const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),o=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),s=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||s&&/(?:Tablet)/.test(e),i=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:i,isAndroid:r,isPc:!i&&!r&&!o}},exports.playAudio=e=>{const t=document.querySelectorAll("audio");Array.from(t).forEach((e=>{e.pause(),e.currentTime=0})),document.querySelector(`#${e}`).play()},exports.random=(e,t)=>Math.round(Math.random()*(t-e)+e),exports.randomString=(e=32)=>{const t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",o=t.length;let r="";for(let s=0;s<e;s++)r+=t.charAt(Math.floor(Math.random()*o));return r},exports.removeAll=()=>(c={},i.clear()),exports.removeItem=e=>(delete c[e],i.removeItem(""+e)),exports.setItem=(e,t)=>(c[e]=t,i.setItem(""+e,JSON.stringify(t))),exports.setProxyObj=(e,t,o)=>new Proxy(e,{get:(e,o)=>(t(),Reflect.get(e,o)),set:(e,t,r)=>(o(),Reflect.set(e,t,r))}),exports.sortObj=(e,t,o="asc")=>e.sort(((e,r)=>"asc"===o?r[t]-e[t]:e[t]-r[t])),exports.sumObj=(e,t)=>e.reduce(((e,o)=>o[t]+e),0),exports.trimString=e=>e.replace(/(^\s*)|(\s*$)/g,"");
@@ -1,6 +1,5 @@
1
1
  import { parse } from 'qs';
2
2
  import { format } from 'd3-format';
3
- import omit from 'lodash/omit';
4
3
  import moment from 'moment';
5
4
 
6
5
  const log = (...rest) => {
@@ -229,49 +228,44 @@ const SERVER_DATE_FROMAT = 'YYYY-MM-DD';
229
228
  const DATE_FORMAT = 'YYYY/MM/DD';
230
229
  const FORMAT_DATE = SERVER_DATE_FROMAT;
231
230
  const FORMAT_TIME = 'YYYY-MM-DD HH:mm:ss';
232
- function normalizeFormValues(values) {
233
- return Object.entries(values)
234
- .filter(([key, value]) => value !== undefined && value !== 'all')
235
- .reduce((mem, [key, value]) => {
236
- // array for [moment, moment]
237
- if (Array.isArray(value) && value.some(val => moment.isMoment(val))) {
238
- if (value[0]) {
239
- mem.startDate = value[0].format(SERVER_DATE_FROMAT);
240
- }
241
- if (value[1]) {
242
- mem.endDate = value[1].format(SERVER_DATE_FROMAT);
243
- }
244
- }
245
- else if (moment.isMoment(value)) {
246
- mem[key] = value.format(SERVER_DATE_FROMAT);
247
- }
248
- else
249
- mem[key] = value;
250
- return mem;
251
- }, {});
252
- }
253
- function normalizeSearchParams(params) {
254
- if (params.startDate || params.endDate) {
255
- params = Object.assign(Object.assign({}, omit(params, ['startDate', 'endDate'])), { dateRange: [
256
- params.startDate && moment(params.startDate),
257
- params.endDate && moment(params.endDate)
258
- ] });
259
- }
260
- Object.entries(params).forEach(([key, value]) => {
261
- if (typeof value === 'string' && value.includes(',')) {
262
- params[key] = 'all';
263
- }
264
- });
265
- return params;
266
- }
267
- function formatBool(field) {
268
- return function (yes) {
269
- return yes ? field : '不' + field;
270
- };
271
- }
231
+ // type IndexType = { [x: string]: any }
232
+ // export function normalizeFormValues<T extends IndexType>(values: T) {
233
+ // return Object.entries(values)
234
+ // .filter(([key, value]) => value !== undefined && value !== 'all')
235
+ // .reduce((mem: any, [key, value]) => {
236
+ // // array for [moment, moment]
237
+ // if (Array.isArray(value) && value.some((val) => moment.isMoment(val))) {
238
+ // if (value[0]) {
239
+ // mem.startDate = value[0].format(SERVER_DATE_FROMAT)
240
+ // }
241
+ // if (value[1]) {
242
+ // mem.endDate = value[1].format(SERVER_DATE_FROMAT)
243
+ // }
244
+ // } else if (moment.isMoment(value)) {
245
+ // mem[key] = value.format(SERVER_DATE_FROMAT)
246
+ // } else mem[key] = value
247
+ // return mem
248
+ // }, {} as T)
249
+ // }
250
+ // export function normalizeSearchParams(params: IndexType) {
251
+ // if (params.startDate || params.endDate) {
252
+ // params = {
253
+ // ...omit(params, ['startDate', 'endDate']),
254
+ // dateRange: [
255
+ // params.startDate && moment(params.startDate),
256
+ // params.endDate && moment(params.endDate),
257
+ // ],
258
+ // }
259
+ // }
260
+ // Object.entries(params).forEach(([key, value]) => {
261
+ // if (typeof value === 'string' && value.includes(',')) {
262
+ // params[key] = 'all'
263
+ // }
264
+ // })
265
+ // return params
266
+ // }
272
267
  const format10k = (n) => formatCash(n / 10000);
273
268
  const format10kNil = withDefaultNil(format10k);
274
- const formatCreditEnhanced = formatBool('增信');
275
269
  // null == undefined
276
270
  const isNil = (val) => val == null || val === '';
277
271
  const NIL_STRING = '——';
@@ -280,7 +274,10 @@ const getValueWithNil = (val) => (isNil(val) ? NIL_STRING : val);
280
274
  function digitCnUppercase(n) {
281
275
  var fraction = ['角', '分'];
282
276
  var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
283
- var unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
277
+ var unit = [
278
+ ['元', '万', '亿'],
279
+ ['', '拾', '佰', '仟'],
280
+ ];
284
281
  var head = n < 0 ? '欠' : '';
285
282
  n = Math.abs(n);
286
283
  var s = '';
@@ -310,7 +307,7 @@ const formatDateNil = withDefaultNil(formatDate);
310
307
  const unit = {
311
308
  d: '天',
312
309
  m: '个月',
313
- y: '年'
310
+ y: '年',
314
311
  };
315
312
  function formatDuration(period) {
316
313
  if (!period)
@@ -548,4 +545,13 @@ function disableBrowserZoom() {
548
545
  });
549
546
  }
550
547
 
551
- export { DATE_FORMAT, FORMAT_DATE, FORMAT_TIME, NIL_STRING, WS, accAdd, accDiv, accMul, accSub, cutTimeFn, digitCnUppercase, disableBrowserZoom, download, fileReaderToBase64, format10k, format10kNil, formatCash, formatCash2, formatCashInt, formatCashIntNil, formatCashNil, formatCreditEnhanced, formatDate, formatDateNil, formatDuration, formatDurationNil, formatRatio, formatRatioNil, getBase64, getItem, getQueryObject, getSearchParams, getValOfArr, getValueWithNil, inBrowser, isArray, isBlob, isCardNo, isDate, isEmail, isFile, isNil, isNull, isObject, isPhone, isSMSCode, isUndefined, log, normalizeFormValues, normalizeSearchParams, os, playAudio, random, randomString, removeAll, removeItem, setItem, setProxyObj, sortObj, sumObj, trimString };
548
+ function copyToClipboard(txt) {
549
+ var textarea = document.createElement('textarea');
550
+ textarea.value = txt;
551
+ document.body.appendChild(textarea);
552
+ textarea.select();
553
+ document.execCommand('copy');
554
+ document.body.removeChild(textarea);
555
+ }
556
+
557
+ export { DATE_FORMAT, FORMAT_DATE, FORMAT_TIME, NIL_STRING, WS, accAdd, accDiv, accMul, accSub, copyToClipboard, cutTimeFn, digitCnUppercase, disableBrowserZoom, download, fileReaderToBase64, format10k, format10kNil, formatCash, formatCash2, formatCashInt, formatCashIntNil, formatCashNil, formatDate, formatDateNil, formatDuration, formatDurationNil, formatRatio, formatRatioNil, getBase64, getItem, getQueryObject, getSearchParams, getValOfArr, getValueWithNil, inBrowser, isArray, isBlob, isCardNo, isDate, isEmail, isFile, isNil, isNull, isObject, isPhone, isSMSCode, isUndefined, log, os, playAudio, random, randomString, removeAll, removeItem, setItem, setProxyObj, sortObj, sumObj, trimString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lgutils",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "lgutils",
5
5
  "main": "index.js",
6
6
  "module": "lib/lgutils.cjs.prod.js",
@@ -35,5 +35,5 @@
35
35
  "@types/moment": "^2.13.0",
36
36
  "@types/qs": "^6.9.0"
37
37
  },
38
- "gitHead": "96b76a80b0f40c9706a622cb9b7f07bb24735811"
38
+ "gitHead": "a959d0e30cde5def91971ade7fc0a13640eeb8ed"
39
39
  }