@unicom-cloud/utils 0.1.39 → 0.1.40
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/.virtual/_rolldown/runtime.js +1 -1
- package/.vite/manifest.json +559 -587
- package/array/index.js +1 -1
- package/assert/index.js +1 -1
- package/case-name/index.js +1 -1
- package/class-name/index.js +1 -1
- package/clipboard-copy/index.js +1 -1
- package/constant/address.js +1 -1
- package/constant/chineseCharacters.js +1 -1
- package/constant/constellations.js +1 -1
- package/constant/domain.js +1 -1
- package/constant/identity.js +1 -1
- package/constant/index.js +1 -1
- package/constant/isMobile.js +1 -1
- package/constant/keyboardCode.js +1 -1
- package/constant/licensePlate.js +1 -1
- package/constant/name.js +1 -1
- package/constant/platform.js +1 -1
- package/constant/protocol.js +1 -1
- package/constant/string.js +1 -1
- package/constant/ui.js +1 -1
- package/content-disposition/index.js +1 -1
- package/cookie/{src/api.js → api.js} +2 -2
- package/cookie/{src/assign.js → assign.js} +2 -2
- package/cookie/{src/converter.js → converter.js} +2 -2
- package/cookie/index.d.ts +1 -1
- package/cookie/index.js +2 -2
- package/date/convertTime.js +1 -1
- package/date/convertToDuration.js +1 -1
- package/date/index.js +1 -1
- package/decimal/decimal.js +1 -1
- package/decimal/index.js +1 -1
- package/dom-helpers/activeElement.js +1 -1
- package/dom-helpers/addClass.js +1 -1
- package/dom-helpers/addEventListener.js +1 -1
- package/dom-helpers/animate.js +1 -1
- package/dom-helpers/animationFrame.js +1 -1
- package/dom-helpers/attribute.js +1 -1
- package/dom-helpers/camelize.js +1 -1
- package/dom-helpers/camelizeStyle.js +1 -1
- package/dom-helpers/canUseDOM.js +1 -1
- package/dom-helpers/childElements.js +1 -1
- package/dom-helpers/childNodes.js +1 -1
- package/dom-helpers/clear.js +1 -1
- package/dom-helpers/closest.js +1 -1
- package/dom-helpers/collectElements.js +1 -1
- package/dom-helpers/collectSiblings.js +1 -1
- package/dom-helpers/contains.js +1 -1
- package/dom-helpers/css.js +1 -1
- package/dom-helpers/filterEventHandler.js +1 -1
- package/dom-helpers/getComputedStyle.js +1 -1
- package/dom-helpers/getElementCoordinates.js +1 -1
- package/dom-helpers/getScrollAccessor.js +1 -1
- package/dom-helpers/hasClass.js +1 -1
- package/dom-helpers/height.js +1 -1
- package/dom-helpers/hyphenate.js +1 -1
- package/dom-helpers/hyphenateStyle.js +1 -1
- package/dom-helpers/index.js +1 -1
- package/dom-helpers/insertAfter.js +1 -1
- package/dom-helpers/isDocument.js +1 -1
- package/dom-helpers/isInput.js +1 -1
- package/dom-helpers/isTransform.js +1 -1
- package/dom-helpers/isVisible.js +1 -1
- package/dom-helpers/isWindow.js +1 -1
- package/dom-helpers/listen.js +1 -1
- package/dom-helpers/matches.js +1 -1
- package/dom-helpers/nextUntil.js +1 -1
- package/dom-helpers/offset.js +1 -1
- package/dom-helpers/offsetParent.js +1 -1
- package/dom-helpers/ownerDocument.js +1 -1
- package/dom-helpers/ownerWindow.js +1 -1
- package/dom-helpers/parents.js +1 -1
- package/dom-helpers/position.js +1 -1
- package/dom-helpers/prepend.js +1 -1
- package/dom-helpers/querySelectorAll.js +1 -1
- package/dom-helpers/reflow.js +2 -2
- package/dom-helpers/remove.js +1 -1
- package/dom-helpers/removeClass.js +1 -1
- package/dom-helpers/removeEventListener.js +1 -1
- package/dom-helpers/scrollLeft.js +1 -1
- package/dom-helpers/scrollParent.js +1 -1
- package/dom-helpers/scrollTo.js +1 -1
- package/dom-helpers/scrollTop.js +1 -1
- package/dom-helpers/scrollbarSize.js +1 -1
- package/dom-helpers/siblings.js +1 -1
- package/dom-helpers/text.js +1 -1
- package/dom-helpers/toggleClass.js +1 -1
- package/dom-helpers/transitionEnd.js +1 -1
- package/dom-helpers/triggerEvent.js +1 -1
- package/dom-helpers/types.js +1 -1
- package/dom-helpers/width.js +1 -1
- package/emitter/index.d.ts +75 -2
- package/emitter/index.js +68 -3
- package/emoji/emoji.js +1 -1
- package/emoji/emojis.js +1 -1
- package/emoji/index.js +1 -1
- package/escape/index.js +1 -1
- package/file/fileRead.js +1 -1
- package/file/fileToDataURL.js +1 -1
- package/file/index.js +1 -1
- package/file/saveAs.js +1 -1
- package/filesize/LICENSE +26 -0
- package/filesize/constants.js +101 -0
- package/filesize/{src/filesize.d.ts → filesize.d.ts} +8 -7
- package/filesize/filesize.js +50 -0
- package/filesize/{src/helpers.d.ts → helpers.d.ts} +7 -4
- package/filesize/helpers.js +70 -0
- package/filesize/index.d.ts +2 -0
- package/filesize/index.js +4 -0
- package/function/index.js +1 -1
- package/idb/async-iterators.js +1 -1
- package/idb/database-extras.js +1 -1
- package/idb/entry.js +1 -1
- package/idb/index-.js +1 -1
- package/idb/index.js +1 -1
- package/idb/util.js +1 -1
- package/idb/wrap-idb-value.js +1 -1
- package/index.js +1 -1
- package/invariant/index.js +1 -2
- package/is/index.d.ts +1 -0
- package/is/index.js +14 -14
- package/is/lib/isAscii.js +1 -1
- package/is/lib/isBase64.js +1 -1
- package/is/lib/isChinese.js +1 -1
- package/is/lib/isDataURI.js +1 -1
- package/is/lib/isEmail.js +1 -1
- package/is/lib/isFQDN.js +1 -1
- package/is/lib/isFullWidth.js +1 -1
- package/is/lib/isHSL.js +1 -1
- package/is/lib/isHalfWidth.js +1 -1
- package/is/lib/isHash.js +1 -1
- package/is/lib/isHexColor.js +1 -1
- package/is/lib/isIMEI.js +1 -1
- package/is/lib/isIP.js +1 -1
- package/is/lib/isIPRange.js +1 -1
- package/is/lib/isIdentityCard.js +1 -1
- package/is/lib/isJWT.js +1 -1
- package/is/lib/isMACAddress.js +1 -1
- package/is/lib/isMD5.js +1 -1
- package/is/lib/isMimeType.js +1 -1
- package/is/lib/isMobilePhone.js +1 -1
- package/is/lib/isPort.js +1 -1
- package/is/lib/isRgbColor.js +1 -1
- package/is/lib/isSemVer.js +1 -1
- package/is/lib/isSlug.js +1 -1
- package/is/lib/isStrongPassword.js +1 -1
- package/is/lib/isURL.js +1 -1
- package/is/lib/isUUID.js +1 -1
- package/is/lib/isVariableWidth.js +1 -1
- package/lodash/_DataView.js +1 -1
- package/lodash/_Hash.js +1 -1
- package/lodash/_LazyWrapper.js +1 -1
- package/lodash/_ListCache.js +1 -1
- package/lodash/_LodashWrapper.js +1 -1
- package/lodash/_Map.js +1 -1
- package/lodash/_MapCache.js +1 -1
- package/lodash/_Promise.js +1 -1
- package/lodash/_Set.js +1 -1
- package/lodash/_SetCache.js +1 -1
- package/lodash/_Stack.js +1 -1
- package/lodash/_Symbol.js +1 -1
- package/lodash/_Uint8Array.js +1 -1
- package/lodash/_WeakMap.js +1 -1
- package/lodash/_addMapEntry.js +1 -1
- package/lodash/_addSetEntry.js +1 -1
- package/lodash/_apply.js +1 -1
- package/lodash/_arrayAggregator.js +1 -1
- package/lodash/_arrayEach.js +1 -1
- package/lodash/_arrayEachRight.js +1 -1
- package/lodash/_arrayEvery.js +1 -1
- package/lodash/_arrayFilter.js +1 -1
- package/lodash/_arrayIncludes.js +1 -1
- package/lodash/_arrayIncludesWith.js +1 -1
- package/lodash/_arrayLikeKeys.js +1 -1
- package/lodash/_arrayMap.js +1 -1
- package/lodash/_arrayPush.js +1 -1
- package/lodash/_arrayReduce.js +1 -1
- package/lodash/_arrayReduceRight.js +1 -1
- package/lodash/_arraySample.js +1 -1
- package/lodash/_arraySampleSize.js +1 -1
- package/lodash/_arrayShuffle.js +1 -1
- package/lodash/_arraySome.js +1 -1
- package/lodash/_asciiSize.js +1 -1
- package/lodash/_asciiToArray.js +1 -1
- package/lodash/_asciiWords.js +1 -1
- package/lodash/_assignMergeValue.js +1 -1
- package/lodash/_assignValue.js +1 -1
- package/lodash/_assocIndexOf.js +1 -1
- package/lodash/_baseAggregator.js +1 -1
- package/lodash/_baseAssign.js +1 -1
- package/lodash/_baseAssignIn.js +1 -1
- package/lodash/_baseAssignValue.js +1 -1
- package/lodash/_baseAt.js +1 -1
- package/lodash/_baseClamp.js +1 -1
- package/lodash/_baseClone.js +1 -1
- package/lodash/_baseConforms.js +1 -1
- package/lodash/_baseConformsTo.js +1 -1
- package/lodash/_baseCreate.js +1 -1
- package/lodash/_baseDelay.js +1 -1
- package/lodash/_baseDifference.js +1 -1
- package/lodash/_baseEach.js +1 -1
- package/lodash/_baseEachRight.js +1 -1
- package/lodash/_baseEvery.js +1 -1
- package/lodash/_baseExtremum.js +1 -1
- package/lodash/_baseFill.js +1 -1
- package/lodash/_baseFilter.js +1 -1
- package/lodash/_baseFindIndex.js +1 -1
- package/lodash/_baseFindKey.js +1 -1
- package/lodash/_baseFlatten.js +1 -1
- package/lodash/_baseFor.js +1 -1
- package/lodash/_baseForOwn.js +1 -1
- package/lodash/_baseForOwnRight.js +1 -1
- package/lodash/_baseForRight.js +1 -1
- package/lodash/_baseFunctions.js +1 -1
- package/lodash/_baseGet.js +1 -1
- package/lodash/_baseGetAllKeys.js +1 -1
- package/lodash/_baseGetTag.js +1 -1
- package/lodash/_baseGt.js +1 -1
- package/lodash/_baseHas.js +1 -1
- package/lodash/_baseHasIn.js +1 -1
- package/lodash/_baseInRange.js +1 -1
- package/lodash/_baseIndexOf.js +1 -1
- package/lodash/_baseIndexOfWith.js +1 -1
- package/lodash/_baseIntersection.js +1 -1
- package/lodash/_baseInverter.js +1 -1
- package/lodash/_baseInvoke.js +1 -1
- package/lodash/_baseIsArguments.js +1 -1
- package/lodash/_baseIsArrayBuffer.js +1 -1
- package/lodash/_baseIsDate.js +1 -1
- package/lodash/_baseIsEqual.js +1 -1
- package/lodash/_baseIsEqualDeep.js +1 -1
- package/lodash/_baseIsMap.js +1 -1
- package/lodash/_baseIsMatch.js +1 -1
- package/lodash/_baseIsNaN.js +1 -1
- package/lodash/_baseIsNative.js +1 -1
- package/lodash/_baseIsRegExp.js +1 -1
- package/lodash/_baseIsSet.js +1 -1
- package/lodash/_baseIsTypedArray.js +1 -1
- package/lodash/_baseIteratee.js +1 -1
- package/lodash/_baseKeys.js +1 -1
- package/lodash/_baseKeysIn.js +1 -1
- package/lodash/_baseLodash.js +1 -1
- package/lodash/_baseLt.js +1 -1
- package/lodash/_baseMap.js +1 -1
- package/lodash/_baseMatches.js +1 -1
- package/lodash/_baseMatchesProperty.js +1 -1
- package/lodash/_baseMean.js +1 -1
- package/lodash/_baseMerge.js +1 -1
- package/lodash/_baseMergeDeep.js +1 -1
- package/lodash/_baseNth.js +1 -1
- package/lodash/_baseOrderBy.js +1 -1
- package/lodash/_basePick.js +1 -1
- package/lodash/_basePickBy.js +1 -1
- package/lodash/_baseProperty.js +1 -1
- package/lodash/_basePropertyDeep.js +1 -1
- package/lodash/_basePropertyOf.js +1 -1
- package/lodash/_basePullAll.js +1 -1
- package/lodash/_basePullAt.js +1 -1
- package/lodash/_baseRandom.js +1 -1
- package/lodash/_baseRange.js +1 -1
- package/lodash/_baseReduce.js +1 -1
- package/lodash/_baseRepeat.js +1 -1
- package/lodash/_baseRest.js +1 -1
- package/lodash/_baseSample.js +1 -1
- package/lodash/_baseSampleSize.js +1 -1
- package/lodash/_baseSet.js +1 -1
- package/lodash/_baseSetData.js +1 -1
- package/lodash/_baseSetToString.js +1 -1
- package/lodash/_baseShuffle.js +1 -1
- package/lodash/_baseSlice.js +1 -1
- package/lodash/_baseSome.js +1 -1
- package/lodash/_baseSortBy.js +1 -1
- package/lodash/_baseSortedIndex.js +1 -1
- package/lodash/_baseSortedIndexBy.js +1 -1
- package/lodash/_baseSortedUniq.js +1 -1
- package/lodash/_baseSum.js +1 -1
- package/lodash/_baseTimes.js +1 -1
- package/lodash/_baseToNumber.js +1 -1
- package/lodash/_baseToPairs.js +1 -1
- package/lodash/_baseToString.js +1 -1
- package/lodash/_baseTrim.js +1 -1
- package/lodash/_baseUnary.js +1 -1
- package/lodash/_baseUniq.js +1 -1
- package/lodash/_baseUnset.js +6 -12
- package/lodash/_baseUpdate.js +1 -1
- package/lodash/_baseValues.js +1 -1
- package/lodash/_baseWhile.js +1 -1
- package/lodash/_baseWrapperValue.js +1 -1
- package/lodash/_baseXor.js +1 -1
- package/lodash/_baseZipObject.js +1 -1
- package/lodash/_cacheHas.js +1 -1
- package/lodash/_castArrayLikeObject.js +1 -1
- package/lodash/_castFunction.js +1 -1
- package/lodash/_castPath.js +1 -1
- package/lodash/_castRest.js +1 -1
- package/lodash/_castSlice.js +1 -1
- package/lodash/_charsEndIndex.js +1 -1
- package/lodash/_charsStartIndex.js +1 -1
- package/lodash/_cloneArrayBuffer.js +1 -1
- package/lodash/_cloneBuffer.js +1 -1
- package/lodash/_cloneDataView.js +1 -1
- package/lodash/_cloneMap.js +1 -1
- package/lodash/_cloneRegExp.js +1 -1
- package/lodash/_cloneSet.js +1 -1
- package/lodash/_cloneSymbol.js +1 -1
- package/lodash/_cloneTypedArray.js +1 -1
- package/lodash/_compareAscending.js +1 -1
- package/lodash/_compareMultiple.js +1 -1
- package/lodash/_composeArgs.js +1 -1
- package/lodash/_composeArgsRight.js +1 -1
- package/lodash/_copyArray.js +1 -1
- package/lodash/_copyObject.js +1 -1
- package/lodash/_copySymbols.js +1 -1
- package/lodash/_copySymbolsIn.js +1 -1
- package/lodash/_coreJsData.js +1 -1
- package/lodash/_countHolders.js +1 -1
- package/lodash/_createAggregator.js +1 -1
- package/lodash/_createAssigner.js +1 -1
- package/lodash/_createBaseEach.js +1 -1
- package/lodash/_createBaseFor.js +1 -1
- package/lodash/_createBind.js +1 -1
- package/lodash/_createCaseFirst.js +1 -1
- package/lodash/_createCompounder.js +1 -1
- package/lodash/_createCtor.js +1 -1
- package/lodash/_createCurry.js +1 -1
- package/lodash/_createFind.js +1 -1
- package/lodash/_createFlow.js +1 -1
- package/lodash/_createHybrid.js +1 -1
- package/lodash/_createInverter.js +1 -1
- package/lodash/_createMathOperation.js +1 -1
- package/lodash/_createOver.js +1 -1
- package/lodash/_createPadding.js +1 -1
- package/lodash/_createPartial.js +1 -1
- package/lodash/_createRange.js +1 -1
- package/lodash/_createRecurry.js +1 -1
- package/lodash/_createRelationalOperation.js +1 -1
- package/lodash/_createRound.js +1 -1
- package/lodash/_createSet.js +1 -1
- package/lodash/_createToPairs.js +1 -1
- package/lodash/_createWrap.js +1 -1
- package/lodash/_customDefaultsAssignIn.js +1 -1
- package/lodash/_customDefaultsMerge.js +1 -1
- package/lodash/_customOmitClone.js +1 -1
- package/lodash/_deburrLetter.js +1 -1
- package/lodash/_defineProperty.js +1 -1
- package/lodash/_equalArrays.js +1 -1
- package/lodash/_equalByTag.js +1 -1
- package/lodash/_equalObjects.js +1 -1
- package/lodash/_escapeHtmlChar.js +1 -1
- package/lodash/_escapeStringChar.js +1 -1
- package/lodash/_flatRest.js +1 -1
- package/lodash/_freeGlobal.js +1 -1
- package/lodash/_getAllKeys.js +1 -1
- package/lodash/_getAllKeysIn.js +1 -1
- package/lodash/_getData.js +1 -1
- package/lodash/_getFuncName.js +1 -1
- package/lodash/_getHolder.js +1 -1
- package/lodash/_getMapData.js +1 -1
- package/lodash/_getMatchData.js +1 -1
- package/lodash/_getNative.js +1 -1
- package/lodash/_getPrototype.js +1 -1
- package/lodash/_getRawTag.js +1 -1
- package/lodash/_getSymbols.js +1 -1
- package/lodash/_getSymbolsIn.js +1 -1
- package/lodash/_getTag.js +1 -1
- package/lodash/_getValue.js +1 -1
- package/lodash/_getView.js +1 -1
- package/lodash/_getWrapDetails.js +1 -1
- package/lodash/_hasPath.js +1 -1
- package/lodash/_hasUnicode.js +1 -1
- package/lodash/_hasUnicodeWord.js +1 -1
- package/lodash/_hashClear.js +1 -1
- package/lodash/_hashDelete.js +1 -1
- package/lodash/_hashGet.js +1 -1
- package/lodash/_hashHas.js +1 -1
- package/lodash/_hashSet.js +1 -1
- package/lodash/_initCloneArray.js +1 -1
- package/lodash/_initCloneByTag.js +1 -1
- package/lodash/_initCloneObject.js +1 -1
- package/lodash/_insertWrapDetails.js +1 -1
- package/lodash/_isFlattenable.js +1 -1
- package/lodash/_isIndex.js +1 -1
- package/lodash/_isIterateeCall.js +1 -1
- package/lodash/_isKey.js +1 -1
- package/lodash/_isKeyable.js +1 -1
- package/lodash/_isLaziable.js +1 -1
- package/lodash/_isMaskable.js +1 -1
- package/lodash/_isMasked.js +1 -1
- package/lodash/_isPrototype.js +1 -1
- package/lodash/_isStrictComparable.js +1 -1
- package/lodash/_iteratorToArray.js +1 -1
- package/lodash/_lazyClone.js +1 -1
- package/lodash/_lazyReverse.js +1 -1
- package/lodash/_lazyValue.js +1 -1
- package/lodash/_listCacheClear.js +1 -1
- package/lodash/_listCacheDelete.js +1 -1
- package/lodash/_listCacheGet.js +1 -1
- package/lodash/_listCacheHas.js +1 -1
- package/lodash/_listCacheSet.js +1 -1
- package/lodash/_mapCacheClear.js +1 -1
- package/lodash/_mapCacheDelete.js +1 -1
- package/lodash/_mapCacheGet.js +1 -1
- package/lodash/_mapCacheHas.js +1 -1
- package/lodash/_mapCacheSet.js +1 -1
- package/lodash/_mapToArray.js +1 -1
- package/lodash/_matchesStrictComparable.js +1 -1
- package/lodash/_memoizeCapped.js +1 -1
- package/lodash/_mergeData.js +1 -1
- package/lodash/_metaMap.js +1 -1
- package/lodash/_nativeCreate.js +1 -1
- package/lodash/_nativeKeys.js +1 -1
- package/lodash/_nativeKeysIn.js +1 -1
- package/lodash/_nodeUtil.js +1 -1
- package/lodash/_objectToString.js +1 -1
- package/lodash/_overArg.js +1 -1
- package/lodash/_overRest.js +1 -1
- package/lodash/_parent.js +1 -1
- package/lodash/_reEscape.js +1 -1
- package/lodash/_reEvaluate.js +1 -1
- package/lodash/_reInterpolate.js +1 -1
- package/lodash/_realNames.js +1 -1
- package/lodash/_reorder.js +1 -1
- package/lodash/_replaceHolders.js +1 -1
- package/lodash/_root.js +1 -1
- package/lodash/_safeGet.js +1 -1
- package/lodash/_setCacheAdd.js +1 -1
- package/lodash/_setCacheHas.d.ts +2 -2
- package/lodash/_setCacheHas.js +1 -1
- package/lodash/_setData.js +1 -1
- package/lodash/_setToArray.js +1 -1
- package/lodash/_setToPairs.js +1 -1
- package/lodash/_setToString.js +1 -1
- package/lodash/_setWrapToString.js +1 -1
- package/lodash/_shortOut.js +1 -1
- package/lodash/_shuffleSelf.js +1 -1
- package/lodash/_stackClear.js +1 -1
- package/lodash/_stackDelete.js +1 -1
- package/lodash/_stackGet.js +1 -1
- package/lodash/_stackHas.js +1 -1
- package/lodash/_stackSet.js +1 -1
- package/lodash/_strictIndexOf.js +1 -1
- package/lodash/_strictLastIndexOf.js +1 -1
- package/lodash/_stringSize.js +1 -1
- package/lodash/_stringToArray.js +1 -1
- package/lodash/_stringToPath.js +1 -1
- package/lodash/_toKey.js +1 -1
- package/lodash/_toSource.js +1 -1
- package/lodash/_trimmedEndIndex.js +1 -1
- package/lodash/_unescapeHtmlChar.js +1 -1
- package/lodash/_unicodeSize.js +1 -1
- package/lodash/_unicodeToArray.js +1 -1
- package/lodash/_unicodeWords.js +1 -1
- package/lodash/_updateWrapDetails.js +1 -1
- package/lodash/_wrapperClone.js +1 -1
- package/lodash/add.js +1 -1
- package/lodash/after.js +1 -1
- package/lodash/array.default.js +1 -1
- package/lodash/array.js +1 -1
- package/lodash/ary.js +1 -1
- package/lodash/assign.js +1 -1
- package/lodash/assignIn.js +1 -1
- package/lodash/assignInWith.js +1 -1
- package/lodash/assignWith.js +1 -1
- package/lodash/at.js +1 -1
- package/lodash/attempt.js +1 -1
- package/lodash/before.js +1 -1
- package/lodash/bind.js +1 -1
- package/lodash/bindAll.js +1 -1
- package/lodash/bindKey.js +1 -1
- package/lodash/camelCase.js +1 -1
- package/lodash/capitalize.js +1 -1
- package/lodash/castArray.js +1 -1
- package/lodash/ceil.js +1 -1
- package/lodash/chain.js +1 -1
- package/lodash/chunk.js +1 -1
- package/lodash/clamp.js +1 -1
- package/lodash/clone.js +1 -1
- package/lodash/cloneDeep.js +1 -1
- package/lodash/cloneDeepWith.js +1 -1
- package/lodash/cloneWith.js +1 -1
- package/lodash/collection.default.js +1 -1
- package/lodash/collection.js +1 -1
- package/lodash/commit.js +1 -1
- package/lodash/compact.d.ts +1 -1
- package/lodash/compact.js +1 -1
- package/lodash/concat.js +1 -1
- package/lodash/cond.js +1 -1
- package/lodash/conforms.js +1 -1
- package/lodash/conformsTo.js +1 -1
- package/lodash/constant.js +1 -1
- package/lodash/countBy.js +1 -1
- package/lodash/create.js +1 -1
- package/lodash/curry.js +1 -1
- package/lodash/curryRight.js +1 -1
- package/lodash/date.default.js +1 -1
- package/lodash/date.js +1 -1
- package/lodash/debounce.js +1 -1
- package/lodash/deburr.js +1 -1
- package/lodash/defaultTo.js +1 -1
- package/lodash/defaults.js +1 -1
- package/lodash/defaultsDeep.js +1 -1
- package/lodash/defer.js +1 -1
- package/lodash/delay.js +1 -1
- package/lodash/difference.js +1 -1
- package/lodash/differenceBy.js +1 -1
- package/lodash/differenceWith.js +1 -1
- package/lodash/divide.js +1 -1
- package/lodash/drop.js +1 -1
- package/lodash/dropRight.js +1 -1
- package/lodash/dropRightWhile.js +1 -1
- package/lodash/dropWhile.js +1 -1
- package/lodash/each.js +1 -1
- package/lodash/eachRight.js +1 -1
- package/lodash/endsWith.js +1 -1
- package/lodash/entries.js +1 -1
- package/lodash/entriesIn.js +1 -1
- package/lodash/eq.js +1 -1
- package/lodash/escape.js +1 -1
- package/lodash/escapeRegExp.js +1 -1
- package/lodash/every.js +1 -1
- package/lodash/extend.js +1 -1
- package/lodash/extendWith.js +1 -1
- package/lodash/fill.js +1 -1
- package/lodash/filter.js +1 -1
- package/lodash/find.js +1 -1
- package/lodash/findIndex.js +1 -1
- package/lodash/findKey.js +1 -1
- package/lodash/findLast.js +1 -1
- package/lodash/findLastIndex.js +1 -1
- package/lodash/findLastKey.js +1 -1
- package/lodash/first.js +1 -1
- package/lodash/flatMap.js +1 -1
- package/lodash/flatMapDeep.js +1 -1
- package/lodash/flatMapDepth.js +1 -1
- package/lodash/flatten.js +1 -1
- package/lodash/flattenDeep.js +1 -1
- package/lodash/flattenDepth.js +1 -1
- package/lodash/flip.js +1 -1
- package/lodash/floor.js +1 -1
- package/lodash/flow.js +1 -1
- package/lodash/flowRight.js +1 -1
- package/lodash/forEach.js +1 -1
- package/lodash/forEachRight.js +1 -1
- package/lodash/forIn.js +1 -1
- package/lodash/forInRight.js +1 -1
- package/lodash/forOwn.js +1 -1
- package/lodash/forOwnRight.js +1 -1
- package/lodash/fromPairs.js +8 -7
- package/lodash/function.default.js +1 -1
- package/lodash/function.js +1 -1
- package/lodash/functions.js +1 -1
- package/lodash/functionsIn.js +1 -1
- package/lodash/get.js +1 -1
- package/lodash/groupBy.js +1 -1
- package/lodash/gt.js +1 -1
- package/lodash/gte.js +1 -1
- package/lodash/has.js +1 -1
- package/lodash/hasIn.js +1 -1
- package/lodash/head.js +1 -1
- package/lodash/identity.js +1 -1
- package/lodash/inRange.js +1 -1
- package/lodash/includes.js +1 -1
- package/lodash/index.js +78 -78
- package/lodash/indexOf.js +1 -1
- package/lodash/initial.js +1 -1
- package/lodash/intersection.js +1 -1
- package/lodash/intersectionBy.js +1 -1
- package/lodash/intersectionWith.js +1 -1
- package/lodash/invert.js +1 -1
- package/lodash/invertBy.js +1 -1
- package/lodash/invoke.js +1 -1
- package/lodash/invokeMap.js +1 -1
- package/lodash/isArguments.js +1 -1
- package/lodash/isArray.js +1 -1
- package/lodash/isArrayBuffer.js +1 -1
- package/lodash/isArrayLike.js +1 -1
- package/lodash/isArrayLikeObject.js +1 -1
- package/lodash/isBoolean.js +1 -1
- package/lodash/isBuffer.js +1 -1
- package/lodash/isDate.js +1 -1
- package/lodash/isElement.js +1 -1
- package/lodash/isEmpty.js +1 -1
- package/lodash/isEqual.js +1 -1
- package/lodash/isEqualWith.js +1 -1
- package/lodash/isError.js +1 -1
- package/lodash/isFinite.js +1 -1
- package/lodash/isFunction.js +1 -1
- package/lodash/isInteger.js +1 -1
- package/lodash/isLength.js +1 -1
- package/lodash/isMap.js +1 -1
- package/lodash/isMatch.js +1 -1
- package/lodash/isMatchWith.js +1 -1
- package/lodash/isNaN.js +1 -1
- package/lodash/isNative.js +1 -1
- package/lodash/isNil.js +1 -1
- package/lodash/isNull.js +1 -1
- package/lodash/isNumber.js +1 -1
- package/lodash/isObject.js +1 -1
- package/lodash/isObjectLike.js +1 -1
- package/lodash/isPlainObject.js +1 -1
- package/lodash/isPromise.d.ts +1 -1
- package/lodash/isPromise.js +1 -1
- package/lodash/isRegExp.js +1 -1
- package/lodash/isSafeInteger.js +1 -1
- package/lodash/isSet.js +1 -1
- package/lodash/isString.js +1 -1
- package/lodash/isSymbol.js +1 -1
- package/lodash/isTypedArray.js +1 -1
- package/lodash/isUndefined.js +1 -1
- package/lodash/isWeakMap.js +1 -1
- package/lodash/isWeakSet.js +1 -1
- package/lodash/iteratee.js +1 -1
- package/lodash/join.js +1 -1
- package/lodash/kebabCase.js +1 -1
- package/lodash/keyBy.js +1 -1
- package/lodash/keys.js +1 -1
- package/lodash/keysIn.js +1 -1
- package/lodash/lang.default.js +1 -1
- package/lodash/lang.js +1 -1
- package/lodash/last.js +1 -1
- package/lodash/lastIndexOf.js +1 -1
- package/lodash/lodash.d.ts +5 -5
- package/lodash/lodash.default.js +11 -11
- package/lodash/lodash.js +79 -79
- package/lodash/lowerCase.js +1 -1
- package/lodash/lowerFirst.js +1 -1
- package/lodash/lt.js +1 -1
- package/lodash/lte.js +1 -1
- package/lodash/map.js +1 -1
- package/lodash/mapKeys.js +1 -1
- package/lodash/mapValues.js +1 -1
- package/lodash/matches.js +1 -1
- package/lodash/matchesProperty.js +1 -1
- package/lodash/math.default.js +1 -1
- package/lodash/math.js +1 -1
- package/lodash/max.js +1 -1
- package/lodash/maxBy.js +1 -1
- package/lodash/mean.js +1 -1
- package/lodash/meanBy.js +1 -1
- package/lodash/memoize.js +1 -1
- package/lodash/merge.js +1 -1
- package/lodash/mergeWith.js +1 -1
- package/lodash/method.js +1 -1
- package/lodash/methodOf.js +1 -1
- package/lodash/min.js +1 -1
- package/lodash/minBy.js +1 -1
- package/lodash/mixin.js +1 -1
- package/lodash/multiply.js +1 -1
- package/lodash/negate.js +1 -1
- package/lodash/next.js +1 -1
- package/lodash/noop.js +1 -1
- package/lodash/now.js +1 -1
- package/lodash/nth.js +1 -1
- package/lodash/nthArg.js +1 -1
- package/lodash/number.default.js +1 -1
- package/lodash/number.js +1 -1
- package/lodash/object.default.js +1 -1
- package/lodash/object.js +1 -1
- package/lodash/omit.js +1 -1
- package/lodash/omitBy.js +1 -1
- package/lodash/once.js +1 -1
- package/lodash/orderBy.js +1 -1
- package/lodash/over.js +1 -1
- package/lodash/overArgs.js +1 -1
- package/lodash/overEvery.js +1 -1
- package/lodash/overSome.js +1 -1
- package/lodash/pad.js +1 -1
- package/lodash/padEnd.js +1 -1
- package/lodash/padStart.js +1 -1
- package/lodash/parseInt.js +1 -1
- package/lodash/partial.js +1 -1
- package/lodash/partialRight.js +1 -1
- package/lodash/partition.js +1 -1
- package/lodash/pick.js +1 -1
- package/lodash/pickBy.js +1 -1
- package/lodash/plant.js +1 -1
- package/lodash/property.js +1 -1
- package/lodash/propertyOf.js +1 -1
- package/lodash/pull.js +1 -1
- package/lodash/pullAll.js +1 -1
- package/lodash/pullAllBy.js +1 -1
- package/lodash/pullAllWith.js +1 -1
- package/lodash/pullAt.js +1 -1
- package/lodash/random.d.ts +9 -0
- package/lodash/random.js +1 -1
- package/lodash/range.js +1 -1
- package/lodash/rangeRight.js +1 -1
- package/lodash/rearg.js +1 -1
- package/lodash/reduce.js +1 -1
- package/lodash/reduceRight.js +1 -1
- package/lodash/reject.js +1 -1
- package/lodash/remove.js +1 -1
- package/lodash/repeat.js +1 -1
- package/lodash/replace.js +1 -1
- package/lodash/rest.js +1 -1
- package/lodash/result.js +1 -1
- package/lodash/reverse.js +1 -1
- package/lodash/round.js +1 -1
- package/lodash/sample.js +1 -1
- package/lodash/sampleSize.js +1 -1
- package/lodash/seq.default.js +21 -21
- package/lodash/seq.js +11 -11
- package/lodash/set.js +1 -1
- package/lodash/setWith.js +1 -1
- package/lodash/shuffle.js +1 -1
- package/lodash/size.js +1 -1
- package/lodash/slice.js +1 -1
- package/lodash/snakeCase.js +1 -1
- package/lodash/some.js +1 -1
- package/lodash/sortBy.js +1 -1
- package/lodash/sortedIndex.js +1 -1
- package/lodash/sortedIndexBy.js +1 -1
- package/lodash/sortedIndexOf.js +1 -1
- package/lodash/sortedLastIndex.js +1 -1
- package/lodash/sortedLastIndexBy.js +1 -1
- package/lodash/sortedLastIndexOf.js +1 -1
- package/lodash/sortedUniq.js +1 -1
- package/lodash/sortedUniqBy.js +1 -1
- package/lodash/split.js +1 -1
- package/lodash/spread.js +1 -1
- package/lodash/startCase.js +1 -1
- package/lodash/startsWith.js +1 -1
- package/lodash/string.default.js +1 -1
- package/lodash/string.js +1 -1
- package/lodash/stubArray.js +1 -1
- package/lodash/stubFalse.js +1 -1
- package/lodash/stubObject.js +1 -1
- package/lodash/stubString.js +1 -1
- package/lodash/stubTrue.js +1 -1
- package/lodash/subtract.js +1 -1
- package/lodash/sum.js +1 -1
- package/lodash/sumBy.js +1 -1
- package/lodash/tail.js +1 -1
- package/lodash/take.js +1 -1
- package/lodash/takeRight.js +1 -1
- package/lodash/takeRightWhile.js +1 -1
- package/lodash/takeWhile.js +1 -1
- package/lodash/tap.js +1 -1
- package/lodash/template.d.ts +4 -0
- package/lodash/template.js +34 -29
- package/lodash/templateSettings.d.ts +4 -0
- package/lodash/templateSettings.js +1 -1
- package/lodash/throttle.js +1 -1
- package/lodash/thru.js +1 -1
- package/lodash/times.js +1 -1
- package/lodash/toArray.js +1 -1
- package/lodash/toFinite.js +1 -1
- package/lodash/toInteger.js +1 -1
- package/lodash/toIterator.js +1 -1
- package/lodash/toJSON.js +1 -1
- package/lodash/toLength.js +1 -1
- package/lodash/toLower.js +1 -1
- package/lodash/toNumber.js +1 -1
- package/lodash/toPairs.js +1 -1
- package/lodash/toPairsIn.js +1 -1
- package/lodash/toPath.js +1 -1
- package/lodash/toPlainObject.js +1 -1
- package/lodash/toSafeInteger.js +1 -1
- package/lodash/toString.js +1 -1
- package/lodash/toUpper.js +1 -1
- package/lodash/transform.js +1 -1
- package/lodash/trim.js +1 -1
- package/lodash/trimEnd.js +1 -1
- package/lodash/trimStart.js +1 -1
- package/lodash/truncate.js +1 -1
- package/lodash/unary.js +1 -1
- package/lodash/unescape.js +1 -1
- package/lodash/union.js +1 -1
- package/lodash/unionBy.js +1 -1
- package/lodash/unionWith.js +1 -1
- package/lodash/uniq.js +1 -1
- package/lodash/uniqBy.js +1 -1
- package/lodash/uniqWith.js +1 -1
- package/lodash/uniqueId.js +1 -1
- package/lodash/unset.js +1 -1
- package/lodash/unzip.js +1 -1
- package/lodash/unzipWith.js +1 -1
- package/lodash/update.js +1 -1
- package/lodash/updateWith.js +1 -1
- package/lodash/upperCase.js +1 -1
- package/lodash/upperFirst.js +1 -1
- package/lodash/util.default.js +11 -11
- package/lodash/util.js +7 -7
- package/lodash/value.js +1 -1
- package/lodash/valueOf.js +1 -1
- package/lodash/values.js +1 -1
- package/lodash/valuesIn.js +1 -1
- package/lodash/without.js +1 -1
- package/lodash/words.js +1 -1
- package/lodash/wrap.js +1 -1
- package/lodash/wrapperAt.js +1 -1
- package/lodash/wrapperChain.js +1 -1
- package/lodash/wrapperLodash.js +1 -1
- package/lodash/wrapperReverse.js +1 -1
- package/lodash/wrapperValue.js +1 -1
- package/lodash/xor.js +1 -1
- package/lodash/xorBy.js +1 -1
- package/lodash/xorWith.js +1 -1
- package/lodash/zip.js +1 -1
- package/lodash/zipObject.js +1 -1
- package/lodash/zipObjectDeep.js +1 -1
- package/lodash/zipWith.js +1 -1
- package/math/index.js +1 -1
- package/md5/index.js +1 -1
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -1
- package/normalize-wheel/ExecutionEnvironment.js +1 -1
- package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
- package/normalize-wheel/index.js +1 -1
- package/normalize-wheel/isEventSupported.js +1 -1
- package/number-to-chinese/index.js +1 -1
- package/nzh/cn.js +1 -1
- package/nzh/hk.js +1 -1
- package/nzh/index.js +1 -1
- package/nzh/nzh.js +1 -1
- package/nzh/src/autoGet.js +1 -1
- package/nzh/src/index.js +1 -1
- package/nzh/src/langs/cn_b.js +1 -1
- package/nzh/src/langs/cn_s.js +1 -1
- package/nzh/src/langs/hk_b.js +1 -1
- package/nzh/src/langs/hk_s.js +1 -1
- package/nzh/src/utils.js +1 -1
- package/object/index.js +1 -1
- package/package.json +1 -1
- package/pinyin/{src/core.js → core.js} +2 -2
- package/pinyin/index.js +2 -3
- package/pinyin/simplified.d.ts +4 -1
- package/pinyin/simplified.js +7 -3
- package/pinyin/{src/simplified_dict.js → simplified_dict.js} +4 -2
- package/pinyin/traditional.d.ts +4 -1
- package/pinyin/traditional.js +7 -3
- package/pinyin/{src/traditional_dict.js → traditional_dict.js} +4 -2
- package/query-string/base.d.ts +7 -7
- package/query-string/base.js +2 -2
- package/query-string/index.d.ts +1 -1
- package/query-string/index.js +2 -2
- package/query-string/splitOnFirst.js +2 -2
- package/random/address.js +1 -1
- package/random/constellation.js +1 -1
- package/random/image.js +1 -1
- package/random/index.js +1 -1
- package/random/licensePlate.js +1 -1
- package/random/name.js +1 -1
- package/random/number.js +1 -1
- package/random/text.js +1 -1
- package/random/time.js +1 -1
- package/random/web.js +1 -1
- package/sanitize-url/index.js +1 -1
- package/screenfull/index.js +1 -1
- package/sleep/index.js +1 -1
- package/snapdom/{src/api → api}/preCache.js +2 -2
- package/snapdom/{src/api → api}/snapdom.js +2 -2
- package/snapdom/{src/core → core}/cache.d.ts +1 -0
- package/snapdom/{src/core → core}/cache.js +3 -2
- package/snapdom/core/capture.js +171 -0
- package/snapdom/{src/core → core}/clone.js +76 -6
- package/snapdom/{src/core → core}/context.js +2 -2
- package/snapdom/{src/core → core}/plugins.js +2 -2
- package/snapdom/{src/core → core}/prepare.js +44 -30
- package/snapdom/exporters/download.js +53 -0
- package/snapdom/{src/exporters → exporters}/toBlob.js +2 -2
- package/snapdom/{src/exporters → exporters}/toCanvas.js +2 -2
- package/snapdom/{src/exporters → exporters}/toImg.js +2 -2
- package/snapdom/index.browser.js +7 -0
- package/snapdom/index.d.ts +2 -1
- package/snapdom/index.js +3 -4
- package/snapdom/{src/modules → modules}/CSSVar.js +15 -9
- package/snapdom/{src/modules → modules}/background.js +3 -3
- package/snapdom/{src/modules → modules}/changeCSS.js +2 -2
- package/snapdom/{src/modules → modules}/counter.js +26 -7
- package/snapdom/{src/modules → modules}/fonts.js +101 -92
- package/snapdom/{src/modules → modules}/iconFonts.js +2 -2
- package/snapdom/{src/modules → modules}/images.js +2 -2
- package/snapdom/{src/modules → modules}/lineClamp.js +2 -2
- package/snapdom/{src/modules → modules}/pseudo.js +4 -4
- package/snapdom/{src/modules → modules}/rasterize.js +2 -2
- package/snapdom/{src/modules → modules}/snapFetch.js +2 -2
- package/snapdom/{src/modules → modules}/styles.js +50 -41
- package/snapdom/{src/modules → modules}/svgDefs.js +2 -2
- package/snapdom/{src/utils → utils}/browser.js +2 -2
- package/snapdom/{src/utils → utils}/capture.helpers.js +2 -2
- package/snapdom/{src/utils → utils}/clone.helpers.js +21 -17
- package/snapdom/{src/utils → utils}/css.js +4 -3
- package/snapdom/{src/utils → utils}/debug.js +2 -2
- package/snapdom/{src/utils → utils}/helpers.js +2 -2
- package/snapdom/{src/utils → utils}/image.js +2 -2
- package/snapdom/{src/utils → utils}/index.js +1 -1
- package/snapdom/utils/prepare.helpers.d.ts +18 -0
- package/snapdom/utils/prepare.helpers.js +35 -0
- package/snapdom/{src/utils → utils}/transforms.helpers.js +44 -22
- package/string/chars.js +1 -1
- package/string/index.js +1 -1
- package/tinycolor/{src/conversion.js → conversion.js} +2 -2
- package/tinycolor/{src/css-color-names.js → css-color-names.js} +2 -2
- package/tinycolor/{src/format-input.js → format-input.js} +2 -2
- package/tinycolor/{src/from-ratio.js → from-ratio.js} +3 -3
- package/tinycolor/index.d.ts +216 -2
- package/tinycolor/index.js +271 -12
- package/tinycolor/interfaces.js +2 -0
- package/tinycolor/public_api.js +12 -0
- package/tinycolor/{src/random.js → random.js} +3 -3
- package/tinycolor/{src/readability.js → readability.js} +2 -2
- package/tinycolor/{src/to-ms-filter.js → to-ms-filter.js} +2 -2
- package/tinycolor/umd_api.js +25 -0
- package/tinycolor/{src/utils.js → utils.js} +2 -2
- package/tree/index.d.ts +7 -7
- package/tree/index.js +3 -3
- package/tree/{search/index.js → searchTree.js} +3 -3
- package/tween/{src/easing.js → easing.js} +4 -4
- package/tween/index.d.ts +4 -1
- package/tween/index.js +7 -5
- package/tween/{src/tween.js → tween.js} +3 -3
- package/ui-color/compareColorByRange.d.ts +1 -1
- package/ui-color/compareColorByRange.js +2 -2
- package/ui-color/index.d.ts +145 -195
- package/ui-color/index.js +57 -52
- package/url-toolkit/index.d.ts +18 -2
- package/url-toolkit/index.js +61 -3
- package/validate/index.d.ts +37 -3
- package/validate/index.js +79 -12
- package/validate/interface.js +2 -0
- package/validate/{src/locale → locale}/en-US.js +2 -2
- package/validate/{src/locale → locale}/index.js +2 -2
- package/validate/{src/locale → locale}/zh-CN.js +2 -2
- package/validate/{src/rules → rules}/array.js +3 -3
- package/validate/{src/rules → rules}/base.js +3 -3
- package/validate/{src/rules → rules}/boolean.js +3 -3
- package/validate/{src/rules → rules}/custom.js +2 -2
- package/validate/{src/rules → rules}/number.js +3 -3
- package/validate/{src/rules → rules}/object.js +3 -3
- package/validate/{src/rules → rules}/string.js +3 -3
- package/validate/{src/rules → rules}/type.js +15 -15
- package/version/index.js +1 -1
- package/xlsx/crc32.js +1 -1
- package/xlsx/index.js +1 -1
- package/xlsx/xlsx.js +1 -1
- package/canvas-roundrect-polyfill/LICENSE +0 -21
- package/canvas-roundrect-polyfill/index.d.ts +0 -0
- package/canvas-roundrect-polyfill/index.js +0 -78
- package/emitter/src/index.d.ts +0 -75
- package/emitter/src/index.js +0 -69
- package/filesize/benchmarks/basic-performance.d.ts +0 -1
- package/filesize/benchmarks/index.d.ts +0 -2
- package/filesize/benchmarks/options-benchmark.d.ts +0 -1
- package/filesize/benchmarks/partial-benchmark.d.ts +0 -1
- package/filesize/benchmarks/stress-test.d.ts +0 -1
- package/pinyin/src/simplified.d.ts +0 -4
- package/pinyin/src/simplified.js +0 -8
- package/pinyin/src/traditional.d.ts +0 -4
- package/pinyin/src/traditional.js +0 -8
- package/promise-pool/LICENSE +0 -19
- package/promise-pool/index.js +0 -89
- package/snapdom/src/core/capture.js +0 -162
- package/snapdom/src/exporters/download.js +0 -47
- package/snapdom/src/index.d.ts +0 -2
- package/snapdom/src/index.js +0 -4
- package/snapdom/src/utils/prepare.helpers.d.ts +0 -9
- package/snapdom/src/utils/prepare.helpers.js +0 -9
- package/tinycolor/src/index.d.ts +0 -214
- package/tinycolor/src/index.js +0 -267
- package/tinycolor/src/public_api.js +0 -11
- package/tween/src/index.d.ts +0 -3
- package/tween/src/index.js +0 -4
- package/url-toolkit/src/url-toolkit.d.ts +0 -18
- package/url-toolkit/src/url-toolkit.js +0 -62
- package/validate/src/index.d.ts +0 -37
- package/validate/src/index.js +0 -80
- /package/cookie/{src/api.d.mts → api.d.ts} +0 -0
- /package/cookie/{src/assign.d.mts → assign.d.ts} +0 -0
- /package/cookie/{src/converter.d.mts → converter.d.ts} +0 -0
- /package/filesize/{src/constants.d.ts → constants.d.ts} +0 -0
- /package/pinyin/{src/core.d.ts → core.d.ts} +0 -0
- /package/pinyin/{src/simplified_dict.d.ts → simplified_dict.d.ts} +0 -0
- /package/pinyin/{src/traditional_dict.d.ts → traditional_dict.d.ts} +0 -0
- /package/snapdom/{src/api → api}/preCache.d.ts +0 -0
- /package/snapdom/{src/api → api}/snapdom.d.ts +0 -0
- /package/snapdom/{src/core → core}/capture.d.ts +0 -0
- /package/snapdom/{src/core → core}/clone.d.ts +0 -0
- /package/snapdom/{src/core → core}/context.d.ts +0 -0
- /package/snapdom/{src/core → core}/exporters.d.ts +0 -0
- /package/snapdom/{src/core → core}/plugins.d.ts +0 -0
- /package/snapdom/{src/core → core}/prepare.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/download.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toBlob.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toCanvas.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toImg.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toJpg.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toPng.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toSvg.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toWebp.d.ts +0 -0
- /package/snapdom/{src/index.browser.d.ts → index.browser.d.ts} +0 -0
- /package/snapdom/{src/modules → modules}/CSSVar.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/background.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/changeCSS.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/counter.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/fonts.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/iconFonts.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/images.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/lineClamp.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/pseudo.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/rasterize.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/snapFetch.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/styles.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/svgDefs.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/browser.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/capture.helpers.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/clone.helpers.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/css.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/debug.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/helpers.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/image.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/index.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/transforms.helpers.d.ts +0 -0
- /package/tinycolor/{src/conversion.d.ts → conversion.d.ts} +0 -0
- /package/tinycolor/{src/css-color-names.d.ts → css-color-names.d.ts} +0 -0
- /package/tinycolor/{src/format-input.d.ts → format-input.d.ts} +0 -0
- /package/tinycolor/{src/from-ratio.d.ts → from-ratio.d.ts} +0 -0
- /package/tinycolor/{src/interfaces.d.ts → interfaces.d.ts} +0 -0
- /package/tinycolor/{src/public_api.d.ts → public_api.d.ts} +0 -0
- /package/tinycolor/{src/random.d.ts → random.d.ts} +0 -0
- /package/tinycolor/{src/readability.d.ts → readability.d.ts} +0 -0
- /package/tinycolor/{src/to-ms-filter.d.ts → to-ms-filter.d.ts} +0 -0
- /package/tinycolor/{src/umd_api.d.ts → umd_api.d.ts} +0 -0
- /package/tinycolor/{src/utils.d.ts → utils.d.ts} +0 -0
- /package/tree/{search/index.d.ts → searchTree.d.ts} +0 -0
- /package/tween/{src/easing.d.ts → easing.d.ts} +0 -0
- /package/tween/{src/tween.d.ts → tween.d.ts} +0 -0
- /package/validate/{src/interface.d.ts → interface.d.ts} +0 -0
- /package/validate/{src/locale → locale}/en-US.d.ts +0 -0
- /package/validate/{src/locale → locale}/index.d.ts +0 -0
- /package/validate/{src/locale → locale}/zh-CN.d.ts +0 -0
- /package/validate/{src/rules → rules}/array.d.ts +0 -0
- /package/validate/{src/rules → rules}/base.d.ts +0 -0
- /package/validate/{src/rules → rules}/boolean.d.ts +0 -0
- /package/validate/{src/rules → rules}/custom.d.ts +0 -0
- /package/validate/{src/rules → rules}/number.d.ts +0 -0
- /package/validate/{src/rules → rules}/object.d.ts +0 -0
- /package/validate/{src/rules → rules}/string.d.ts +0 -0
- /package/validate/{src/rules → rules}/type.d.ts +0 -0
package/dom-helpers/scrollTo.js
CHANGED
package/dom-helpers/scrollTop.js
CHANGED
package/dom-helpers/siblings.js
CHANGED
package/dom-helpers/text.js
CHANGED
package/dom-helpers/types.js
CHANGED
package/dom-helpers/width.js
CHANGED
package/emitter/index.d.ts
CHANGED
|
@@ -1,2 +1,75 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type
|
|
1
|
+
export type EventType = string | symbol;
|
|
2
|
+
export type HandlerType = (...args: unknown[]) => void;
|
|
3
|
+
export type AllType = Map<EventType, Set<HandlerType>>;
|
|
4
|
+
export interface EmitterInterface {
|
|
5
|
+
on(type: EventType, handler: HandlerType): void;
|
|
6
|
+
once(type: EventType, handler: HandlerType): void;
|
|
7
|
+
off(type: EventType, handler?: HandlerType): void;
|
|
8
|
+
offAll(type?: EventType): void;
|
|
9
|
+
emit(type: EventType, ...args: unknown[]): void;
|
|
10
|
+
has(type: EventType): boolean;
|
|
11
|
+
hasHandler(type: EventType, handler?: HandlerType): boolean;
|
|
12
|
+
get(type: EventType): Set<HandlerType> | undefined;
|
|
13
|
+
clear(): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Emitter: 类式事件发射器 / 发布-订阅模式实现
|
|
18
|
+
*/
|
|
19
|
+
declare class Emitter implements EmitterInterface {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(all?: AllType);
|
|
22
|
+
/**
|
|
23
|
+
* 为指定类型注册一个事件处理函数
|
|
24
|
+
* @param type 要监听的事件类型
|
|
25
|
+
* @param handler 响应事件时要调用的函数
|
|
26
|
+
*/
|
|
27
|
+
on(type: EventType, handler: HandlerType): void;
|
|
28
|
+
/**
|
|
29
|
+
* 为指定类型注册一个事件处理函数(只首次调用起作用,之后将被移除)
|
|
30
|
+
* @param type 要监听的事件类型
|
|
31
|
+
* @param handler 响应事件时要调用的函数
|
|
32
|
+
*/
|
|
33
|
+
once(type: EventType, handler: HandlerType): void;
|
|
34
|
+
/**
|
|
35
|
+
* 移除指定类型的事件处理函数
|
|
36
|
+
* 如果省略 `handler` 参数,则移除该类型的所有处理函数
|
|
37
|
+
* @param type 要移除处理函数的事件类型
|
|
38
|
+
* @param handler 要移除的处理函数
|
|
39
|
+
*/
|
|
40
|
+
off(type: EventType, handler?: HandlerType): void;
|
|
41
|
+
/**
|
|
42
|
+
* 移除指定类型的所有事件处理函数
|
|
43
|
+
* 如果省略 `type` 参数,则移除所有处理函数
|
|
44
|
+
* @param type 要移除处理函数的事件类型
|
|
45
|
+
*/
|
|
46
|
+
offAll(type?: EventType): void;
|
|
47
|
+
/**
|
|
48
|
+
* 调用指定类型的所有处理函数
|
|
49
|
+
* @param type 要触发的事件类型
|
|
50
|
+
* @param args 传递给处理函数的参数
|
|
51
|
+
*/
|
|
52
|
+
emit(type: EventType, ...args: unknown[]): void;
|
|
53
|
+
get(type: EventType): Set<HandlerType> | undefined;
|
|
54
|
+
has(type: EventType): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 检查指定类型是否有事件处理函数
|
|
57
|
+
* @param type 事件类型
|
|
58
|
+
* @returns 是否存在处理函数
|
|
59
|
+
*/
|
|
60
|
+
hasHandler(type: EventType, handler?: HandlerType): boolean;
|
|
61
|
+
clear(): void;
|
|
62
|
+
/**
|
|
63
|
+
* 销毁实例,释放资源
|
|
64
|
+
*/
|
|
65
|
+
destroy(): void;
|
|
66
|
+
/**
|
|
67
|
+
* 获取所有已注册的事件类型
|
|
68
|
+
* @returns 事件类型数组
|
|
69
|
+
*/
|
|
70
|
+
keys(): MapIterator<EventType>;
|
|
71
|
+
values(): MapIterator<Set<HandlerType>>;
|
|
72
|
+
entries(): MapIterator<[EventType, Set<HandlerType>]>;
|
|
73
|
+
}
|
|
74
|
+
export { Emitter };
|
|
75
|
+
export default Emitter;
|
package/emitter/index.js
CHANGED
|
@@ -1,4 +1,69 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
//#region utils/emitter/index.ts
|
|
3
|
+
var e = class {
|
|
4
|
+
#e;
|
|
5
|
+
constructor(e = /* @__PURE__ */ new Map()) {
|
|
6
|
+
this.#e = e;
|
|
7
|
+
}
|
|
8
|
+
on(e, t) {
|
|
9
|
+
if (typeof t != "function") throw Error(`${String(e)}: handler 必须为函数`);
|
|
10
|
+
let n = this.get(e) ?? /* @__PURE__ */ new Set();
|
|
11
|
+
n.add(t), this.#n(e, n);
|
|
12
|
+
}
|
|
13
|
+
once(e, t) {
|
|
14
|
+
let n = (...r) => {
|
|
15
|
+
t(...r), this.off(e, n);
|
|
16
|
+
};
|
|
17
|
+
this.on(e, n);
|
|
18
|
+
}
|
|
19
|
+
off(e, t) {
|
|
20
|
+
let n = this.get(e);
|
|
21
|
+
n && (t ? n.delete(t) : n.clear(), n.size || this.offAll(e));
|
|
22
|
+
}
|
|
23
|
+
offAll(e) {
|
|
24
|
+
e ? this.#t(e) : this.clear();
|
|
25
|
+
}
|
|
26
|
+
emit(e, ...t) {
|
|
27
|
+
let n = this.get(e);
|
|
28
|
+
if (!n) return;
|
|
29
|
+
let r = Array.from(n);
|
|
30
|
+
for (let e of r) e(...t);
|
|
31
|
+
}
|
|
32
|
+
get(e) {
|
|
33
|
+
return this.#e.get(e);
|
|
34
|
+
}
|
|
35
|
+
has(e) {
|
|
36
|
+
return this.#e.has(e);
|
|
37
|
+
}
|
|
38
|
+
hasHandler(e, t) {
|
|
39
|
+
if (t) {
|
|
40
|
+
let n = this.get(e);
|
|
41
|
+
if (n) return n.has(t);
|
|
42
|
+
} else return this.has(e);
|
|
43
|
+
return !1;
|
|
44
|
+
}
|
|
45
|
+
clear() {
|
|
46
|
+
this.#e.clear();
|
|
47
|
+
}
|
|
48
|
+
#t(e) {
|
|
49
|
+
this.#e.delete(e);
|
|
50
|
+
}
|
|
51
|
+
#n(e, t) {
|
|
52
|
+
this.#e.set(e, t);
|
|
53
|
+
}
|
|
54
|
+
destroy() {
|
|
55
|
+
this.clear(), this.#e = /* @__PURE__ */ new Map();
|
|
56
|
+
}
|
|
57
|
+
keys() {
|
|
58
|
+
return this.#e.keys();
|
|
59
|
+
}
|
|
60
|
+
values() {
|
|
61
|
+
return this.#e.values();
|
|
62
|
+
}
|
|
63
|
+
entries() {
|
|
64
|
+
return this.#e.entries();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { e as Emitter, e as default };
|
|
4
69
|
/* 独立思考,明辨是非 */
|
package/emoji/emoji.js
CHANGED
package/emoji/emojis.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
//#region utils/emoji/emojis.js
|
|
3
3
|
var e = /* @__PURE__ */ "😀.😃.😄.😁.😆.😅.🤣.😂.🙂.🙃.🫠.😉.😊.😇.🥰.😍.🤩.😘.😗.☺️.😚.😙.🥲.😋.😛.😜.🤪.😝.🤑.🤗.🤭.🫢.🫣.🤫.🤔.🫡.🤐.🤨.😐️.😑.😶.🫥.😶🌫️.😏.😒.🙄.😬.😮💨.🤥.🫨.🙂↔️.🙂↕️.😌.😔.😪.🤤.😴..😷.🤒.🤕.🤢.🤮.🤧.🥵.🥶.🥴.😵.😵💫.🤯.🤠.🥳.🥸.😎.🤓.🧐.😕.🫤.😟.🙁.☹️.😮.😯.😲.😳.🥺.🥹.😦.😧.😨.😰.😥.😢.😭.😱.😖.😣.😞.😓.😩.😫.🥱.😤.😡.😠.🤬.😈.👿.💀.☠️.💩.🤡.👹.👺.👻.👽️.👾.🤖.😺.😸.😹.😻.😼.😽.🙀.😿.😾.🙈.🙉.🙊.💌.💘.💝.💖.💗.💓.💞.💕.💟.❣️.💔.❤️🔥.❤️🩹.❤️.🩷.🧡.💛.💚.💙.🩵.💜.🤎.🖤.🩶.🤍.💋.💯.💢.💥.💫.💦.💨.🕳️.💬.👁️🗨️.🗨️.🗯️.💭.💤.👋.🤚.🖐️.✋️.🖖.🫱.🫲.🫳.🫴.🫷.🫸.👌.🤌.🤏.✌️.🤞.🫰.🤟.🤘.🤙.👈️.👉️.👆️.🖕.👇️.☝️.🫵.👍️.👎️.✊️.👊.🤛.🤜.👏.🙌.🫶.👐.🤲.🤝.🙏.✍️.💅.🤳.💪.🦾.🦿.🦵.🦶.👂️.🦻.👃.🧠.🫀.🫁.🦷.🦴.👀.👁️.👅.👄.🫦.👶.🧒.👦.👧.🧑.👱.👨.🧔.🧔♂️.🧔♀️.👨🦰.👨🦱.👨🦳.👨🦲.👩.👩🦰.🧑🦰.👩🦱.🧑🦱.👩🦳.🧑🦳.👩🦲.🧑🦲.👱♀️.👱♂️.🧓.👴.👵.🙍.🙍♂️.🙍♀️.🙎.🙎♂️.🙎♀️.🙅.🙅♂️.🙅♀️.🙆.🙆♂️.🙆♀️.💁.💁♂️.💁♀️.🙋.🙋♂️.🙋♀️.🧏.🧏♂️.🧏♀️.🙇.🙇♂️.🙇♀️.🤦.🤦♂️.🤦♀️.🤷.🤷♂️.🤷♀️.🧑⚕️.👨⚕️.👩⚕️.🧑🎓.👨🎓.👩🎓.🧑🏫.👨🏫.👩🏫.🧑⚖️.👨⚖️.👩⚖️.🧑🌾.👨🌾.👩🌾.🧑🍳.👨🍳.👩🍳.🧑🔧.👨🔧.👩🔧.🧑🏭.👨🏭.👩🏭.🧑💼.👨💼.👩💼.🧑🔬.👨🔬.👩🔬.🧑💻.👨💻.👩💻.🧑🎤.👨🎤.👩🎤.🧑🎨.👨🎨.👩🎨.🧑✈️.👨✈️.👩✈️.🧑🚀.👨🚀.👩🚀.🧑🚒.👨🚒.👩🚒.👮.👮♂️.👮♀️.🕵️.🕵️♂️.🕵️♀️.💂.💂♂️.💂♀️.🥷.👷.👷♂️.👷♀️.🫅.🤴.👸.👳.👳♂️.👳♀️.👲.🧕.🤵.🤵♂️.🤵♀️.👰.👰♂️.👰♀️.🤰.🫃.🫄.🤱.👩🍼.👨🍼.🧑🍼.👼.🎅.🤶.🧑🎄.🦸.🦸♂️.🦸♀️.🦹.🦹♂️.🦹♀️.🧙.🧙♂️.🧙♀️.🧚.🧚♂️.🧚♀️.🧛.🧛♂️.🧛♀️.🧜.🧜♂️.🧜♀️.🧝.🧝♂️.🧝♀️.🧞.🧞♂️.🧞♀️.🧟.🧟♂️.🧟♀️.🧌.💆.💆♂️.💆♀️.💇.💇♂️.💇♀️.🚶.🚶♂️.🚶♀️.🚶➡️.🚶♀️➡️.🚶♂️➡️.🧍.🧍♂️.🧍♀️.🧎.🧎♂️.🧎♀️.🧎➡️.🧎♀️➡️.🧎♂️➡️.🧑🦯.🧑🦯➡️.👨🦯.👨🦯➡️.👩🦯.👩🦯➡️.🧑🦼.🧑🦼➡️.👨🦼.👨🦼➡️.👩🦼.👩🦼➡️.🧑🦽.🧑🦽➡️.👨🦽.👨🦽➡️.👩🦽.👩🦽➡️.🏃.🏃♂️.🏃♀️.🏃➡️.🏃♀️➡️.🏃♂️➡️.💃.🕺.🕴️.👯.👯♂️.👯♀️.🧖.🧖♂️.🧖♀️.🧗.🧗♂️.🧗♀️.🤺.🏇.⛷️.🏂️.🏌️.🏌️♂️.🏌️♀️.🏄️.🏄♂️.🏄♀️.🚣.🚣♂️.🚣♀️.🏊️.🏊♂️.🏊♀️.⛹️.⛹️♂️.⛹️♀️.🏋️.🏋️♂️.🏋️♀️.🚴.🚴♂️.🚴♀️.🚵.🚵♂️.🚵♀️.🤸.🤸♂️.🤸♀️.🤼.🤼♂️.🤼♀️.🤽.🤽♂️.🤽♀️.🤾.🤾♂️.🤾♀️.🤹.🤹♂️.🤹♀️.🧘.🧘♂️.🧘♀️.🛀.🛌.🧑🤝🧑.👭.👫.👬.💏.👩❤️💋👨.👨❤️💋👨.👩❤️💋👩.💑.👩❤️👨.👨❤️👨.👩❤️👩.👨👩👦.👨👩👧.👨👩👧👦.👨👩👦👦.👨👩👧👧.👨👨👦.👨👨👧.👨👨👧👦.👨👨👦👦.👨👨👧👧.👩👩👦.👩👩👧.👩👩👧👦.👩👩👦👦.👩👩👧👧.👨👦.👨👦👦.👨👧.👨👧👦.👨👧👧.👩👦.👩👦👦.👩👧.👩👧👦.👩👧👧.🗣️.👤.👥.🫂.👪️.🧑🧑🧒.🧑🧑🧒🧒.🧑🧒.🧑🧒🧒.👣..🏻.🏼.🏽.🏾.🏿.🦰.🦱.🦳.🦲.🐵.🐒.🦍.🦧.🐶.🐕️.🦮.🐕🦺.🐩.🐺.🦊.🦝.🐱.🐈️.🐈⬛.🦁.🐯.🐅.🐆.🐴.🫎.🫏.🐎.🦄.🦓.🦌.🦬.🐮.🐂.🐃.🐄.🐷.🐖.🐗.🐽.🐏.🐑.🐐.🐪.🐫.🦙.🦒.🐘.🦣.🦏.🦛.🐭.🐁.🐀.🐹.🐰.🐇.🐿️.🦫.🦔.🦇.🐻.🐻❄️.🐨.🐼.🦥.🦦.🦨.🦘.🦡.🐾.🦃.🐔.🐓.🐣.🐤.🐥.🐦️.🐧.🕊️.🦅.🦆.🦢.🦉.🦤.🪶.🦩.🦚.🦜.🪽.🐦⬛.🪿.🐦🔥.🐸.🐊.🐢.🦎.🐍.🐲.🐉.🦕.🦖.🐳.🐋.🐬.🦭.🐟️.🐠.🐡.🦈.🐙.🐚.🪸.🪼.🦀.🦞.🦐.🦑.🦪.🐌.🦋.🐛.🐜.🐝.🪲.🐞.🦗.🪳.🕷️.🕸️.🦂.🦟.🪰.🪱.🦠.💐.🌸.💮.🪷.🏵️.🌹.🥀.🌺.🌻.🌼.🌷.🪻.🌱.🪴.🌲.🌳.🌴.🌵.🌾.🌿.☘️.🍀.🍁.🍂.🍃.🪹.🪺.🍄..🍇.🍈.🍉.🍊.🍋.🍋🟩.🍌.🍍.🥭.🍎.🍏.🍐.🍑.🍒.🍓.🫐.🥝.🍅.🫒.🥥.🥑.🍆.🥔.🥕.🌽.🌶️.🫑.🥒.🥬.🥦.🧄.🧅.🥜.🫘.🌰.🫚.🫛.🍄🟫..🍞.🥐.🥖.🫓.🥨.🥯.🥞.🧇.🧀.🍖.🍗.🥩.🥓.🍔.🍟.🍕.🌭.🥪.🌮.🌯.🫔.🥙.🧆.🥚.🍳.🥘.🍲.🫕.🥣.🥗.🍿.🧈.🧂.🥫.🍱.🍘.🍙.🍚.🍛.🍜.🍝.🍠.🍢.🍣.🍤.🍥.🥮.🍡.🥟.🥠.🥡.🍦.🍧.🍨.🍩.🍪.🎂.🍰.🧁.🥧.🍫.🍬.🍭.🍮.🍯.🍼.🥛.☕️.🫖.🍵.🍶.🍾.🍷.🍸️.🍹.🍺.🍻.🥂.🥃.🫗.🥤.🧋.🧃.🧉.🧊.🥢.🍽️.🍴.🥄.🔪.🫙.🏺.🌍️.🌎️.🌏️.🌐.🗺️.🗾.🧭.🏔️.⛰️.🌋.🗻.🏕️.🏖️.🏜️.🏝️.🏞️.🏟️.🏛️.🏗️.🧱.🪨.🪵.🛖.🏘️.🏚️.🏠️.🏡.🏢.🏣.🏤.🏥.🏦.🏨.🏩.🏪.🏫.🏬.🏭️.🏯.🏰.💒.🗼.🗽.⛪️.🕌.🛕.🕍.⛩️.🕋.⛲️.⛺️.🌁.🌃.🏙️.🌄.🌅.🌆.🌇.🌉.♨️.🎠.🛝.🎡.🎢.💈.🎪.🚂.🚃.🚄.🚅.🚆.🚇️.🚈.🚉.🚊.🚝.🚞.🚋.🚌.🚍️.🚎.🚐.🚑️.🚒.🚓.🚔️.🚕.🚖.🚗.🚘️.🚙.🛻.🚚.🚛.🚜.🏎️.🏍️.🛵.🦽.🦼.🛺.🚲️.🛴.🛹.🛼.🚏.🛣️.🛤️.🛢️.⛽️.🛞.🚨.🚥.🚦.🛑.🚧.⚓️.🛟.⛵️.🛶.🚤.🛳️.⛴️.🛥️.🚢.✈️.🛩️.🛫.🛬.🪂.💺.🚁.🚟.🚠.🚡.🛰️.🚀.🛸.🛎️.🧳.⌛️.⏳️.⌚️.⏰️.⏱️.⏲️.🕰️.🕛️.🕧️.🕐️.🕜️.🕑️.🕝️.🕒️.🕞️.🕓️.🕟️.🕔️.🕠️.🕕️.🕡️.🕖️.🕢️.🕗️.🕣️.🕘️.🕤️.🕙️.🕥️.🕚️.🕦️.🌑.🌒.🌓.🌔.🌕️.🌖.🌗.🌘.🌙.🌚.🌛.🌜️.🌡️.☀️.🌝.🌞.🪐.⭐️.🌟.🌠.🌌.☁️.⛅️.⛈️.🌤️.🌥️.🌦️.🌧️.🌨️.🌩️.🌪️.🌫️.🌬️.🌀.🌈.🌂.☂️.☔️.⛱️.⚡️.❄️.☃️.⛄️.☄️.🔥.💧.🌊.🎃.🎄.🎆.🎇.🧨.✨️.🎈.🎉.🎊.🎋.🎍.🎎.🎏.🎐.🎑.🧧.🎀.🎁.🎗️.🎟️.🎫.🎖️.🏆️.🏅.🥇.🥈.🥉.⚽️.⚾️.🥎.🏀.🏐.🏈.🏉.🎾.🥏.🎳.🏏.🏑.🏒.🥍.🏓.🏸.🥊.🥋.🥅.⛳️.⛸️.🎣.🤿.🎽.🎿.🛷.🥌.🎯.🪀.🪁.🔫.🎱.🔮.🪄.🎮️.🕹️.🎰.🎲.🧩.🧸.🪅.🪩.🪆.♠️.♥️.♦️.♣️.♟️.🃏.🀄️.🎴.🎭️.🖼️.🎨.🧵.🪡.🧶.🪢.👓️.🕶️.🥽.🥼.🦺.👔.👕.👖.🧣.🧤.🧥.🧦.👗.👘.🥻.🩱.🩲.🩳.👙.👚.🪭.👛.👜.👝.🛍️.🎒.🩴.👞.👟.🥾.🥿.👠.👡.🩰.👢.🪮.👑.👒.🎩.🎓️.🧢.🪖.⛑️.📿.💄.💍.💎.🔇.🔈️.🔉.🔊.📢.📣.📯.🔔.🔕.🎼.🎵.🎶.🎙️.🎚️.🎛️.🎤.🎧️.📻️.🎷.🪗.🎸.🎹.🎺.🎻.🪕.🥁.🪘.🪇.🪈..📱.📲.☎️.📞.📟️.📠.🔋.🪫.🔌.💻️.🖥️.🖨️.⌨️.🖱️.🖲️.💽.💾.💿️.📀.🧮.🎥.🎞️.📽️.🎬️.📺️.📷️.📸.📹️.📼.🔍️.🔎.🕯️.💡.🔦.🏮.🪔.📔.📕.📖.📗.📘.📙.📚️.📓.📒.📃.📜.📄.📰.🗞️.📑.🔖.🏷️.💰️.🪙.💴.💵.💶.💷.💸.💳️.🧾.💹.✉️.📧.📨.📩.📤️.📥️.📦️.📫️.📪️.📬️.📭️.📮.🗳️.✏️.✒️.🖋️.🖊️.🖌️.🖍️.📝.💼.📁.📂.🗂️.📅.📆.🗒️.🗓️.📇.📈.📉.📊.📋️.📌.📍.📎.🖇️.📏.📐.✂️.🗃️.🗄️.🗑️.🔒️.🔓️.🔏.🔐.🔑.🗝️.🔨.🪓.⛏️.⚒️.🛠️.🗡️.⚔️.💣️.🪃.🏹.🛡️.🪚.🔧.🪛.🔩.⚙️.🗜️.⚖️.🦯.🔗.⛓️💥.⛓️.🪝.🧰.🧲.🪜..⚗️.🧪.🧫.🧬.🔬.🔭.📡.💉.🩸.💊.🩹.🩼.🩺.🩻.🚪.🛗.🪞.🪟.🛏️.🛋️.🪑.🚽.🪠.🚿.🛁.🪤.🪒.🧴.🧷.🧹.🧺.🧻.🪣.🧼.🫧.🪥.🧽.🧯.🛒.🚬.⚰️.🪦.⚱️.🧿.🪬.🗿.🪧.🪪.🏧.🚮.🚰.♿️.🚹️.🚺️.🚻.🚼️.🚾.🛂.🛃.🛄.🛅.⚠️.🚸.⛔️.🚫.🚳.🚭️.🚯.🚱.🚷.📵.🔞.☢️.☣️.⬆️.↗️.➡️.↘️.⬇️.↙️.⬅️.↖️.↕️.↔️.↩️.↪️.⤴️.⤵️.🔃.🔄.🔙.🔚.🔛.🔜.🔝.🛐.⚛️.🕉️.✡️.☸️.☯️.✝️.☦️.☪️.☮️.🕎.🔯.🪯.♈️.♉️.♊️.♋️.♌️.♍️.♎️.♏️.♐️.♑️.♒️.♓️.⛎️.🔀.🔁.🔂.▶️.⏩️.⏭️.⏯️.◀️.⏪️.⏮️.🔼.⏫️.🔽.⏬️.⏸️.⏹️.⏺️.⏏️.🎦.🔅.🔆.📶.🛜.📳.📴.♀️.♂️.⚧️.✖️.➕️.➖️.➗️.🟰.♾️.‼️.⁉️.❓️.❔️.❕️.❗️.〰️.💱.💲.⚕️.♻️.⚜️.🔱.📛.🔰.⭕️.✅️.☑️.✔️.❌️.❎️.➰️.➿️.〽️.✳️.✴️.❇️.©️.®️.™️..#️⃣.*️⃣.0️⃣.1️⃣.2️⃣.3️⃣.4️⃣.5️⃣.6️⃣.7️⃣.8️⃣.9️⃣.🔟.🔠.🔡.🔢.🔣.🔤.🅰️.🆎.🅱️.🆑.🆒.🆓.ℹ️.🆔.Ⓜ️.🆕.🆖.🅾️.🆗.🅿️.🆘.🆙.🆚.🈁.🈂️.🈷️.🈶.🈯️.🉐.🈹.🈚️.🈲.🉑.🈸.🈴.🈳.㊗️.㊙️.🈺.🈵.🔴.🟠.🟡.🟢.🔵.🟣.🟤.⚫️.⚪️.🟥.🟧.🟨.🟩.🟦.🟪.🟫.⬛️.⬜️.◼️.◻️.◾️.◽️.▪️.▫️.🔶.🔷.🔸.🔹.🔺.🔻.💠.🔘.🔳.🔲.🏁.🚩.🎌.🏴.🏳️.🏳️🌈.🏳️⚧️.🏴☠️.🇦🇨.🇦🇩.🇦🇪.🇦🇫.🇦🇬.🇦🇮.🇦🇱.🇦🇲.🇦🇴.🇦🇶.🇦🇷.🇦🇸.🇦🇹.🇦🇺.🇦🇼.🇦🇽.🇦🇿.🇧🇦.🇧🇧.🇧🇩.🇧🇪.🇧🇫.🇧🇬.🇧🇭.🇧🇮.🇧🇯.🇧🇱.🇧🇲.🇧🇳.🇧🇴.🇧🇶.🇧🇷.🇧🇸.🇧🇹.🇧🇻.🇧🇼.🇧🇾.🇧🇿.🇨🇦.🇨🇨.🇨🇩.🇨🇫.🇨🇬.🇨🇭.🇨🇮.🇨🇰.🇨🇱.🇨🇲.🇨🇳.🇨🇴.🇨🇵.🇨🇶.🇨🇷.🇨🇺.🇨🇻.🇨🇼.🇨🇽.🇨🇾.🇨🇿.🇩🇪.🇩🇬.🇩🇯.🇩🇰.🇩🇲.🇩🇴.🇩🇿.🇪🇦.🇪🇨.🇪🇪.🇪🇬.🇪🇭.🇪🇷.🇪🇸.🇪🇹.🇪🇺.🇫🇮.🇫🇯.🇫🇰.🇫🇲.🇫🇴.🇫🇷.🇬🇦.🇬🇧.🇬🇩.🇬🇪.🇬🇫.🇬🇬.🇬🇭.🇬🇮.🇬🇱.🇬🇲.🇬🇳.🇬🇵.🇬🇶.🇬🇷.🇬🇸.🇬🇹.🇬🇺.🇬🇼.🇬🇾.🇭🇰.🇭🇲.🇭🇳.🇭🇷.🇭🇹.🇭🇺.🇮🇨.🇮🇩.🇮🇪.🇮🇱.🇮🇲.🇮🇳.🇮🇴.🇮🇶.🇮🇷.🇮🇸.🇮🇹.🇯🇪.🇯🇲.🇯🇴.🇯🇵.🇰🇪.🇰🇬.🇰🇭.🇰🇮.🇰🇲.🇰🇳.🇰🇵.🇰🇷.🇰🇼.🇰🇾.🇰🇿.🇱🇦.🇱🇧.🇱🇨.🇱🇮.🇱🇰.🇱🇷.🇱🇸.🇱🇹.🇱🇺.🇱🇻.🇱🇾.🇲🇦.🇲🇨.🇲🇩.🇲🇪.🇲🇫.🇲🇬.🇲🇭.🇲🇰.🇲🇱.🇲🇲.🇲🇳.🇲🇴.🇲🇵.🇲🇶.🇲🇷.🇲🇸.🇲🇹.🇲🇺.🇲🇻.🇲🇼.🇲🇽.🇲🇾.🇲🇿.🇳🇦.🇳🇨.🇳🇪.🇳🇫.🇳🇬.🇳🇮.🇳🇱.🇳🇴.🇳🇵.🇳🇷.🇳🇺.🇳🇿.🇴🇲.🇵🇦.🇵🇪.🇵🇫.🇵🇬.🇵🇭.🇵🇰.🇵🇱.🇵🇲.🇵🇳.🇵🇷.🇵🇸.🇵🇹.🇵🇼.🇵🇾.🇶🇦.🇷🇪.🇷🇴.🇷🇸.🇷🇺.🇷🇼.🇸🇦.🇸🇧.🇸🇨.🇸🇩.🇸🇪.🇸🇬.🇸🇭.🇸🇮.🇸🇯.🇸🇰.🇸🇱.🇸🇲.🇸🇳.🇸🇴.🇸🇷.🇸🇸.🇸🇹.🇸🇻.🇸🇽.🇸🇾.🇸🇿.🇹🇦.🇹🇨.🇹🇩.🇹🇫.🇹🇬.🇹🇭.🇹🇯.🇹🇰.🇹🇱.🇹🇲.🇹🇳.🇹🇴.🇹🇷.🇹🇹.🇹🇻.🇹🇿.🇺🇦.🇺🇬.🇺🇲.🇺🇳.🇺🇸.🇺🇾.🇺🇿.🇻🇦.🇻🇨.🇻🇪.🇻🇬.🇻🇮.🇻🇳.🇻🇺.🇼🇫.🇼🇸.🇽🇰.🇾🇪.🇾🇹.🇿🇦.🇿🇲.🇿🇼.🏴.🏴.🏴".split(".");
|
|
4
4
|
//#endregion
|
package/emoji/index.js
CHANGED
package/escape/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
//#region utils/escape/index.js
|
|
3
3
|
function e(e) {
|
|
4
4
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/\//g, "/").replace(/\\/g, "\").replace(/`/g, "`");
|
package/file/fileRead.js
CHANGED
package/file/fileToDataURL.js
CHANGED
package/file/index.js
CHANGED
package/file/saveAs.js
CHANGED
package/filesize/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Copyright (c) 2026, Jason Mulligan All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
4
|
+
are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
- Redistributions of source code must retain the above copyright notice, this
|
|
7
|
+
list of conditions and the following disclaimer.
|
|
8
|
+
|
|
9
|
+
- Redistributions in binary form must reproduce the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer in the documentation and/or
|
|
11
|
+
other materials provided with the distribution.
|
|
12
|
+
|
|
13
|
+
- Neither the name of filesize nor the names of its contributors may be used to
|
|
14
|
+
endorse or promote products derived from this software without specific prior
|
|
15
|
+
written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
18
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
19
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
20
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
21
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
22
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
23
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
24
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
25
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
26
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
//#region utils/filesize/constants.js
|
|
3
|
+
var e = "Invalid number", t = "Invalid rounding method", n = "iec", r = "jedec", i = "si", a = "bit", o = "bits", s = "byte", c = "bytes", l = "kbit", u = "kB", d = "array", f = "function", p = "object", m = "string", h = "exponent", g = "round", _ = "e", v = "", y = ".", b = "s", x = " ", S = "0", C = {
|
|
4
|
+
symbol: {
|
|
5
|
+
iec: {
|
|
6
|
+
bits: [
|
|
7
|
+
"bit",
|
|
8
|
+
"Kibit",
|
|
9
|
+
"Mibit",
|
|
10
|
+
"Gibit",
|
|
11
|
+
"Tibit",
|
|
12
|
+
"Pibit",
|
|
13
|
+
"Eibit",
|
|
14
|
+
"Zibit",
|
|
15
|
+
"Yibit"
|
|
16
|
+
],
|
|
17
|
+
bytes: [
|
|
18
|
+
"B",
|
|
19
|
+
"KiB",
|
|
20
|
+
"MiB",
|
|
21
|
+
"GiB",
|
|
22
|
+
"TiB",
|
|
23
|
+
"PiB",
|
|
24
|
+
"EiB",
|
|
25
|
+
"ZiB",
|
|
26
|
+
"YiB"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
jedec: {
|
|
30
|
+
bits: [
|
|
31
|
+
"bit",
|
|
32
|
+
"Kbit",
|
|
33
|
+
"Mbit",
|
|
34
|
+
"Gbit",
|
|
35
|
+
"Tbit",
|
|
36
|
+
"Pbit",
|
|
37
|
+
"Ebit",
|
|
38
|
+
"Zbit",
|
|
39
|
+
"Ybit"
|
|
40
|
+
],
|
|
41
|
+
bytes: [
|
|
42
|
+
"B",
|
|
43
|
+
"KB",
|
|
44
|
+
"MB",
|
|
45
|
+
"GB",
|
|
46
|
+
"TB",
|
|
47
|
+
"PB",
|
|
48
|
+
"EB",
|
|
49
|
+
"ZB",
|
|
50
|
+
"YB"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
fullform: {
|
|
55
|
+
iec: [
|
|
56
|
+
"",
|
|
57
|
+
"kibi",
|
|
58
|
+
"mebi",
|
|
59
|
+
"gibi",
|
|
60
|
+
"tebi",
|
|
61
|
+
"pebi",
|
|
62
|
+
"exbi",
|
|
63
|
+
"zebi",
|
|
64
|
+
"yobi"
|
|
65
|
+
],
|
|
66
|
+
jedec: [
|
|
67
|
+
"",
|
|
68
|
+
"kilo",
|
|
69
|
+
"mega",
|
|
70
|
+
"giga",
|
|
71
|
+
"tera",
|
|
72
|
+
"peta",
|
|
73
|
+
"exa",
|
|
74
|
+
"zetta",
|
|
75
|
+
"yotta"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}, w = [
|
|
79
|
+
1,
|
|
80
|
+
1024,
|
|
81
|
+
1048576,
|
|
82
|
+
1073741824,
|
|
83
|
+
1099511627776,
|
|
84
|
+
0x4000000000000,
|
|
85
|
+
0x1000000000000000,
|
|
86
|
+
0x400000000000000000,
|
|
87
|
+
12089258196146292e8
|
|
88
|
+
], T = [
|
|
89
|
+
1,
|
|
90
|
+
1e3,
|
|
91
|
+
1e6,
|
|
92
|
+
1e9,
|
|
93
|
+
0xe8d4a51000,
|
|
94
|
+
0x38d7ea4c68000,
|
|
95
|
+
0xde0b6b3a7640000,
|
|
96
|
+
1e21,
|
|
97
|
+
1e24
|
|
98
|
+
], E = Math.log(1024), D = Math.log(1e3);
|
|
99
|
+
//#endregion
|
|
100
|
+
export { d as ARRAY, w as BINARY_POWERS, a as BIT, o as BITS, s as BYTE, c as BYTES, T as DECIMAL_POWERS, _ as E, v as EMPTY, h as EXPONENT, f as FUNCTION, n as IEC, e as INVALID_NUMBER, t as INVALID_ROUND, r as JEDEC, D as LOG_10_1000, E as LOG_2_1024, p as OBJECT, y as PERIOD, g as ROUND, b as S, i as SI, l as SI_KBIT, u as SI_KBYTE, x as SPACE, m as STRING, C as STRINGS, S as ZERO };
|
|
101
|
+
/* 独立思考,明辨是非 */
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
* @returns {string|Array|Object|number} Formatted file size based on output option
|
|
22
22
|
* @throws {TypeError} When arg is not a valid number or roundingMethod is invalid
|
|
23
23
|
* @example
|
|
24
|
-
* filesize(1024) // "1
|
|
25
|
-
* filesize(1024, {bits: true}) // "8
|
|
26
|
-
* filesize(1024, {output: "object"}) // {value: 1, symbol: "
|
|
24
|
+
* filesize(1024) // "1.02 kB"
|
|
25
|
+
* filesize(1024, {bits: true}) // "8.19 kbit"
|
|
26
|
+
* filesize(1024, {output: "object"}) // {value: 1.02, symbol: "kB", exponent: 1, unit: "kB"}
|
|
27
27
|
*/
|
|
28
28
|
export function filesize(arg: number | string | bigint, { bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision, }?: {
|
|
29
29
|
bits?: boolean | undefined;
|
|
@@ -45,7 +45,7 @@ export function filesize(arg: number | string | bigint, { bits, pad, base, round
|
|
|
45
45
|
}): string | any[] | Object | number;
|
|
46
46
|
/**
|
|
47
47
|
* Creates a partially applied version of filesize with preset options
|
|
48
|
-
* @param {Object} [options={}] -
|
|
48
|
+
* @param {Object} [options={}] - Configuration options (same as filesize)
|
|
49
49
|
* @param {boolean} [options.bits=false] - If true, calculates bits instead of bytes
|
|
50
50
|
* @param {boolean} [options.pad=false] - If true, pads decimal places to match round parameter
|
|
51
51
|
* @param {number} [options.base=-1] - Number base (2 for binary, 10 for decimal, -1 for auto)
|
|
@@ -64,9 +64,10 @@ export function filesize(arg: number | string | bigint, { bits, pad, base, round
|
|
|
64
64
|
* @param {number} [options.precision=0] - Number of significant digits (0 for auto)
|
|
65
65
|
* @returns {Function} A function that takes a file size and returns formatted output
|
|
66
66
|
* @example
|
|
67
|
-
* const formatBytes = partial({round: 1, standard: "
|
|
68
|
-
* formatBytes(1024) // "1
|
|
69
|
-
* formatBytes(2048) // "2
|
|
67
|
+
* const formatBytes = partial({round: 1, standard: "iec"});
|
|
68
|
+
* formatBytes(1024) // "1 KiB"
|
|
69
|
+
* formatBytes(2048) // "2 KiB"
|
|
70
|
+
* formatBytes(1536) // "1.5 KiB"
|
|
70
71
|
*/
|
|
71
72
|
export function partial({ bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision, }?: {
|
|
72
73
|
bits?: boolean | undefined;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { BITS as e, BYTES as t, INVALID_NUMBER as n, INVALID_ROUND as r, LOG_10_1000 as i, LOG_2_1024 as a, ROUND as o, SI_KBIT as s, STRING as c, STRINGS as l } from "./constants.js";
|
|
3
|
+
import { applyNumberFormatting as u, applyPrecisionHandling as d, calculateOptimizedValue as f, getBaseConfiguration as p, handleZeroValue as m } from "./helpers.js";
|
|
4
|
+
//#region utils/filesize/filesize.js
|
|
5
|
+
function h(h, { bits: g = !1, pad: _ = !1, base: v = -1, round: y = 2, locale: b = "", localeOptions: x = {}, separator: S = "", spacer: C = " ", symbols: w = {}, standard: T = "", output: E = c, fullform: D = !1, fullforms: O = [], exponent: k = -1, roundingMethod: A = o, precision: j = 0 } = {}) {
|
|
6
|
+
let M = k, N = Number(h), P = [], F = 0, I = "", { isDecimal: L, ceil: R, actualStandard: z } = p(T, v), B = D === !0, V = N < 0, H = Math[A];
|
|
7
|
+
if (typeof h != "bigint" && isNaN(h)) throw TypeError(n);
|
|
8
|
+
if (typeof H != "function") throw TypeError(r);
|
|
9
|
+
if (V && (N = -N), N === 0) return m(j, z, g, w, B, O, E, C);
|
|
10
|
+
(M === -1 || isNaN(M)) && (M = Math.floor(L ? Math.log(N) / i : Math.log(N) / a), M < 0 && (M = 0)), M > 8 && (j > 0 && (j += 8 - M), M = 8);
|
|
11
|
+
let U = k === -1 || isNaN(k);
|
|
12
|
+
if (E === "exponent") return M;
|
|
13
|
+
let { result: W, e: G } = f(N, M, L, g, R, U);
|
|
14
|
+
F = W, M = G;
|
|
15
|
+
let K = M > 0 && y > 0 ? 10 ** y : 1;
|
|
16
|
+
if (P[0] = K === 1 ? H(F) : H(F * K) / K, P[0] === R && M < 8 && U && (P[0] = 1, M++), j > 0) {
|
|
17
|
+
let e = d(P[0], j, M, N, L, g, R, H, y, k);
|
|
18
|
+
P[0] = e.value, M = e.e;
|
|
19
|
+
}
|
|
20
|
+
let q = l.symbol[z][g ? e : t];
|
|
21
|
+
return I = P[1] = L && M === 1 ? g ? s : "kB" : q[M], V && (P[0] = -P[0]), w[P[1]] && (P[1] = w[P[1]]), P[0] = u(P[0], b, x, S, _, y), B && (P[1] = O[M] || l.fullform[z][M] + (g ? "bit" : "byte") + (P[0] === 1 ? "" : "s")), E === "array" ? P : E === "object" ? {
|
|
22
|
+
value: P[0],
|
|
23
|
+
symbol: P[1],
|
|
24
|
+
exponent: M,
|
|
25
|
+
unit: I
|
|
26
|
+
} : C === " " ? `${P[0]} ${P[1]}` : P.join(C);
|
|
27
|
+
}
|
|
28
|
+
function g({ bits: e = !1, pad: t = !1, base: n = -1, round: r = 2, locale: i = "", localeOptions: a = {}, separator: s = "", spacer: l = " ", symbols: u = {}, standard: d = "", output: f = c, fullform: p = !1, fullforms: m = [], exponent: g = -1, roundingMethod: _ = o, precision: v = 0 } = {}) {
|
|
29
|
+
return (o) => h(o, {
|
|
30
|
+
bits: e,
|
|
31
|
+
pad: t,
|
|
32
|
+
base: n,
|
|
33
|
+
round: r,
|
|
34
|
+
locale: i,
|
|
35
|
+
localeOptions: a,
|
|
36
|
+
separator: s,
|
|
37
|
+
spacer: l,
|
|
38
|
+
symbols: u,
|
|
39
|
+
standard: d,
|
|
40
|
+
output: f,
|
|
41
|
+
fullform: p,
|
|
42
|
+
fullforms: m,
|
|
43
|
+
exponent: g,
|
|
44
|
+
roundingMethod: _,
|
|
45
|
+
precision: v
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { h as filesize, g as partial };
|
|
50
|
+
/* 独立思考,明辨是非 */
|
|
@@ -15,9 +15,10 @@ export function getBaseConfiguration(standard: string, base: number): Object;
|
|
|
15
15
|
* @param {Array} fullforms - Custom full forms
|
|
16
16
|
* @param {string} output - Output format
|
|
17
17
|
* @param {string} spacer - Spacer character
|
|
18
|
+
* @param {string} [symbol] - Symbol to use (defaults based on bits/standard)
|
|
18
19
|
* @returns {string|Array|Object|number} Formatted result
|
|
19
20
|
*/
|
|
20
|
-
export function handleZeroValue(precision: number, actualStandard: string, bits: boolean, symbols: Object, full: boolean, fullforms: any[], output: string, spacer: string): string | any[] | Object | number;
|
|
21
|
+
export function handleZeroValue(precision: number, actualStandard: string, bits: boolean, symbols: Object, full: boolean, fullforms: any[], output: string, spacer: string, symbol?: string): string | any[] | Object | number;
|
|
21
22
|
/**
|
|
22
23
|
* Optimized value calculation with bits handling
|
|
23
24
|
* @param {number} num - Input number
|
|
@@ -25,9 +26,10 @@ export function handleZeroValue(precision: number, actualStandard: string, bits:
|
|
|
25
26
|
* @param {boolean} isDecimal - Whether to use decimal powers
|
|
26
27
|
* @param {boolean} bits - Whether to calculate bits
|
|
27
28
|
* @param {number} ceil - Ceiling value for auto-increment
|
|
28
|
-
* @
|
|
29
|
+
* @param {boolean} autoExponent - Whether exponent is auto (-1 or NaN)
|
|
30
|
+
* @returns {Object} Object with result and e properties
|
|
29
31
|
*/
|
|
30
|
-
export function calculateOptimizedValue(num: number, e: number, isDecimal: boolean, bits: boolean, ceil: number): Object;
|
|
32
|
+
export function calculateOptimizedValue(num: number, e: number, isDecimal: boolean, bits: boolean, ceil: number, autoExponent?: boolean): Object;
|
|
31
33
|
/**
|
|
32
34
|
* Optimized precision handling with scientific notation correction
|
|
33
35
|
* @param {number} value - Current value
|
|
@@ -39,9 +41,10 @@ export function calculateOptimizedValue(num: number, e: number, isDecimal: boole
|
|
|
39
41
|
* @param {number} ceil - Ceiling value
|
|
40
42
|
* @param {Function} roundingFunc - Rounding function
|
|
41
43
|
* @param {number} round - Round value
|
|
44
|
+
* @param {number} exponent - Forced exponent (-1 for auto)
|
|
42
45
|
* @returns {Object} Object with value and e properties
|
|
43
46
|
*/
|
|
44
|
-
export function applyPrecisionHandling(value: number, precision: number, e: number, num: number, isDecimal: boolean, bits: boolean, ceil: number, roundingFunc: Function, round: number): Object;
|
|
47
|
+
export function applyPrecisionHandling(value: number, precision: number, e: number, num: number, isDecimal: boolean, bits: boolean, ceil: number, roundingFunc: Function, round: number, exponent: number): Object;
|
|
45
48
|
/**
|
|
46
49
|
* Optimized number formatting with locale, separator, and padding
|
|
47
50
|
* @param {number|string} value - Value to format
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { BINARY_POWERS as e, DECIMAL_POWERS as t, JEDEC as n, STRINGS as r } from "./constants.js";
|
|
3
|
+
//#region utils/filesize/helpers.js
|
|
4
|
+
var i = {
|
|
5
|
+
si: {
|
|
6
|
+
isDecimal: !0,
|
|
7
|
+
ceil: 1e3,
|
|
8
|
+
actualStandard: n
|
|
9
|
+
},
|
|
10
|
+
iec: {
|
|
11
|
+
isDecimal: !1,
|
|
12
|
+
ceil: 1024,
|
|
13
|
+
actualStandard: "iec"
|
|
14
|
+
},
|
|
15
|
+
[n]: {
|
|
16
|
+
isDecimal: !1,
|
|
17
|
+
ceil: 1024,
|
|
18
|
+
actualStandard: n
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function a(e, t) {
|
|
22
|
+
return i[e] ? i[e] : t === 2 ? {
|
|
23
|
+
isDecimal: !1,
|
|
24
|
+
ceil: 1024,
|
|
25
|
+
actualStandard: "iec"
|
|
26
|
+
} : {
|
|
27
|
+
isDecimal: !0,
|
|
28
|
+
ceil: 1e3,
|
|
29
|
+
actualStandard: n
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function o(e, t, n, i, a, o, s, c, l) {
|
|
33
|
+
let u = e > 0 ? 0 .toPrecision(e) : 0;
|
|
34
|
+
return s === "exponent" ? 0 : (l ||= n ? r.symbol[t].bits[0] : r.symbol[t].bytes[0], i[l] && (l = i[l]), a && (l = o[0] || r.fullform[t][0] + (n ? "bit" : "byte")), s === "array" ? [u, l] : s === "object" ? {
|
|
35
|
+
value: u,
|
|
36
|
+
symbol: l,
|
|
37
|
+
exponent: 0,
|
|
38
|
+
unit: l
|
|
39
|
+
} : u + c + l);
|
|
40
|
+
}
|
|
41
|
+
function s(n, r, i, a, o, s = !0) {
|
|
42
|
+
let c = n / (i ? t[r] : e[r]);
|
|
43
|
+
return a && (c *= 8, s && c >= o && r < 8 && (c /= o, r++)), {
|
|
44
|
+
result: c,
|
|
45
|
+
e: r
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function c(e, t, n, r, i, a, o, c, l, u) {
|
|
49
|
+
let d = e.toPrecision(t), f = u === -1 || isNaN(u);
|
|
50
|
+
if (d.includes("e") && n < 8 && f) {
|
|
51
|
+
n++;
|
|
52
|
+
let { result: e } = s(r, n, i, a, o), u = l > 0 ? 10 ** l : 1;
|
|
53
|
+
d = (u === 1 ? c(e) : c(e * u) / u).toPrecision(t);
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
value: d,
|
|
57
|
+
e: n
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function l(e, t, n, r, i, a) {
|
|
61
|
+
let o = e;
|
|
62
|
+
if (t === !0 ? o = o.toLocaleString() : t.length > 0 ? o = o.toLocaleString(t, n) : r.length > 0 && (o = o.toString().replace(".", r)), i && a > 0) {
|
|
63
|
+
let e = o.toString(), t = r || (e.slice(1).match(/[.,]/g) || []).pop() || ".", n = e.split(t), i = n[1] || "", s = i.length, c = a - s;
|
|
64
|
+
o = `${n[0]}${t}${i.padEnd(s + c, "0")}`;
|
|
65
|
+
}
|
|
66
|
+
return o;
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { l as applyNumberFormatting, c as applyPrecisionHandling, s as calculateOptimizedValue, a as getBaseConfiguration, o as handleZeroValue };
|
|
70
|
+
/* 独立思考,明辨是非 */
|