@daysnap/utils 0.0.93 → 0.0.94
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/docs/interfaces/StorageManager.md +4 -4
- package/docs/interfaces/Trap.md +5 -5
- package/docs/modules.md +146 -122
- package/es/{ato.d.ts → ato.d.mts} +4 -2
- package/es/ato.mjs +6 -0
- package/es/base64ToBlob.d.mts +8 -0
- package/es/base64ToBlob.mjs +6 -0
- package/es/blobToBase64.d.mts +6 -0
- package/es/blobToBase64.mjs +6 -0
- package/es/cached.d.mts +7 -0
- package/es/cached.mjs +6 -0
- package/es/camelCase.d.mts +7 -0
- package/es/camelCase.mjs +6 -0
- package/es/canvasToBlob.d.mts +6 -0
- package/es/canvasToBlob.mjs +6 -0
- package/es/capitalize.d.mts +7 -0
- package/es/capitalize.mjs +6 -0
- package/es/chunk-2BCJGKPK.mjs +52 -0
- package/es/chunk-2YCUJDBN.mjs +55 -0
- package/es/chunk-2ZSYVROU.mjs +12 -0
- package/es/chunk-36BFA7SH.mjs +10 -0
- package/es/chunk-47AYSPDB.mjs +37 -0
- package/es/chunk-4FSOO7WE.mjs +8 -0
- package/es/chunk-4HDKZDZI.mjs +16 -0
- package/es/chunk-55VPNRDX.mjs +45 -0
- package/es/chunk-5FZDYL3X.mjs +14 -0
- package/es/chunk-67UQVOZK.mjs +22 -0
- package/es/chunk-6UG5VG67.mjs +8 -0
- package/es/chunk-7EYJRHPH.mjs +12 -0
- package/es/chunk-7K7LDQU5.mjs +8 -0
- package/es/chunk-AA7WCD7R.mjs +20 -0
- package/es/chunk-ACFNEWIA.mjs +17 -0
- package/es/chunk-ALUR2G5E.mjs +7 -0
- package/es/chunk-AQXI5M6E.mjs +8 -0
- package/es/chunk-AVYLSD4Y.mjs +12 -0
- package/es/chunk-B2QDZGN6.mjs +12 -0
- package/es/chunk-BI6NG2XY.mjs +8 -0
- package/es/chunk-BND7NHHZ.mjs +23 -0
- package/es/chunk-BZIKQDNP.mjs +25 -0
- package/es/chunk-C3VMHKA2.mjs +32 -0
- package/es/chunk-CH54B2NW.mjs +19 -0
- package/es/chunk-CIIM7WK6.mjs +12 -0
- package/es/chunk-DF4FZM53.mjs +8 -0
- package/es/chunk-DFNNXFNH.mjs +22 -0
- package/es/chunk-DKP76RFK.mjs +8 -0
- package/es/chunk-DPJQZSCQ.mjs +22 -0
- package/es/chunk-E3D4KBHK.mjs +11 -0
- package/es/chunk-EH5U26GD.mjs +8 -0
- package/es/chunk-EHZGMWKM.mjs +8 -0
- package/es/chunk-EJPQYVUM.mjs +8 -0
- package/es/chunk-FAZP7TZ2.mjs +8 -0
- package/es/chunk-FUPB76YN.mjs +8 -0
- package/es/chunk-GBEWSYLC.mjs +11 -0
- package/es/chunk-GGV2QLUA.mjs +17 -0
- package/es/chunk-GLR6PUBW.mjs +14 -0
- package/es/chunk-GSEIW3MZ.mjs +8 -0
- package/es/chunk-H4Q2L2Z7.mjs +8 -0
- package/es/chunk-H625225L.mjs +11 -0
- package/es/chunk-HMTKJUIX.mjs +22 -0
- package/es/chunk-HX6BTERO.mjs +8 -0
- package/es/chunk-IBD2BGUZ.mjs +17 -0
- package/es/chunk-IGSBQ6WF.mjs +15 -0
- package/es/chunk-IIW4U5AP.mjs +16 -0
- package/es/chunk-IQFJ5CYB.mjs +29 -0
- package/es/chunk-J3CV6URY.mjs +8 -0
- package/es/chunk-JHC77OJC.mjs +12 -0
- package/es/chunk-JNYC6ERK.mjs +21 -0
- package/es/chunk-KCWWH5WQ.mjs +30 -0
- package/es/chunk-KH4FBZOK.mjs +8 -0
- package/es/chunk-KH7NPF6I.mjs +15 -0
- package/es/chunk-KLSJ3VZG.mjs +10 -0
- package/es/chunk-KRWQWZSN.mjs +8 -0
- package/es/chunk-KZ3JDS2O.mjs +14 -0
- package/es/chunk-L7X3A3OQ.mjs +8 -0
- package/es/chunk-LXLIFUBR.mjs +43 -0
- package/es/chunk-MPSJ4FMD.mjs +16 -0
- package/es/chunk-MRUDDQHD.mjs +23 -0
- package/es/chunk-N4OGI2R3.mjs +19 -0
- package/es/chunk-N6IG3JYY.mjs +12 -0
- package/es/chunk-NPK3BLV3.mjs +30 -0
- package/es/chunk-NS4LR37B.mjs +8 -0
- package/es/chunk-NSD6JAKL.mjs +19 -0
- package/es/chunk-O6RUKPNP.mjs +9 -0
- package/es/chunk-ODB7KGAC.mjs +23 -0
- package/es/chunk-OG7NHU5G.mjs +42 -0
- package/es/chunk-OHCFFQNC.mjs +17 -0
- package/es/chunk-OL5ADAY4.mjs +57 -0
- package/es/chunk-OMH5TZIZ.mjs +13 -0
- package/es/chunk-OQG6GEL2.mjs +13 -0
- package/es/chunk-PGVJ5IPJ.mjs +8 -0
- package/es/chunk-PMNXLTUL.mjs +8 -0
- package/es/chunk-PUHUSCOJ.mjs +8 -0
- package/es/chunk-QI5FH522.mjs +11 -0
- package/es/chunk-QIYJY2OJ.mjs +8 -0
- package/es/chunk-REX225J2.mjs +10 -0
- package/es/chunk-RNR7ZEZT.mjs +12 -0
- package/es/chunk-SJCOWTEU.mjs +13 -0
- package/es/chunk-SLCAL4QM.mjs +8 -0
- package/es/chunk-SOAUJN2U.mjs +8 -0
- package/es/chunk-SWZD5EEJ.mjs +55 -0
- package/es/chunk-T2D2S2FY.mjs +8 -0
- package/es/chunk-T3MNPQVN.mjs +12 -0
- package/es/chunk-T53J6Z3W.mjs +8 -0
- package/es/chunk-TP4LCGUV.mjs +42 -0
- package/es/chunk-TZUHPRZ4.mjs +8 -0
- package/es/chunk-TZYPEK5T.mjs +34 -0
- package/es/chunk-UCRMI3XM.mjs +11 -0
- package/es/chunk-UCXP6JO2.mjs +14 -0
- package/es/chunk-UKTPML4E.mjs +14 -0
- package/es/chunk-USYDW5X4.mjs +8 -0
- package/es/chunk-UZ44S2T3.mjs +8 -0
- package/es/chunk-VLHC3FS7.mjs +20 -0
- package/es/chunk-VUU242QS.mjs +15 -0
- package/es/chunk-W56MFMAJ.mjs +16 -0
- package/es/chunk-W6L2LW6U.mjs +13 -0
- package/es/chunk-W72QWFLR.mjs +27 -0
- package/es/chunk-WLGNQDOA.mjs +8 -0
- package/es/chunk-WQFMRPXU.mjs +19 -0
- package/es/chunk-WTILX3PP.mjs +8 -0
- package/es/chunk-XJT6W4OH.mjs +15 -0
- package/es/chunk-XY5KATPF.mjs +12 -0
- package/es/chunk-Y2L4VRHX.mjs +10 -0
- package/es/chunk-Y6WZSPBK.mjs +13 -0
- package/es/chunk-YBK27UNT.mjs +24 -0
- package/es/chunk-YJKAHUCK.mjs +8 -0
- package/es/chunk-YMKK5EMJ.mjs +8 -0
- package/es/chunk-YO3WEMCZ.mjs +8 -0
- package/es/chunk-YWA5IBEK.mjs +8 -0
- package/es/chunk-YY5FUU2J.mjs +8 -0
- package/es/chunk-ZDX7R4RH.mjs +19 -0
- package/es/chunk-ZHLRSVIE.mjs +8 -0
- package/es/{clamp.d.ts → clamp.d.mts} +3 -1
- package/es/clamp.mjs +6 -0
- package/es/clone.d.mts +7 -0
- package/es/clone.mjs +8 -0
- package/es/{cloneSimple.d.ts → cloneSimple.d.mts} +3 -1
- package/es/cloneSimple.mjs +6 -0
- package/es/{compareVersion.d.ts → compareVersion.d.mts} +3 -1
- package/es/compareVersion.mjs +6 -0
- package/es/compressImage.d.mts +6 -0
- package/es/compressImage.mjs +7 -0
- package/es/createHexColorByHash.d.mts +6 -0
- package/es/createHexColorByHash.mjs +6 -0
- package/es/{createLinearFunction.d.ts → createLinearFunction.d.mts} +3 -1
- package/es/createLinearFunction.mjs +6 -0
- package/es/{createWithLoading.d.ts → createWithLoading.d.mts} +4 -2
- package/es/createWithLoading.mjs +6 -0
- package/es/debounce.d.mts +7 -0
- package/es/debounce.mjs +6 -0
- package/es/decode.d.mts +4 -0
- package/es/decode.mjs +8 -0
- package/es/downloadFile.d.mts +8 -0
- package/es/downloadFile.mjs +6 -0
- package/es/each.d.mts +7 -0
- package/es/each.mjs +6 -0
- package/es/{exitFullscreen.d.ts → exitFullscreen.d.mts} +3 -1
- package/es/exitFullscreen.mjs +6 -0
- package/es/filterBankCardNo.d.mts +6 -0
- package/es/filterBankCardNo.mjs +6 -0
- package/es/filterCRLF.d.mts +6 -0
- package/es/filterCRLF.mjs +6 -0
- package/es/filterEmoji.d.mts +6 -0
- package/es/filterEmoji.mjs +6 -0
- package/es/{filterEmptyValue.d.ts → filterEmptyValue.d.mts} +3 -1
- package/es/filterEmptyValue.mjs +14 -0
- package/es/filterIdCard.d.mts +7 -0
- package/es/filterIdCard.mjs +6 -0
- package/es/filterName.d.mts +6 -0
- package/es/filterName.mjs +6 -0
- package/es/{filterPhone.d.ts → filterPhone.d.mts} +3 -1
- package/es/filterPhone.mjs +6 -0
- package/es/filterString.d.mts +8 -0
- package/es/filterString.mjs +6 -0
- package/es/formartDateToZN.d.mts +3 -0
- package/es/formartDateToZN.mjs +119 -0
- package/es/formatAmount.d.mts +6 -0
- package/es/formatAmount.mjs +6 -0
- package/es/formatDate.d.mts +7 -0
- package/es/formatDate.mjs +8 -0
- package/es/{formatDateStr.d.ts → formatDateStr.d.mts} +3 -1
- package/es/formatDateStr.mjs +6 -0
- package/es/formatFileSize.d.mts +6 -0
- package/es/formatFileSize.mjs +6 -0
- package/es/{formatMessage.d.ts → formatMessage.d.mts} +3 -1
- package/es/formatMessage.mjs +10 -0
- package/es/{formatPathParams.d.ts → formatPathParams.d.mts} +3 -1
- package/es/formatPathParams.mjs +6 -0
- package/es/getBlobByUrl.d.mts +6 -0
- package/es/getBlobByUrl.mjs +6 -0
- package/es/getDayMillisecond.d.mts +6 -0
- package/es/getDayMillisecond.mjs +6 -0
- package/es/getImageInfo.d.mts +6 -0
- package/es/getImageInfo.mjs +6 -0
- package/es/{getRandom.d.ts → getRandom.d.mts} +3 -1
- package/es/getRandom.mjs +7 -0
- package/es/getRandomColor.d.mts +6 -0
- package/es/getRandomColor.mjs +6 -0
- package/es/{getRandomNumber.d.ts → getRandomNumber.d.mts} +3 -1
- package/es/getRandomNumber.mjs +8 -0
- package/es/getScrollTop.d.mts +6 -0
- package/es/getScrollTop.mjs +6 -0
- package/es/getVideoInfo.d.mts +6 -0
- package/es/getVideoInfo.mjs +6 -0
- package/es/inBrowser.d.mts +6 -0
- package/es/inBrowser.mjs +6 -0
- package/es/index.d.mts +115 -0
- package/es/index.mjs +470 -0
- package/es/insertLink.d.mts +7 -0
- package/es/insertLink.mjs +6 -0
- package/es/insertScript.d.mts +7 -0
- package/es/insertScript.mjs +6 -0
- package/es/insertStyle.d.mts +6 -0
- package/es/insertStyle.mjs +6 -0
- package/es/{isAmount.d.ts → isAmount.d.mts} +3 -1
- package/es/isAmount.mjs +6 -0
- package/es/isAndroid.d.mts +6 -0
- package/es/isAndroid.mjs +6 -0
- package/es/{isArray.d.ts → isArray.d.mts} +3 -1
- package/es/isArray.mjs +6 -0
- package/es/isBoolean.d.mts +7 -0
- package/es/isBoolean.mjs +6 -0
- package/es/isChinese.d.mts +6 -0
- package/es/isChinese.mjs +6 -0
- package/es/isDate.d.mts +6 -0
- package/es/isDate.mjs +6 -0
- package/es/isEmail.d.mts +6 -0
- package/es/isEmail.mjs +6 -0
- package/es/isEmpty.d.mts +6 -0
- package/es/isEmpty.mjs +8 -0
- package/es/isEmptyArray.d.mts +6 -0
- package/es/isEmptyArray.mjs +7 -0
- package/es/isEmptyObject.d.mts +7 -0
- package/es/isEmptyObject.mjs +6 -0
- package/es/isError.d.mts +6 -0
- package/es/isError.mjs +6 -0
- package/es/isFunction.d.mts +6 -0
- package/es/isFunction.mjs +6 -0
- package/es/{isIE.d.ts → isIE.d.mts} +3 -1
- package/es/isIE.mjs +6 -0
- package/es/isIOS.d.mts +6 -0
- package/es/isIOS.mjs +6 -0
- package/es/isIdCard.d.mts +6 -0
- package/es/isIdCard.mjs +6 -0
- package/es/isJSONString.d.mts +7 -0
- package/es/isJSONString.mjs +7 -0
- package/es/{isLan.d.ts → isLan.d.mts} +3 -1
- package/es/isLan.mjs +6 -0
- package/es/isLicenseCode.d.mts +7 -0
- package/es/isLicenseCode.mjs +6 -0
- package/es/isMobile.d.mts +6 -0
- package/es/isMobile.mjs +6 -0
- package/es/{isNativeFunction.d.ts → isNativeFunction.d.mts} +3 -1
- package/es/isNativeFunction.mjs +7 -0
- package/es/isNull.d.mts +6 -0
- package/es/isNull.mjs +6 -0
- package/es/isNumber.d.mts +7 -0
- package/es/isNumber.mjs +6 -0
- package/es/isObject.d.mts +6 -0
- package/es/isObject.mjs +6 -0
- package/es/isPhone.d.mts +6 -0
- package/es/isPhone.mjs +6 -0
- package/es/isPromise.d.mts +6 -0
- package/es/isPromise.mjs +6 -0
- package/es/isRegExp.d.mts +6 -0
- package/es/isRegExp.mjs +6 -0
- package/es/isString.d.mts +6 -0
- package/es/isString.mjs +6 -0
- package/es/isUndefined.d.mts +6 -0
- package/es/isUndefined.mjs +6 -0
- package/es/isUrl.d.mts +6 -0
- package/es/isUrl.mjs +6 -0
- package/es/{isWeChat.d.ts → isWeChat.d.mts} +4 -2
- package/es/isWeChat.mjs +8 -0
- package/es/{isWeChatMiniProgram.d.ts → isWeChatMiniProgram.d.mts} +3 -1
- package/es/isWeChatMiniProgram.mjs +6 -0
- package/es/isWindow.d.mts +7 -0
- package/es/isWindow.mjs +6 -0
- package/es/kebabCase.d.mts +7 -0
- package/es/kebabCase.mjs +6 -0
- package/es/listGenerator.d.mts +7 -0
- package/es/listGenerator.mjs +6 -0
- package/es/{mousewheel.d.ts → mousewheel.d.mts} +3 -2
- package/es/mousewheel.mjs +6 -0
- package/es/nf.d.mts +6 -0
- package/es/nf.mjs +6 -0
- package/es/normalizePath.d.mts +6 -0
- package/es/normalizePath.mjs +6 -0
- package/es/omit.d.mts +6 -0
- package/es/omit.mjs +6 -0
- package/es/{padding.d.ts → padding.d.mts} +3 -1
- package/es/padding.mjs +6 -0
- package/es/parseDate.d.mts +6 -0
- package/es/parseDate.mjs +6 -0
- package/es/parseError.d.mts +6 -0
- package/es/parseError.mjs +10 -0
- package/es/parseObject.d.mts +7 -0
- package/es/parseObject.mjs +6 -0
- package/es/parsePath.d.mts +6 -0
- package/es/parsePath.mjs +7 -0
- package/es/parseQuery.d.mts +8 -0
- package/es/parseQuery.mjs +8 -0
- package/es/parseQueryString.d.mts +8 -0
- package/es/parseQueryString.mjs +6 -0
- package/es/{pascalCase.d.ts → pascalCase.d.mts} +3 -1
- package/es/pascalCase.mjs +8 -0
- package/es/pick.d.mts +6 -0
- package/es/pick.mjs +6 -0
- package/es/replaceCrlf.d.mts +6 -0
- package/es/replaceCrlf.mjs +6 -0
- package/es/{requestFullScreen.d.ts → requestFullScreen.d.mts} +3 -1
- package/es/requestFullScreen.mjs +6 -0
- package/es/{reserve.d.ts → reserve.d.mts} +3 -1
- package/es/reserve.mjs +9 -0
- package/es/rgbToHex.d.mts +6 -0
- package/es/rgbToHex.mjs +6 -0
- package/es/{round.d.ts → round.d.mts} +3 -1
- package/es/round.mjs +6 -0
- package/es/scrollToTop.d.mts +6 -0
- package/es/scrollToTop.mjs +6 -0
- package/es/setScrollTop.d.mts +6 -0
- package/es/setScrollTop.mjs +6 -0
- package/es/{sleep.d.ts → sleep.d.mts} +3 -1
- package/es/sleep.mjs +6 -0
- package/es/splitArray.d.mts +6 -0
- package/es/splitArray.mjs +6 -0
- package/es/storage/{factory.d.ts → factory.d.mts} +4 -2
- package/es/storage/factory.mjs +8 -0
- package/es/storage/{index.d.ts → index.d.mts} +6 -3
- package/es/storage/index.mjs +14 -0
- package/es/{stringTrim.d.ts → stringTrim.d.mts} +3 -1
- package/es/stringTrim.mjs +6 -0
- package/es/stringifyQuery.d.mts +6 -0
- package/es/stringifyQuery.mjs +8 -0
- package/es/stringifyQueryString.d.mts +8 -0
- package/es/stringifyQueryString.mjs +6 -0
- package/es/throttle.d.mts +17 -0
- package/es/throttle.mjs +10 -0
- package/es/toCDB.d.mts +6 -0
- package/es/toCDB.mjs +6 -0
- package/es/toDBC.d.mts +6 -0
- package/es/toDBC.mjs +6 -0
- package/es/{trap.d.ts → trap.d.mts} +5 -3
- package/es/trap.mjs +9 -0
- package/es/{typeOf.d.ts → typeOf.d.mts} +3 -1
- package/es/typeOf.mjs +6 -0
- package/es/withPreventConsecutiveClicks.d.mts +6 -0
- package/es/withPreventConsecutiveClicks.mjs +6 -0
- package/lib/ato.d.ts +4 -2
- package/lib/ato.js +6 -10
- package/lib/base64ToBlob.d.ts +3 -1
- package/lib/base64ToBlob.js +6 -25
- package/lib/blobToBase64.d.ts +3 -1
- package/lib/blobToBase64.js +6 -18
- package/lib/cached.d.ts +3 -1
- package/lib/cached.js +6 -16
- package/lib/camelCase.d.ts +3 -1
- package/lib/camelCase.js +6 -11
- package/lib/canvasToBlob.d.ts +3 -1
- package/lib/canvasToBlob.js +6 -12
- package/lib/capitalize.d.ts +3 -1
- package/lib/capitalize.js +6 -11
- package/lib/chunk-2ZSZ4GDI.js +14 -0
- package/lib/chunk-3HR2GZUU.js +8 -0
- package/lib/chunk-3KRJNCKB.js +8 -0
- package/lib/chunk-3MBFDHEW.js +8 -0
- package/lib/chunk-3OUQEOSR.js +8 -0
- package/lib/chunk-3ZZPPKM3.js +17 -0
- package/lib/chunk-4BFL6RXS.js +45 -0
- package/lib/chunk-4N33UIAB.js +12 -0
- package/lib/chunk-4QMOXXPL.js +22 -0
- package/lib/chunk-53VI5KBY.js +17 -0
- package/lib/chunk-576ZRCUO.js +10 -0
- package/lib/chunk-5BVFSCCX.js +8 -0
- package/lib/chunk-5Z3KN6O2.js +8 -0
- package/lib/chunk-6EBFQIMY.js +14 -0
- package/lib/chunk-6GTFQZL4.js +12 -0
- package/lib/chunk-6UGTRW2S.js +8 -0
- package/lib/chunk-A4YRDVZ4.js +8 -0
- package/lib/chunk-ADGGLX7E.js +55 -0
- package/lib/chunk-ASYHV5B7.js +32 -0
- package/lib/chunk-AZFTV4OE.js +43 -0
- package/lib/chunk-BNF4U7EJ.js +12 -0
- package/lib/chunk-BULTIEJG.js +8 -0
- package/lib/chunk-CCZL3GEW.js +8 -0
- package/lib/chunk-CMP4T3ZH.js +8 -0
- package/lib/chunk-CNCI66H4.js +19 -0
- package/lib/chunk-CSZ7G34M.js +8 -0
- package/lib/chunk-D5O4LXN3.js +8 -0
- package/lib/chunk-D7OBO7J6.js +8 -0
- package/lib/chunk-DHYITZTI.js +13 -0
- package/lib/chunk-DOXFJNJO.js +16 -0
- package/lib/chunk-DWT2WM6H.js +11 -0
- package/lib/chunk-E2KNR3UG.js +20 -0
- package/lib/chunk-EFDRCKKS.js +8 -0
- package/lib/chunk-EJMUWNXI.js +30 -0
- package/lib/chunk-ELR2DZ56.js +12 -0
- package/lib/chunk-F4QMON2N.js +8 -0
- package/lib/chunk-FBJWICWM.js +14 -0
- package/lib/chunk-FIHEVMN6.js +23 -0
- package/lib/chunk-FY3PSILS.js +11 -0
- package/lib/chunk-GDCXWM7X.js +24 -0
- package/lib/chunk-GNGSV7F7.js +8 -0
- package/lib/chunk-GV4IJGB2.js +13 -0
- package/lib/chunk-GVPHHNDY.js +55 -0
- package/lib/chunk-GVYBTJDA.js +8 -0
- package/lib/chunk-HNVHVI6P.js +42 -0
- package/lib/chunk-HU5DI7IU.js +8 -0
- package/lib/chunk-IF7JMIDO.js +19 -0
- package/lib/chunk-IIIHPNUB.js +17 -0
- package/lib/chunk-IJCLLBSR.js +21 -0
- package/lib/chunk-IJD4RHXI.js +8 -0
- package/lib/chunk-IPAT3N4P.js +12 -0
- package/lib/chunk-IPIA4Z65.js +9 -0
- package/lib/chunk-J2Y5ZZA3.js +19 -0
- package/lib/chunk-JG33SHAK.js +17 -0
- package/lib/chunk-JKCLDPOC.js +10 -0
- package/lib/chunk-JMUWQLHE.js +8 -0
- package/lib/chunk-K4SQME6B.js +16 -0
- package/lib/chunk-KDND6GRD.js +22 -0
- package/lib/chunk-KEADPNJL.js +11 -0
- package/lib/chunk-KH7MPMQF.js +15 -0
- package/lib/chunk-KJX7IWF5.js +13 -0
- package/lib/chunk-KOOGLWJ5.js +8 -0
- package/lib/chunk-KYLBUCGC.js +8 -0
- package/lib/chunk-KZJIPHQB.js +11 -0
- package/lib/chunk-L52JSZDZ.js +16 -0
- package/lib/chunk-LJ4CEJ5C.js +8 -0
- package/lib/chunk-LOPD7SSH.js +52 -0
- package/lib/chunk-M3NXNABN.js +14 -0
- package/lib/chunk-M6B3UGFI.js +57 -0
- package/lib/chunk-MQDWCBXD.js +13 -0
- package/lib/chunk-MTF3ACKC.js +8 -0
- package/lib/chunk-NCFA5IXM.js +8 -0
- package/lib/chunk-OAVK23A3.js +16 -0
- package/lib/chunk-OC64NXZ2.js +22 -0
- package/lib/chunk-ONTP5SDE.js +19 -0
- package/lib/chunk-P7QW362C.js +12 -0
- package/lib/chunk-PAERS3SW.js +7 -0
- package/lib/chunk-PQE4SACQ.js +20 -0
- package/lib/chunk-QTKWJHHW.js +22 -0
- package/lib/chunk-QYCMY2T4.js +8 -0
- package/lib/chunk-S2FOFDX4.js +8 -0
- package/lib/chunk-S6UH3LMW.js +25 -0
- package/lib/chunk-S7PUCGCQ.js +15 -0
- package/lib/chunk-SCEONZUJ.js +23 -0
- package/lib/chunk-SN35EJZF.js +30 -0
- package/lib/chunk-SQ3L6IQW.js +8 -0
- package/lib/chunk-SWLGSN5X.js +8 -0
- package/lib/chunk-SZ7IZE42.js +12 -0
- package/lib/chunk-TNIIDDN4.js +10 -0
- package/lib/chunk-TSD6OV4A.js +8 -0
- package/lib/chunk-TSFGLHCP.js +11 -0
- package/lib/chunk-TT6AI5JN.js +37 -0
- package/lib/chunk-TXWIC3L7.js +12 -0
- package/lib/chunk-UCDNFQ3U.js +12 -0
- package/lib/chunk-UMUYJJ3M.js +15 -0
- package/lib/chunk-UXSZFM5G.js +10 -0
- package/lib/chunk-VMJHCN3P.js +19 -0
- package/lib/chunk-VTSGSUL2.js +29 -0
- package/lib/chunk-W52BRMSD.js +14 -0
- package/lib/chunk-WCZPEH7E.js +8 -0
- package/lib/chunk-WEWAC6GL.js +13 -0
- package/lib/chunk-WFPQI6HC.js +27 -0
- package/lib/chunk-WXXFRKUS.js +23 -0
- package/lib/chunk-XCSSSEK2.js +8 -0
- package/lib/chunk-XOQU757U.js +8 -0
- package/lib/chunk-XR4BSWOV.js +42 -0
- package/lib/chunk-Y4V5R7XA.js +8 -0
- package/lib/chunk-YBAHLKXR.js +34 -0
- package/lib/chunk-YGV2UKBN.js +15 -0
- package/lib/chunk-YGYLI2DC.js +12 -0
- package/lib/chunk-YKTD7CLE.js +8 -0
- package/lib/chunk-ZDRIUWKX.js +8 -0
- package/lib/chunk-ZGN3KUXE.js +8 -0
- package/lib/chunk-ZWXX326Y.js +8 -0
- package/lib/clamp.d.ts +3 -1
- package/lib/clamp.js +6 -20
- package/lib/clone.d.ts +3 -1
- package/lib/clone.js +8 -23
- package/lib/cloneSimple.d.ts +3 -1
- package/lib/cloneSimple.js +6 -13
- package/lib/compareVersion.d.ts +3 -1
- package/lib/compareVersion.js +6 -43
- package/lib/compressImage.d.ts +3 -1
- package/lib/compressImage.js +7 -20
- package/lib/createHexColorByHash.d.ts +3 -1
- package/lib/createHexColorByHash.js +6 -67
- package/lib/createLinearFunction.d.ts +3 -1
- package/lib/createLinearFunction.js +6 -24
- package/lib/createWithLoading.d.ts +4 -2
- package/lib/createWithLoading.js +6 -39
- package/lib/debounce.d.ts +3 -1
- package/lib/debounce.js +6 -18
- package/lib/decode.d.ts +4 -2
- package/lib/decode.js +8 -52
- package/lib/downloadFile.d.ts +3 -1
- package/lib/downloadFile.js +6 -15
- package/lib/each.d.ts +4 -2
- package/lib/each.js +6 -17
- package/lib/exitFullscreen.d.ts +3 -1
- package/lib/exitFullscreen.js +6 -31
- package/lib/filterBankCardNo.d.ts +3 -1
- package/lib/filterBankCardNo.js +6 -12
- package/lib/filterCRLF.d.ts +3 -1
- package/lib/filterCRLF.js +6 -10
- package/lib/filterEmoji.d.ts +3 -1
- package/lib/filterEmoji.js +6 -21
- package/lib/filterEmptyValue.d.ts +3 -1
- package/lib/filterEmptyValue.js +14 -35
- package/lib/filterIdCard.d.ts +3 -1
- package/lib/filterIdCard.js +6 -11
- package/lib/filterName.d.ts +3 -1
- package/lib/filterName.js +6 -20
- package/lib/filterPhone.d.ts +3 -1
- package/lib/filterPhone.js +6 -12
- package/lib/filterString.d.ts +3 -1
- package/lib/filterString.js +6 -20
- package/lib/formartDateToZN.d.ts +3 -1
- package/lib/formartDateToZN.js +119 -34
- package/lib/formatAmount.d.ts +3 -1
- package/lib/formatAmount.js +6 -25
- package/lib/formatDate.d.ts +3 -1
- package/lib/formatDate.js +8 -39
- package/lib/formatDateStr.d.ts +3 -1
- package/lib/formatDateStr.js +6 -11
- package/lib/formatFileSize.d.ts +6 -0
- package/lib/formatFileSize.js +6 -0
- package/lib/formatMessage.d.ts +3 -1
- package/lib/formatMessage.js +10 -29
- package/lib/formatPathParams.d.ts +3 -1
- package/lib/formatPathParams.js +6 -23
- package/lib/getBlobByUrl.d.ts +3 -1
- package/lib/getBlobByUrl.js +6 -25
- package/lib/getDayMillisecond.d.ts +3 -1
- package/lib/getDayMillisecond.js +6 -10
- package/lib/getImageInfo.d.ts +3 -1
- package/lib/getImageInfo.js +6 -18
- package/lib/getRandom.d.ts +3 -1
- package/lib/getRandom.js +7 -13
- package/lib/getRandomColor.d.ts +3 -1
- package/lib/getRandomColor.js +6 -10
- package/lib/getRandomNumber.d.ts +3 -1
- package/lib/getRandomNumber.js +8 -12
- package/lib/getScrollTop.d.ts +3 -1
- package/lib/getScrollTop.js +6 -10
- package/lib/getVideoInfo.d.ts +3 -1
- package/lib/getVideoInfo.js +6 -19
- package/lib/inBrowser.d.ts +3 -1
- package/lib/inBrowser.js +6 -10
- package/lib/index.d.ts +115 -112
- package/lib/index.js +470 -129
- package/lib/insertLink.d.ts +4 -2
- package/lib/insertLink.js +6 -19
- package/lib/insertScript.d.ts +4 -2
- package/lib/insertScript.js +6 -19
- package/lib/insertStyle.d.ts +3 -1
- package/lib/insertStyle.js +6 -13
- package/lib/isAmount.d.ts +3 -1
- package/lib/isAmount.js +6 -17
- package/lib/isAndroid.d.ts +3 -1
- package/lib/isAndroid.js +6 -10
- package/lib/isArray.d.ts +3 -1
- package/lib/isArray.js +6 -12
- package/lib/isBoolean.d.ts +3 -1
- package/lib/isBoolean.js +6 -11
- package/lib/isChinese.d.ts +3 -1
- package/lib/isChinese.js +6 -10
- package/lib/isDate.d.ts +3 -1
- package/lib/isDate.js +6 -10
- package/lib/isEmail.d.ts +3 -1
- package/lib/isEmail.js +6 -10
- package/lib/isEmpty.d.ts +3 -1
- package/lib/isEmpty.js +8 -12
- package/lib/isEmptyArray.d.ts +3 -1
- package/lib/isEmptyArray.js +7 -11
- package/lib/isEmptyObject.d.ts +3 -1
- package/lib/isEmptyObject.js +6 -11
- package/lib/isError.d.ts +3 -1
- package/lib/isError.js +6 -10
- package/lib/isFunction.d.ts +3 -1
- package/lib/isFunction.js +6 -10
- package/lib/isIE.d.ts +3 -1
- package/lib/isIE.js +6 -31
- package/lib/isIOS.d.ts +3 -1
- package/lib/isIOS.js +6 -10
- package/lib/isIdCard.d.ts +3 -1
- package/lib/isIdCard.js +6 -10
- package/lib/isJSONString.d.ts +3 -1
- package/lib/isJSONString.js +7 -18
- package/lib/isLan.d.ts +3 -1
- package/lib/isLan.js +6 -40
- package/lib/isLicenseCode.d.ts +3 -1
- package/lib/isLicenseCode.js +6 -11
- package/lib/isMobile.d.ts +3 -1
- package/lib/isMobile.js +6 -15
- package/lib/isNativeFunction.d.ts +3 -1
- package/lib/isNativeFunction.js +7 -12
- package/lib/isNull.d.ts +3 -1
- package/lib/isNull.js +6 -10
- package/lib/isNumber.d.ts +3 -1
- package/lib/isNumber.js +6 -11
- package/lib/isObject.d.ts +3 -1
- package/lib/isObject.js +6 -10
- package/lib/isPhone.d.ts +3 -1
- package/lib/isPhone.js +6 -10
- package/lib/isPromise.d.ts +3 -1
- package/lib/isPromise.js +6 -10
- package/lib/isRegExp.d.ts +3 -1
- package/lib/isRegExp.js +6 -10
- package/lib/isString.d.ts +3 -1
- package/lib/isString.js +6 -10
- package/lib/isUndefined.d.ts +3 -1
- package/lib/isUndefined.js +6 -10
- package/lib/isUrl.d.ts +3 -1
- package/lib/isUrl.js +6 -10
- package/lib/isWeChat.d.ts +4 -2
- package/lib/isWeChat.js +8 -18
- package/lib/isWeChatMiniProgram.d.ts +3 -1
- package/lib/isWeChatMiniProgram.js +6 -12
- package/lib/isWindow.d.ts +3 -1
- package/lib/isWindow.js +6 -11
- package/lib/kebabCase.d.ts +3 -1
- package/lib/kebabCase.js +6 -12
- package/lib/listGenerator.d.ts +3 -1
- package/lib/listGenerator.js +6 -11
- package/lib/mousewheel.d.ts +3 -2
- package/lib/mousewheel.js +6 -65
- package/lib/nf.d.ts +3 -1
- package/lib/nf.js +6 -10
- package/lib/normalizePath.d.ts +3 -1
- package/lib/normalizePath.js +6 -10
- package/lib/omit.d.ts +3 -1
- package/lib/omit.js +6 -14
- package/lib/padding.d.ts +3 -1
- package/lib/padding.js +6 -15
- package/lib/parseDate.d.ts +3 -1
- package/lib/parseDate.js +6 -15
- package/lib/parseError.d.ts +3 -1
- package/lib/parseError.js +10 -26
- package/lib/parseObject.d.ts +3 -1
- package/lib/parseObject.js +6 -17
- package/lib/parsePath.d.ts +3 -1
- package/lib/parsePath.js +7 -18
- package/lib/parseQuery.d.ts +3 -1
- package/lib/parseQuery.js +8 -31
- package/lib/parseQueryString.d.ts +3 -1
- package/lib/parseQueryString.js +6 -18
- package/lib/pascalCase.d.ts +3 -1
- package/lib/pascalCase.js +8 -13
- package/lib/pick.d.ts +3 -1
- package/lib/pick.js +6 -14
- package/lib/replaceCrlf.d.ts +3 -1
- package/lib/replaceCrlf.js +6 -10
- package/lib/requestFullScreen.d.ts +3 -1
- package/lib/requestFullScreen.js +6 -31
- package/lib/reserve.d.ts +3 -1
- package/lib/reserve.js +9 -14
- package/lib/rgbToHex.d.ts +3 -1
- package/lib/rgbToHex.js +6 -16
- package/lib/round.d.ts +3 -1
- package/lib/round.js +6 -51
- package/lib/scrollToTop.d.ts +3 -1
- package/lib/scrollToTop.js +6 -14
- package/lib/setScrollTop.d.ts +3 -1
- package/lib/setScrollTop.js +6 -10
- package/lib/sleep.d.ts +3 -1
- package/lib/sleep.js +6 -14
- package/lib/splitArray.d.ts +3 -1
- package/lib/splitArray.js +6 -14
- package/lib/storage/factory.d.ts +4 -2
- package/lib/storage/factory.js +8 -59
- package/lib/storage/index.d.ts +6 -3
- package/lib/storage/index.js +14 -30
- package/lib/stringTrim.d.ts +3 -1
- package/lib/stringTrim.js +6 -23
- package/lib/stringifyQuery.d.ts +3 -1
- package/lib/stringifyQuery.js +8 -20
- package/lib/stringifyQueryString.d.ts +3 -1
- package/lib/stringifyQueryString.js +6 -17
- package/lib/throttle.d.ts +5 -3
- package/lib/throttle.js +10 -45
- package/lib/toCDB.d.ts +3 -1
- package/lib/toCDB.js +6 -23
- package/lib/toDBC.d.ts +3 -1
- package/lib/toDBC.js +6 -23
- package/lib/trap.d.ts +5 -3
- package/lib/trap.js +9 -47
- package/lib/typeOf.d.ts +3 -1
- package/lib/typeOf.js +6 -12
- package/lib/withPreventConsecutiveClicks.d.ts +3 -1
- package/lib/withPreventConsecutiveClicks.js +6 -42
- package/package.json +16 -6
- package/es/ato.js +0 -6
- package/es/base64ToBlob.d.ts +0 -6
- package/es/base64ToBlob.js +0 -21
- package/es/blobToBase64.d.ts +0 -4
- package/es/blobToBase64.js +0 -14
- package/es/cached.d.ts +0 -5
- package/es/cached.js +0 -12
- package/es/camelCase.d.ts +0 -5
- package/es/camelCase.js +0 -7
- package/es/canvasToBlob.d.ts +0 -4
- package/es/canvasToBlob.js +0 -8
- package/es/capitalize.d.ts +0 -5
- package/es/capitalize.js +0 -7
- package/es/clamp.js +0 -16
- package/es/clone.d.ts +0 -5
- package/es/clone.js +0 -19
- package/es/cloneSimple.js +0 -9
- package/es/compareVersion.js +0 -39
- package/es/compressImage.d.ts +0 -4
- package/es/compressImage.js +0 -16
- package/es/createHexColorByHash.d.ts +0 -4
- package/es/createHexColorByHash.js +0 -63
- package/es/createLinearFunction.js +0 -20
- package/es/createWithLoading.js +0 -35
- package/es/debounce.d.ts +0 -5
- package/es/debounce.js +0 -14
- package/es/decode.d.ts +0 -2
- package/es/decode.js +0 -47
- package/es/downloadFile.d.ts +0 -6
- package/es/downloadFile.js +0 -11
- package/es/each.d.ts +0 -5
- package/es/each.js +0 -13
- package/es/exitFullscreen.js +0 -27
- package/es/filterBankCardNo.d.ts +0 -4
- package/es/filterBankCardNo.js +0 -8
- package/es/filterCRLF.d.ts +0 -4
- package/es/filterCRLF.js +0 -6
- package/es/filterEmoji.d.ts +0 -4
- package/es/filterEmoji.js +0 -17
- package/es/filterEmptyValue.js +0 -31
- package/es/filterIdCard.d.ts +0 -5
- package/es/filterIdCard.js +0 -7
- package/es/filterName.d.ts +0 -4
- package/es/filterName.js +0 -16
- package/es/filterPhone.js +0 -8
- package/es/filterString.d.ts +0 -6
- package/es/filterString.js +0 -16
- package/es/formartDateToZN.d.ts +0 -1
- package/es/formartDateToZN.js +0 -30
- package/es/formatAmount.d.ts +0 -4
- package/es/formatAmount.js +0 -21
- package/es/formatDate.d.ts +0 -5
- package/es/formatDate.js +0 -35
- package/es/formatDateStr.js +0 -7
- package/es/formatMessage.js +0 -25
- package/es/formatPathParams.js +0 -19
- package/es/getBlobByUrl.d.ts +0 -4
- package/es/getBlobByUrl.js +0 -21
- package/es/getDayMillisecond.d.ts +0 -4
- package/es/getDayMillisecond.js +0 -6
- package/es/getImageInfo.d.ts +0 -4
- package/es/getImageInfo.js +0 -14
- package/es/getRandom.js +0 -9
- package/es/getRandomColor.d.ts +0 -4
- package/es/getRandomColor.js +0 -6
- package/es/getRandomNumber.js +0 -8
- package/es/getScrollTop.d.ts +0 -4
- package/es/getScrollTop.js +0 -6
- package/es/getVideoInfo.d.ts +0 -4
- package/es/getVideoInfo.js +0 -15
- package/es/inBrowser.d.ts +0 -4
- package/es/inBrowser.js +0 -6
- package/es/index.d.ts +0 -112
- package/es/index.js +0 -113
- package/es/insertLink.d.ts +0 -5
- package/es/insertLink.js +0 -15
- package/es/insertScript.d.ts +0 -5
- package/es/insertScript.js +0 -15
- package/es/insertStyle.d.ts +0 -4
- package/es/insertStyle.js +0 -9
- package/es/isAmount.js +0 -13
- package/es/isAndroid.d.ts +0 -4
- package/es/isAndroid.js +0 -6
- package/es/isArray.js +0 -8
- package/es/isBoolean.d.ts +0 -5
- package/es/isBoolean.js +0 -7
- package/es/isChinese.d.ts +0 -4
- package/es/isChinese.js +0 -6
- package/es/isDate.d.ts +0 -4
- package/es/isDate.js +0 -6
- package/es/isEmail.d.ts +0 -4
- package/es/isEmail.js +0 -6
- package/es/isEmpty.d.ts +0 -4
- package/es/isEmpty.js +0 -8
- package/es/isEmptyArray.d.ts +0 -4
- package/es/isEmptyArray.js +0 -7
- package/es/isEmptyObject.d.ts +0 -5
- package/es/isEmptyObject.js +0 -7
- package/es/isError.d.ts +0 -4
- package/es/isError.js +0 -6
- package/es/isFunction.d.ts +0 -4
- package/es/isFunction.js +0 -6
- package/es/isIE.js +0 -27
- package/es/isIOS.d.ts +0 -4
- package/es/isIOS.js +0 -6
- package/es/isIdCard.d.ts +0 -4
- package/es/isIdCard.js +0 -6
- package/es/isJSONString.d.ts +0 -5
- package/es/isJSONString.js +0 -14
- package/es/isLan.js +0 -36
- package/es/isLicenseCode.d.ts +0 -5
- package/es/isLicenseCode.js +0 -7
- package/es/isMobile.d.ts +0 -4
- package/es/isMobile.js +0 -11
- package/es/isNativeFunction.js +0 -8
- package/es/isNull.d.ts +0 -4
- package/es/isNull.js +0 -6
- package/es/isNumber.d.ts +0 -5
- package/es/isNumber.js +0 -7
- package/es/isObject.d.ts +0 -4
- package/es/isObject.js +0 -6
- package/es/isPhone.d.ts +0 -4
- package/es/isPhone.js +0 -6
- package/es/isPromise.d.ts +0 -4
- package/es/isPromise.js +0 -6
- package/es/isRegExp.d.ts +0 -4
- package/es/isRegExp.js +0 -6
- package/es/isString.d.ts +0 -4
- package/es/isString.js +0 -6
- package/es/isUndefined.d.ts +0 -4
- package/es/isUndefined.js +0 -6
- package/es/isUrl.d.ts +0 -4
- package/es/isUrl.js +0 -6
- package/es/isWeChat.js +0 -13
- package/es/isWeChatMiniProgram.js +0 -8
- package/es/isWindow.d.ts +0 -5
- package/es/isWindow.js +0 -7
- package/es/kebabCase.d.ts +0 -5
- package/es/kebabCase.js +0 -8
- package/es/listGenerator.d.ts +0 -5
- package/es/listGenerator.js +0 -7
- package/es/mousewheel.js +0 -61
- package/es/nf.d.ts +0 -4
- package/es/nf.js +0 -6
- package/es/normalizePath.d.ts +0 -4
- package/es/normalizePath.js +0 -6
- package/es/omit.d.ts +0 -4
- package/es/omit.js +0 -10
- package/es/padding.js +0 -11
- package/es/parseDate.d.ts +0 -4
- package/es/parseDate.js +0 -11
- package/es/parseError.d.ts +0 -4
- package/es/parseError.js +0 -22
- package/es/parseObject.d.ts +0 -5
- package/es/parseObject.js +0 -13
- package/es/parsePath.d.ts +0 -4
- package/es/parsePath.js +0 -14
- package/es/parseQuery.d.ts +0 -6
- package/es/parseQuery.js +0 -27
- package/es/parseQueryString.d.ts +0 -6
- package/es/parseQueryString.js +0 -14
- package/es/pascalCase.js +0 -9
- package/es/pick.d.ts +0 -4
- package/es/pick.js +0 -10
- package/es/replaceCrlf.d.ts +0 -4
- package/es/replaceCrlf.js +0 -6
- package/es/requestFullScreen.js +0 -27
- package/es/reserve.js +0 -10
- package/es/rgbToHex.d.ts +0 -4
- package/es/rgbToHex.js +0 -12
- package/es/round.js +0 -47
- package/es/scrollToTop.d.ts +0 -4
- package/es/scrollToTop.js +0 -10
- package/es/setScrollTop.d.ts +0 -4
- package/es/setScrollTop.js +0 -6
- package/es/sleep.js +0 -10
- package/es/splitArray.d.ts +0 -4
- package/es/splitArray.js +0 -10
- package/es/storage/factory.js +0 -55
- package/es/storage/index.js +0 -13
- package/es/stringTrim.js +0 -19
- package/es/stringifyQuery.d.ts +0 -4
- package/es/stringifyQuery.js +0 -16
- package/es/stringifyQueryString.d.ts +0 -6
- package/es/stringifyQueryString.js +0 -13
- package/es/throttle.d.ts +0 -15
- package/es/throttle.js +0 -39
- package/es/toCDB.d.ts +0 -4
- package/es/toCDB.js +0 -19
- package/es/toDBC.d.ts +0 -4
- package/es/toDBC.js +0 -19
- package/es/trap.js +0 -43
- package/es/typeOf.js +0 -8
- package/es/withPreventConsecutiveClicks.d.ts +0 -4
- package/es/withPreventConsecutiveClicks.js +0 -38
package/es/base64ToBlob.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* base64 转 blob
|
|
3
|
-
* @param base64 base64字符串
|
|
4
|
-
* @param contentType 文件类型
|
|
5
|
-
*/
|
|
6
|
-
export function base64ToBlob(base64, contentType) {
|
|
7
|
-
var _a;
|
|
8
|
-
const [prefix, rest] = base64.split(',');
|
|
9
|
-
const type = contentType !== null && contentType !== void 0 ? contentType : (_a = prefix.match(/:(.*?);/)) === null || _a === void 0 ? void 0 : _a[1];
|
|
10
|
-
// 还是选用直接 atob
|
|
11
|
-
// const data = inBrowser()
|
|
12
|
-
// ? window.atob(rest)
|
|
13
|
-
// : Buffer.from(rest, 'base64').toString('binary')
|
|
14
|
-
const data = atob(rest);
|
|
15
|
-
let len = data.length;
|
|
16
|
-
const u8arr = new Uint8Array(len);
|
|
17
|
-
while (len--) {
|
|
18
|
-
u8arr[len] = data.charCodeAt(len);
|
|
19
|
-
}
|
|
20
|
-
return new Blob([u8arr], { type });
|
|
21
|
-
}
|
package/es/blobToBase64.d.ts
DELETED
package/es/blobToBase64.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* blob 转 base64
|
|
3
|
-
*/
|
|
4
|
-
export function blobToBase64(blob) {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
const fileReader = new FileReader();
|
|
7
|
-
fileReader.onload = (res) => {
|
|
8
|
-
var _a, _b;
|
|
9
|
-
resolve((_b = (_a = res.target) === null || _a === void 0 ? void 0 : _a.result) !== null && _b !== void 0 ? _b : '');
|
|
10
|
-
};
|
|
11
|
-
fileReader.onerror = reject;
|
|
12
|
-
fileReader.readAsDataURL(blob);
|
|
13
|
-
});
|
|
14
|
-
}
|
package/es/cached.d.ts
DELETED
package/es/cached.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 缓存、记忆函数,缓存函数的运算结果
|
|
3
|
-
* 需注意缓存的函数得是纯函数
|
|
4
|
-
*/
|
|
5
|
-
export function cached(fn) {
|
|
6
|
-
const cache = Object.create(null);
|
|
7
|
-
return function cachedFn(...args) {
|
|
8
|
-
const key = JSON.stringify(args);
|
|
9
|
-
const hit = cache[key];
|
|
10
|
-
return hit || (cache[key] = fn(...args));
|
|
11
|
-
};
|
|
12
|
-
}
|
package/es/camelCase.d.ts
DELETED
package/es/camelCase.js
DELETED
package/es/canvasToBlob.d.ts
DELETED
package/es/canvasToBlob.js
DELETED
package/es/capitalize.d.ts
DELETED
package/es/capitalize.js
DELETED
package/es/clamp.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 首选值超出最小值,返回最小值;首选值超出最大值,返回最大值;其余返回首选值
|
|
3
|
-
* @param min 最小值
|
|
4
|
-
* @param x 首选值
|
|
5
|
-
* @param max 最大值
|
|
6
|
-
*/
|
|
7
|
-
export function clamp(min, val, max) {
|
|
8
|
-
// Math.min(Math.max(min, val), max)
|
|
9
|
-
if (val < min) {
|
|
10
|
-
return min;
|
|
11
|
-
}
|
|
12
|
-
if (val > max) {
|
|
13
|
-
return max;
|
|
14
|
-
}
|
|
15
|
-
return val;
|
|
16
|
-
}
|
package/es/clone.d.ts
DELETED
package/es/clone.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { isArray } from './isArray';
|
|
2
|
-
import { isObject } from './isObject';
|
|
3
|
-
/**
|
|
4
|
-
* 深拷贝
|
|
5
|
-
* @param source 需要转换的值
|
|
6
|
-
* */
|
|
7
|
-
export function clone(source) {
|
|
8
|
-
if (!isArray(source) && !isObject(source)) {
|
|
9
|
-
return source;
|
|
10
|
-
}
|
|
11
|
-
const target = (isArray(source) ? [] : {});
|
|
12
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
13
|
-
for (const key in source) {
|
|
14
|
-
if (source.hasOwnProperty(key)) {
|
|
15
|
-
target[key] = clone(source[key]);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
}
|
package/es/cloneSimple.js
DELETED
package/es/compareVersion.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 比对版本
|
|
3
|
-
* -1 => nv < v
|
|
4
|
-
* 0 => nv === v
|
|
5
|
-
* 1 => nv > v
|
|
6
|
-
* @param nv 新版本
|
|
7
|
-
* @param v 版本
|
|
8
|
-
*/
|
|
9
|
-
export function compareVersion(nv, v) {
|
|
10
|
-
const [H = 0, T = 0, S = 0] = nv.split('.').map((i) => +i); // 新
|
|
11
|
-
const [h = 0, t = 0, s = 0] = v.split('.').map((i) => +i); // 本
|
|
12
|
-
let result = 0;
|
|
13
|
-
if (H > h) {
|
|
14
|
-
result = 1;
|
|
15
|
-
}
|
|
16
|
-
else if (H === h) {
|
|
17
|
-
if (T > t) {
|
|
18
|
-
result = 1;
|
|
19
|
-
}
|
|
20
|
-
else if (T === t) {
|
|
21
|
-
if (S > s) {
|
|
22
|
-
result = 1;
|
|
23
|
-
}
|
|
24
|
-
else if (S === s) {
|
|
25
|
-
result = 0;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
result = -1;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
result = -1;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
result = -1;
|
|
37
|
-
}
|
|
38
|
-
return result;
|
|
39
|
-
}
|
package/es/compressImage.d.ts
DELETED
package/es/compressImage.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { pick } from './pick';
|
|
2
|
-
/**
|
|
3
|
-
* 压缩图片
|
|
4
|
-
*/
|
|
5
|
-
export function compressImage(image) {
|
|
6
|
-
const { width, height } = pick(image, ['width', 'height']);
|
|
7
|
-
const canvas = document.createElement('canvas');
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9
|
-
const ctx = canvas.getContext('2d');
|
|
10
|
-
canvas.width = width;
|
|
11
|
-
canvas.height = height;
|
|
12
|
-
ctx.fillStyle = '#fff';
|
|
13
|
-
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
14
|
-
ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
15
|
-
return canvas;
|
|
16
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 根据字符串hash值生成颜色值
|
|
3
|
-
*/
|
|
4
|
-
export const colorGenByHash = (str) => {
|
|
5
|
-
const lsL = [0.35, 0.5, 0.65];
|
|
6
|
-
const lsS = [0.35, 0.5, 0.65];
|
|
7
|
-
const seed = 131;
|
|
8
|
-
const seed2 = 137;
|
|
9
|
-
let hash = 0;
|
|
10
|
-
// eslint-disable-next-line no-param-reassign
|
|
11
|
-
str += 'x';
|
|
12
|
-
const MAX_SAFE_INTEGER = parseInt((9007199254740991 / seed2).toString(), 10);
|
|
13
|
-
for (let i = 0; i < str.length; i++) {
|
|
14
|
-
if (hash > MAX_SAFE_INTEGER) {
|
|
15
|
-
hash = parseInt((hash / seed2).toString(), 10);
|
|
16
|
-
}
|
|
17
|
-
hash = hash * seed + str.charCodeAt(i);
|
|
18
|
-
}
|
|
19
|
-
let H;
|
|
20
|
-
H = hash % 359;
|
|
21
|
-
hash = parseInt((hash / 360).toString(), 10);
|
|
22
|
-
const S = lsS[hash % lsS.length];
|
|
23
|
-
hash = parseInt((hash / lsS.length).toString(), 10);
|
|
24
|
-
const L = lsL[hash % lsL.length];
|
|
25
|
-
H /= 360;
|
|
26
|
-
const q = L < 0.5 ? L * (1 + S) : L + S - L * S;
|
|
27
|
-
const p = 2 * L - q;
|
|
28
|
-
const RGBArray = [H + 1 / 3, H, H - 1 / 3].map((color) => {
|
|
29
|
-
if (color < 0) {
|
|
30
|
-
// eslint-disable-next-line no-param-reassign
|
|
31
|
-
color++;
|
|
32
|
-
}
|
|
33
|
-
if (color > 1) {
|
|
34
|
-
// eslint-disable-next-line no-param-reassign
|
|
35
|
-
color--;
|
|
36
|
-
}
|
|
37
|
-
if (color < 1 / 6) {
|
|
38
|
-
// eslint-disable-next-line no-param-reassign
|
|
39
|
-
color = p + (q - p) * 6 * color;
|
|
40
|
-
}
|
|
41
|
-
else if (color < 0.5) {
|
|
42
|
-
// eslint-disable-next-line no-param-reassign
|
|
43
|
-
color = q;
|
|
44
|
-
}
|
|
45
|
-
else if (color < 2 / 3) {
|
|
46
|
-
// eslint-disable-next-line no-param-reassign
|
|
47
|
-
color = p + (q - p) * 6 * (2 / 3 - color);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
// eslint-disable-next-line no-param-reassign
|
|
51
|
-
color = p;
|
|
52
|
-
}
|
|
53
|
-
return Math.round(color * 255);
|
|
54
|
-
});
|
|
55
|
-
let hex = '#';
|
|
56
|
-
RGBArray.forEach((value) => {
|
|
57
|
-
if (value < 16) {
|
|
58
|
-
hex += 0;
|
|
59
|
-
}
|
|
60
|
-
hex += value.toString(16);
|
|
61
|
-
});
|
|
62
|
-
return hex;
|
|
63
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 创建一个线性函数
|
|
3
|
-
* 主要用于动画值计算
|
|
4
|
-
* @param x1 坐标轴 x1
|
|
5
|
-
* @param x2 坐标轴 x2
|
|
6
|
-
* @param y1 坐标轴 y1
|
|
7
|
-
* @param y2 坐标轴 y2
|
|
8
|
-
*/
|
|
9
|
-
export function createLinearFunction(x1, x2, y1, y2) {
|
|
10
|
-
return (x) => {
|
|
11
|
-
if (x <= x1) {
|
|
12
|
-
return y1;
|
|
13
|
-
}
|
|
14
|
-
if (x >= x2) {
|
|
15
|
-
return y2;
|
|
16
|
-
}
|
|
17
|
-
const r = (y2 - y1) / (x2 - x1);
|
|
18
|
-
return r * (x - x1) + y1;
|
|
19
|
-
};
|
|
20
|
-
}
|
package/es/createWithLoading.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* loading 生成器
|
|
12
|
-
* const withLoading = createWithLoading(() => showLoading())
|
|
13
|
-
* const fn = withLoading(async () => { // ... })
|
|
14
|
-
* fn() 执行的时候就会执行showLoading
|
|
15
|
-
*/
|
|
16
|
-
export function createWithLoading(showLoading, defaultOptions) {
|
|
17
|
-
return function withLoading(fn, options = defaultOptions) {
|
|
18
|
-
return (...params) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
if (params.length > fn.length) {
|
|
20
|
-
options = params.pop();
|
|
21
|
-
}
|
|
22
|
-
const toast = options ? showLoading(options) : null;
|
|
23
|
-
try {
|
|
24
|
-
return yield fn(...params);
|
|
25
|
-
// eslint-disable-next-line no-useless-catch
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
throw error;
|
|
29
|
-
}
|
|
30
|
-
finally {
|
|
31
|
-
toast === null || toast === void 0 ? void 0 : toast.close();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
}
|
package/es/debounce.d.ts
DELETED
package/es/debounce.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 防抖函数
|
|
3
|
-
* 事件频繁触发,只会执行最后一次
|
|
4
|
-
*/
|
|
5
|
-
export function debounce(fn, ms) {
|
|
6
|
-
let timer = null;
|
|
7
|
-
// eslint-disable-next-line func-names
|
|
8
|
-
return function (...args) {
|
|
9
|
-
clearTimeout(timer);
|
|
10
|
-
timer = setTimeout(() => {
|
|
11
|
-
fn.apply(this, args);
|
|
12
|
-
}, ms);
|
|
13
|
-
};
|
|
14
|
-
}
|
package/es/decode.d.ts
DELETED
package/es/decode.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// weapp jwt-decode
|
|
2
|
-
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
3
|
-
const b64re =
|
|
4
|
-
// eslint-disable-next-line no-useless-escape
|
|
5
|
-
/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
6
|
-
// btoa
|
|
7
|
-
export const btoa = function (string) {
|
|
8
|
-
string = String(string);
|
|
9
|
-
let bitmap, a, b, c, result = '', i = 0,
|
|
10
|
-
// eslint-disable-next-line prefer-const
|
|
11
|
-
rest = string.length % 3;
|
|
12
|
-
for (; i < string.length;) {
|
|
13
|
-
if ((a = string.charCodeAt(i++)) > 255 ||
|
|
14
|
-
(b = string.charCodeAt(i++)) > 255 ||
|
|
15
|
-
(c = string.charCodeAt(i++)) > 255)
|
|
16
|
-
throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");
|
|
17
|
-
bitmap = (a << 16) | (b << 8) | c;
|
|
18
|
-
result +=
|
|
19
|
-
b64.charAt((bitmap >> 18) & 63) +
|
|
20
|
-
b64.charAt((bitmap >> 12) & 63) +
|
|
21
|
-
b64.charAt((bitmap >> 6) & 63) +
|
|
22
|
-
b64.charAt(bitmap & 63);
|
|
23
|
-
}
|
|
24
|
-
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
25
|
-
};
|
|
26
|
-
// atob
|
|
27
|
-
export const atob = function (string) {
|
|
28
|
-
string = String(string).replace(/[\t\n\f\r ]+/g, '');
|
|
29
|
-
if (!b64re.test(string))
|
|
30
|
-
throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
|
|
31
|
-
string += '=='.slice(2 - (string.length & 3));
|
|
32
|
-
let bitmap, result = '', r1, r2, i = 0;
|
|
33
|
-
for (; i < string.length;) {
|
|
34
|
-
bitmap =
|
|
35
|
-
(b64.indexOf(string.charAt(i++)) << 18) |
|
|
36
|
-
(b64.indexOf(string.charAt(i++)) << 12) |
|
|
37
|
-
((r1 = b64.indexOf(string.charAt(i++))) << 6) |
|
|
38
|
-
(r2 = b64.indexOf(string.charAt(i++)));
|
|
39
|
-
result +=
|
|
40
|
-
r1 === 64
|
|
41
|
-
? String.fromCharCode((bitmap >> 16) & 255)
|
|
42
|
-
: r2 === 64
|
|
43
|
-
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
|
|
44
|
-
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
|
|
45
|
-
}
|
|
46
|
-
return result;
|
|
47
|
-
};
|
package/es/downloadFile.d.ts
DELETED
package/es/downloadFile.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 通过 a 标签下载文件
|
|
3
|
-
*/
|
|
4
|
-
export function downloadFile(data, options) {
|
|
5
|
-
const a = document.createElement('a');
|
|
6
|
-
a.href = typeof data === 'string' ? data : URL.createObjectURL(data);
|
|
7
|
-
if (options === null || options === void 0 ? void 0 : options.fileName) {
|
|
8
|
-
a.download = options.fileName;
|
|
9
|
-
}
|
|
10
|
-
a.click();
|
|
11
|
-
}
|
package/es/each.d.ts
DELETED
package/es/each.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function each(data, callback) {
|
|
2
|
-
if (Array.isArray(data)) {
|
|
3
|
-
// eslint-disable-next-line no-plusplus
|
|
4
|
-
for (let index = 0, { length } = data; index < length; index++) {
|
|
5
|
-
callback.call(data[index], data[index], index);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
Object.keys(data).forEach((key) => {
|
|
10
|
-
callback.call(data[key], data[key], key);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
package/es/exitFullscreen.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* 退出全屏
|
|
12
|
-
* 成功则 resolve , 如果不支持退出全屏或退出失败则 rejected
|
|
13
|
-
* [MDN Reference](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/exitFullscreen)
|
|
14
|
-
*/
|
|
15
|
-
export function exitFullscreen() {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const doc = window.document;
|
|
18
|
-
const exit = doc.exitFullscreen ||
|
|
19
|
-
doc.msExitFullscreen ||
|
|
20
|
-
doc.mozCancelFullScreen ||
|
|
21
|
-
doc.webkitExitFullscreen;
|
|
22
|
-
if (exit) {
|
|
23
|
-
return yield exit();
|
|
24
|
-
}
|
|
25
|
-
return Promise.reject();
|
|
26
|
-
});
|
|
27
|
-
}
|
package/es/filterBankCardNo.d.ts
DELETED
package/es/filterBankCardNo.js
DELETED
package/es/filterCRLF.d.ts
DELETED
package/es/filterCRLF.js
DELETED
package/es/filterEmoji.d.ts
DELETED
package/es/filterEmoji.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 过滤emoji
|
|
3
|
-
*/
|
|
4
|
-
export function filterEmoji(val) {
|
|
5
|
-
if (!val) {
|
|
6
|
-
return '';
|
|
7
|
-
}
|
|
8
|
-
const ranges = [
|
|
9
|
-
'\uD83C[\uDF00-\uDFFF]',
|
|
10
|
-
'\uD83D[\uDC00-\uDE4F]',
|
|
11
|
-
'\ud83d[\ude80-\udeff]',
|
|
12
|
-
'[\uD800-\uDBFF]',
|
|
13
|
-
'[\uDC00-\uDFFF]',
|
|
14
|
-
'[^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n]',
|
|
15
|
-
];
|
|
16
|
-
return val.replace(new RegExp(ranges.join('|'), 'g'), '');
|
|
17
|
-
}
|
package/es/filterEmptyValue.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { isEmpty } from './isEmpty';
|
|
2
|
-
import { isEmptyArray } from './isEmptyArray';
|
|
3
|
-
import { isEmptyObject } from './isEmptyObject';
|
|
4
|
-
import { isFunction } from './isFunction';
|
|
5
|
-
import { isObject } from './isObject';
|
|
6
|
-
/**
|
|
7
|
-
* 过滤对象的 undefined null '' 属性,返回一个新对象
|
|
8
|
-
* @param obj 需要过滤的对象
|
|
9
|
-
* @param expand 如果是传的是布尔类型 true, 则还会过滤空数组、空对象的情况
|
|
10
|
-
*/
|
|
11
|
-
export function filterEmptyValue(obj, expand = false) {
|
|
12
|
-
return Object.entries(obj).reduce((res, [key, value]) => {
|
|
13
|
-
if (isFunction(expand) && expand(key, value)) {
|
|
14
|
-
res[key] = value;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
if (!isEmpty(value)) {
|
|
18
|
-
if (expand) {
|
|
19
|
-
if (!isEmptyArray(value) &&
|
|
20
|
-
!(isObject(value) && isEmptyObject(value))) {
|
|
21
|
-
res[key] = value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
res[key] = value;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return res;
|
|
30
|
-
}, {});
|
|
31
|
-
}
|
package/es/filterIdCard.d.ts
DELETED
package/es/filterIdCard.js
DELETED
package/es/filterName.d.ts
DELETED
package/es/filterName.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 过滤姓名
|
|
3
|
-
*/
|
|
4
|
-
export function filterName(val) {
|
|
5
|
-
if (!val) {
|
|
6
|
-
return '';
|
|
7
|
-
}
|
|
8
|
-
const len = val.length;
|
|
9
|
-
if (len === 1) {
|
|
10
|
-
return val;
|
|
11
|
-
}
|
|
12
|
-
if (len === 2) {
|
|
13
|
-
return `${val.substring(0, 1)}*`;
|
|
14
|
-
}
|
|
15
|
-
return `${val.substring(0, 1)}${new Array(len - 1).join('*')}${val.substr(-1)}`;
|
|
16
|
-
}
|
package/es/filterPhone.js
DELETED