lgutils 1.3.29 → 1.3.31
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 +9 -0
- package/lib/lgutils.cjs.js +15 -2
- package/lib/lgutils.cjs.prod.js +1 -1
- package/lib/lgutils.esm-bundler.js +14 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { parse } from 'qs'
|
|
2
|
+
import { stringify } from 'qs'
|
|
3
|
+
|
|
1
4
|
export declare const accAdd: (arg1: number, arg2: number) => number
|
|
2
5
|
|
|
3
6
|
export declare const accDiv: (arg1: number, arg2: number) => number
|
|
@@ -35,6 +38,8 @@ export declare const FORMAT_DATE = 'YYYY-MM-DD'
|
|
|
35
38
|
|
|
36
39
|
export declare const FORMAT_TIME = 'YYYY-MM-DD HH:mm:ss'
|
|
37
40
|
|
|
41
|
+
export declare const formatBillion: (num: number) => string
|
|
42
|
+
|
|
38
43
|
export declare const formatCash: (
|
|
39
44
|
n:
|
|
40
45
|
| number
|
|
@@ -172,6 +177,8 @@ export declare const os: () => {
|
|
|
172
177
|
isIos: boolean
|
|
173
178
|
}
|
|
174
179
|
|
|
180
|
+
export { parse }
|
|
181
|
+
|
|
175
182
|
export declare const playAudio: (mp3Id: string) => void
|
|
176
183
|
|
|
177
184
|
export declare const random: (min: number, max: number) => number
|
|
@@ -197,6 +204,8 @@ export declare const sortObj: <
|
|
|
197
204
|
type?: 'asc' | 'desc',
|
|
198
205
|
) => D[]
|
|
199
206
|
|
|
207
|
+
export { stringify }
|
|
208
|
+
|
|
200
209
|
export declare const sumObj: <
|
|
201
210
|
T extends keyof D,
|
|
202
211
|
D extends {
|
package/lib/lgutils.cjs.js
CHANGED
|
@@ -75,6 +75,7 @@ const isFile = (value) => isBlob(value) &&
|
|
|
75
75
|
typeof value.name === 'string' &&
|
|
76
76
|
(typeof value.lastModifiedDate === 'object' || typeof value.lastModified === 'number');
|
|
77
77
|
const getQueryObject = (url = window.location.href) => {
|
|
78
|
+
var _a;
|
|
78
79
|
// const search = url.substring(url.lastIndexOf('?') + 1)
|
|
79
80
|
// let obj: any = {}
|
|
80
81
|
// const reg = /([^?&=]+)=([^?&=]*)/g
|
|
@@ -87,8 +88,8 @@ const getQueryObject = (url = window.location.href) => {
|
|
|
87
88
|
// obj[name] = val
|
|
88
89
|
// return rs
|
|
89
90
|
// })
|
|
90
|
-
const search = url.split('?')[1];
|
|
91
|
-
return qs.parse(search || '');
|
|
91
|
+
const search = (_a = url.split('?')) === null || _a === void 0 ? void 0 : _a[1];
|
|
92
|
+
return qs.parse(search || '', { decoder: (str) => str });
|
|
92
93
|
};
|
|
93
94
|
const getSearchParams = (search) => new URLSearchParams(search);
|
|
94
95
|
const fileReaderToBase64 = (target) => (cb) => {
|
|
@@ -131,6 +132,7 @@ const os = () => {
|
|
|
131
132
|
isIos: isPhone || isPad,
|
|
132
133
|
};
|
|
133
134
|
};
|
|
135
|
+
// 乘
|
|
134
136
|
const accMul = (arg1, arg2) => {
|
|
135
137
|
let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
|
|
136
138
|
try {
|
|
@@ -143,6 +145,7 @@ const accMul = (arg1, arg2) => {
|
|
|
143
145
|
catch (e) { }
|
|
144
146
|
return (Number(s1.replace('.', '')) * Number(s2.replace('.', ''))) / Math.pow(10, m);
|
|
145
147
|
};
|
|
148
|
+
// 除
|
|
146
149
|
const accDiv = (arg1, arg2) => {
|
|
147
150
|
let t1 = 0, t2 = 0, r1, r2;
|
|
148
151
|
try {
|
|
@@ -157,6 +160,7 @@ const accDiv = (arg1, arg2) => {
|
|
|
157
160
|
r2 = Number(arg2.toString().replace('.', ''));
|
|
158
161
|
return (r1 / r2) * Math.pow(10, t2 - t1);
|
|
159
162
|
};
|
|
163
|
+
// 加
|
|
160
164
|
const accAdd = (arg1, arg2) => {
|
|
161
165
|
let r1, r2, m;
|
|
162
166
|
try {
|
|
@@ -174,6 +178,7 @@ const accAdd = (arg1, arg2) => {
|
|
|
174
178
|
m = Math.pow(10, Math.max(r1, r2));
|
|
175
179
|
return (arg1 * m + arg2 * m) / m;
|
|
176
180
|
};
|
|
181
|
+
// 减
|
|
177
182
|
const accSub = function (arg1, arg2) {
|
|
178
183
|
let r1, r2, m, n;
|
|
179
184
|
try {
|
|
@@ -271,6 +276,11 @@ const FORMAT_DATE = SERVER_DATE_FROMAT;
|
|
|
271
276
|
const FORMAT_TIME = 'YYYY-MM-DD HH:mm:ss';
|
|
272
277
|
const format10k = (n) => formatCash(n / 10000);
|
|
273
278
|
const format10kNil = withDefaultNil(format10k);
|
|
279
|
+
const formatBillion = (num) => {
|
|
280
|
+
const isBillion = num / (10000 * 10000) >= 1;
|
|
281
|
+
const unit = isBillion ? '亿' : '万';
|
|
282
|
+
return `${isBillion ? formatCash(num / (10000 * 10000)) : formatCash(num / 10000)}${unit}`;
|
|
283
|
+
};
|
|
274
284
|
// null == undefined
|
|
275
285
|
const isNil = (val) => val == null || val === '';
|
|
276
286
|
const NIL_STRING = '——';
|
|
@@ -559,6 +569,8 @@ function copyToClipboard(txt) {
|
|
|
559
569
|
document.body.removeChild(textarea);
|
|
560
570
|
}
|
|
561
571
|
|
|
572
|
+
exports.parse = qs.parse;
|
|
573
|
+
exports.stringify = qs.stringify;
|
|
562
574
|
exports.DATE_FORMAT = DATE_FORMAT;
|
|
563
575
|
exports.FORMAT_DATE = FORMAT_DATE;
|
|
564
576
|
exports.FORMAT_TIME = FORMAT_TIME;
|
|
@@ -577,6 +589,7 @@ exports.fileReaderToBase64 = fileReaderToBase64;
|
|
|
577
589
|
exports.filterNil = filterNil;
|
|
578
590
|
exports.format10k = format10k;
|
|
579
591
|
exports.format10kNil = format10kNil;
|
|
592
|
+
exports.formatBillion = formatBillion;
|
|
580
593
|
exports.formatCash = formatCash;
|
|
581
594
|
exports.formatCash2 = formatCash2;
|
|
582
595
|
exports.formatCashInt = formatCashInt;
|
package/lib/lgutils.cjs.prod.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("qs"),t=require("dayjs"),o=require("d3-format");function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var s=r(t);const n=(...e)=>{console.group("====================="),console.info(...e),console.groupEnd()},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("qs"),t=require("dayjs"),o=require("d3-format");function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var s=r(t);const n=(...e)=>{console.group("====================="),console.info(...e),console.groupEnd()},i="undefined"!=typeof window,a=e=>Array.isArray(e),c=e=>e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice,l=(e,t="children")=>{if(!a(e))return[];for(const o of e)o[t]&&o[t].length&&(o.children=[...o[t]],null==o||delete o.childList,l(o.children,t));return e},d=i?localStorage:{};let p={};const u=o.format(",.2f"),h=o.format(","),m=o.format(".2%"),f=w(u),x=w(h),g=w(m);function w(e){return t=>b(t)?v:e(t)}const y=e=>u(e/1e4),M=w(y),b=e=>null==e||""===e,v="——";function S(e,t="YYYY-MM-DD"){return s(new Date(e)).format(t)}const D=w(S),T={d:"天",m:"个月",y:"年"};function A(e){return e?`${parseInt(e,10)}${T[e.slice(-1).toLowerCase()]}`:e}const k=w(A);exports.parse=e.parse,exports.stringify=e.stringify,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",(()=>{n("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(i){}try{n=t.toString().split(".")[1].length}catch(i){}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(i){o=0}try{r=t.toString().split(".")[1].length}catch(i){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="",i=0;i<t.length;i++)n+=(o[Math.floor(10*e*Math.pow(10,i))%10]+t[i]).replace(/零./,"");for(n=n||"整",e=Math.floor(e),i=0;i<r[0].length&&e>0;i++){for(var a="",c=0;c<r[1].length&&e>0;c++)a=o[e%10]+r[1][c]+a,e=Math.floor(e/10);n=a.replace(/(零.)*零$/,"").replace(/^$/,"零")+r[0][i]+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,i=e;const a=document,c=a.createElement("a"),l=e=>String(e),d=s.Blob||l(c),p=t;let u=null,h=null;const m=(t,o)=>{if("download"in c)return c.href=r?e:t,c.setAttribute("download",p),c.innerHTML="downloading...",a.body.appendChild(c),setTimeout((()=>{c.click(),a.body.removeChild(c),!0===o&&setTimeout((()=>{s.URL.revokeObjectURL(c.href)}),250)}),66),!0;const n=a.createElement("iframe");a.body.appendChild(n),o||(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,"application/octet-stream")),n.src=t,setTimeout((()=>{a.body.removeChild(n)}),333)};if(String(i).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/))return m(i);try{u=i instanceof d?i:new d([i],{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.filterNil=e=>{const t={};return Object.entries(e).forEach((([e,o])=>{o&&0!==o&&(t[e]=o)})),t},exports.format10k=y,exports.format10kNil=M,exports.formatBillion=e=>{const t=e/1e8>=1,o=t?"亿":"万";return`${u(t?e/1e8:e/1e4)}${o}`},exports.formatCash=u,exports.formatCash2=e=>(Math.floor(100*e)/100).toFixed(2),exports.formatCashInt=h,exports.formatCashIntNil=x,exports.formatCashNil=f,exports.formatDate=S,exports.formatDateNil=D,exports.formatDuration=A,exports.formatDurationNil=k,exports.formatRatio=m,exports.formatRatioNil=g,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=>((p[e]||d.getItem(""+e))&&(p[e]=d.getItem(""+e)?JSON.parse(d.getItem(""+e)||"null"):""),p[e]),exports.getQueryObject=(t=window.location.href)=>{var o;const r=null===(o=t.split("?"))||void 0===o?void 0:o[1];return e.parse(r||"",{decoder:e=>e})},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=>b(e)?v:e,exports.inBrowser=i,exports.isArray=a,exports.isBlob=c,exports.isCardNo=e=>/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/.test(e),exports.isDate=e=>!!e&&s(e).isValid(),exports.isEmail=e=>/^(.+)@(.+)\.(.+)$/.test(e),exports.isFile=e=>c(e)&&"string"==typeof e.name&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified),exports.isMinigram=()=>!!(null===window||void 0===window?void 0:window.__wxjs_environment),exports.isNil=b,exports.isNull=e=>null===e,exports.isNumber=e=>/^[0-9]*(.[0-9]*)?$/.test(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.isWX=()=>{const e=navigator.userAgent.toLowerCase();return/MicroMessenger/i.test(e)},exports.log=n,exports.loopData=l,exports.os=()=>{if(!i)return{isTablet:!1,isPhone:!1,isAndroid:!1,isPc:!1,isIos:!1,isPad:!1};const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),o=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),s=/(?:Firefox)/.test(e),n=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||s&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!n,c=/(?:iPad)/.test(e)&&!n;return{isTablet:n,isPhone:a,isAndroid:r,isPc:!a&&!r&&!o,isPad:c,isIos:a||c}},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=()=>(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,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?e[t]-r[t]:r[t]-e[t])),exports.sumObj=(e,t)=>e.reduce(((e,o)=>o[t]+e),0),exports.trimString=e=>e.replace(/(^\s*)|(\s*$)/g,"");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { parse } from 'qs';
|
|
2
|
+
export { parse, stringify } from 'qs';
|
|
2
3
|
import dayjs from 'dayjs';
|
|
3
4
|
import { format } from 'd3-format';
|
|
4
5
|
|
|
@@ -67,6 +68,7 @@ const isFile = (value) => isBlob(value) &&
|
|
|
67
68
|
typeof value.name === 'string' &&
|
|
68
69
|
(typeof value.lastModifiedDate === 'object' || typeof value.lastModified === 'number');
|
|
69
70
|
const getQueryObject = (url = window.location.href) => {
|
|
71
|
+
var _a;
|
|
70
72
|
// const search = url.substring(url.lastIndexOf('?') + 1)
|
|
71
73
|
// let obj: any = {}
|
|
72
74
|
// const reg = /([^?&=]+)=([^?&=]*)/g
|
|
@@ -79,8 +81,8 @@ const getQueryObject = (url = window.location.href) => {
|
|
|
79
81
|
// obj[name] = val
|
|
80
82
|
// return rs
|
|
81
83
|
// })
|
|
82
|
-
const search = url.split('?')[1];
|
|
83
|
-
return parse(search || '');
|
|
84
|
+
const search = (_a = url.split('?')) === null || _a === void 0 ? void 0 : _a[1];
|
|
85
|
+
return parse(search || '', { decoder: (str) => str });
|
|
84
86
|
};
|
|
85
87
|
const getSearchParams = (search) => new URLSearchParams(search);
|
|
86
88
|
const fileReaderToBase64 = (target) => (cb) => {
|
|
@@ -123,6 +125,7 @@ const os = () => {
|
|
|
123
125
|
isIos: isPhone || isPad,
|
|
124
126
|
};
|
|
125
127
|
};
|
|
128
|
+
// 乘
|
|
126
129
|
const accMul = (arg1, arg2) => {
|
|
127
130
|
let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
|
|
128
131
|
try {
|
|
@@ -135,6 +138,7 @@ const accMul = (arg1, arg2) => {
|
|
|
135
138
|
catch (e) { }
|
|
136
139
|
return (Number(s1.replace('.', '')) * Number(s2.replace('.', ''))) / Math.pow(10, m);
|
|
137
140
|
};
|
|
141
|
+
// 除
|
|
138
142
|
const accDiv = (arg1, arg2) => {
|
|
139
143
|
let t1 = 0, t2 = 0, r1, r2;
|
|
140
144
|
try {
|
|
@@ -149,6 +153,7 @@ const accDiv = (arg1, arg2) => {
|
|
|
149
153
|
r2 = Number(arg2.toString().replace('.', ''));
|
|
150
154
|
return (r1 / r2) * Math.pow(10, t2 - t1);
|
|
151
155
|
};
|
|
156
|
+
// 加
|
|
152
157
|
const accAdd = (arg1, arg2) => {
|
|
153
158
|
let r1, r2, m;
|
|
154
159
|
try {
|
|
@@ -166,6 +171,7 @@ const accAdd = (arg1, arg2) => {
|
|
|
166
171
|
m = Math.pow(10, Math.max(r1, r2));
|
|
167
172
|
return (arg1 * m + arg2 * m) / m;
|
|
168
173
|
};
|
|
174
|
+
// 减
|
|
169
175
|
const accSub = function (arg1, arg2) {
|
|
170
176
|
let r1, r2, m, n;
|
|
171
177
|
try {
|
|
@@ -263,6 +269,11 @@ const FORMAT_DATE = SERVER_DATE_FROMAT;
|
|
|
263
269
|
const FORMAT_TIME = 'YYYY-MM-DD HH:mm:ss';
|
|
264
270
|
const format10k = (n) => formatCash(n / 10000);
|
|
265
271
|
const format10kNil = withDefaultNil(format10k);
|
|
272
|
+
const formatBillion = (num) => {
|
|
273
|
+
const isBillion = num / (10000 * 10000) >= 1;
|
|
274
|
+
const unit = isBillion ? '亿' : '万';
|
|
275
|
+
return `${isBillion ? formatCash(num / (10000 * 10000)) : formatCash(num / 10000)}${unit}`;
|
|
276
|
+
};
|
|
266
277
|
// null == undefined
|
|
267
278
|
const isNil = (val) => val == null || val === '';
|
|
268
279
|
const NIL_STRING = '——';
|
|
@@ -551,4 +562,4 @@ function copyToClipboard(txt) {
|
|
|
551
562
|
document.body.removeChild(textarea);
|
|
552
563
|
}
|
|
553
564
|
|
|
554
|
-
export { DATE_FORMAT, FORMAT_DATE, FORMAT_TIME, NIL_STRING, WS, accAdd, accDiv, accMul, accSub, copyToClipboard, cutTimeFn, digitCnUppercase, disableBrowserZoom, download, fileReaderToBase64, filterNil, 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, isMinigram, isNil, isNull, isNumber, isObject, isPhone, isSMSCode, isUndefined, isWX, log, loopData, os, playAudio, random, randomString, removeAll, removeItem, setItem, setProxyObj, sortObj, sumObj, trimString };
|
|
565
|
+
export { DATE_FORMAT, FORMAT_DATE, FORMAT_TIME, NIL_STRING, WS, accAdd, accDiv, accMul, accSub, copyToClipboard, cutTimeFn, digitCnUppercase, disableBrowserZoom, download, fileReaderToBase64, filterNil, format10k, format10kNil, formatBillion, formatCash, formatCash2, formatCashInt, formatCashIntNil, formatCashNil, formatDate, formatDateNil, formatDuration, formatDurationNil, formatRatio, formatRatioNil, getBase64, getItem, getQueryObject, getSearchParams, getValOfArr, getValueWithNil, inBrowser, isArray, isBlob, isCardNo, isDate, isEmail, isFile, isMinigram, isNil, isNull, isNumber, isObject, isPhone, isSMSCode, isUndefined, isWX, log, loopData, 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.
|
|
3
|
+
"version": "1.3.31",
|
|
4
4
|
"description": "lgutils",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "lib/lgutils.cjs.prod.js",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"@types/d3-format": "^1.3.1",
|
|
33
33
|
"@types/qs": "^6.9.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "331c1bd7d7639a209ac6cecd9c1013b5d5bb620b"
|
|
36
36
|
}
|