umt 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/module/Advance/rangeAdvance.d.ts +10 -6
- package/module/Advance/rangeAdvance.js +10 -6
- package/module/Advance/rangeAdvance.js.map +1 -1
- package/module/Array/arraysJoin.d.ts +4 -4
- package/module/Array/arraysJoin.js +4 -4
- package/module/Array/binarySearch.d.ts +4 -3
- package/module/Array/binarySearch.js +4 -3
- package/module/Array/binarySearch.js.map +1 -1
- package/module/Array/checkFlagAlignment.d.ts +3 -3
- package/module/Array/checkFlagAlignment.js +7 -7
- package/module/Array/checkFlagAlignment.js.map +1 -1
- package/module/Array/chunk.d.ts +4 -4
- package/module/Array/compact.d.ts +8 -0
- package/module/Array/compact.js +8 -0
- package/module/Array/compact.js.map +1 -1
- package/module/Array/compareFunctionDefault.d.ts +13 -0
- package/module/Array/compareFunctionDefault.js +13 -0
- package/module/Array/compareFunctionDefault.js.map +1 -1
- package/module/Array/drop.d.ts +5 -5
- package/module/Array/drop.js +5 -5
- package/module/Array/dualPivotQuickSort.d.ts +16 -0
- package/module/Array/dualPivotQuickSort.js +152 -0
- package/module/Array/dualPivotQuickSort.js.map +1 -0
- package/module/Array/first.d.ts +3 -3
- package/module/Array/first.js +3 -3
- package/module/Array/generateNumberArray.d.ts +6 -6
- package/module/Array/generateNumberArray.js +6 -6
- package/module/Array/getArraysCommon.d.ts +4 -4
- package/module/Array/getArraysCommon.js +4 -4
- package/module/Array/getArraysDiff.d.ts +4 -4
- package/module/Array/getArraysDiff.js +4 -4
- package/module/Array/groupBy.d.ts +8 -4
- package/module/Array/groupBy.js +8 -4
- package/module/Array/groupBy.js.map +1 -1
- package/module/Array/index.d.ts +1 -0
- package/module/Array/index.js +1 -0
- package/module/Array/index.js.map +1 -1
- package/module/Array/insertionSort.d.ts +8 -7
- package/module/Array/insertionSort.js +6 -6
- package/module/Array/insertionSort.js.map +1 -1
- package/module/Array/mergeSort.d.ts +6 -5
- package/module/Array/mergeSort.js +9 -9
- package/module/Array/mergeSort.js.map +1 -1
- package/module/Array/quickSort.d.ts +12 -11
- package/module/Array/quickSort.js +44 -10
- package/module/Array/quickSort.js.map +1 -1
- package/module/Array/randomSelect.d.ts +5 -5
- package/module/Array/randomSelect.js +5 -5
- package/module/Array/range.d.ts +5 -5
- package/module/Array/range.js +26 -10
- package/module/Array/range.js.map +1 -1
- package/module/Array/shuffle.d.ts +3 -3
- package/module/Array/shuffle.js +3 -3
- package/module/Array/shuffle2DArray.d.ts +4 -4
- package/module/Array/shuffle2DArray.js +6 -6
- package/module/Array/shuffle2DArray.js.map +1 -1
- package/module/Array/sum.d.ts +3 -3
- package/module/Array/sum.js +4 -4
- package/module/Array/sum.js.map +1 -1
- package/module/Array/timSort.d.ts +13 -11
- package/module/Array/timSort.js +33 -9
- package/module/Array/timSort.js.map +1 -1
- package/module/Array/zip.d.ts +6 -3
- package/module/Array/zip.js +6 -3
- package/module/Array/zip.js.map +1 -1
- package/module/Array/zipLongest.d.ts +8 -5
- package/module/Array/zipLongest.js +8 -5
- package/module/Array/zipLongest.js.map +1 -1
- package/module/Color/cmykToRgba.d.ts +7 -7
- package/module/Color/cmykToRgba.js +12 -12
- package/module/Color/cmykToRgba.js.map +1 -1
- package/module/Color/hexaToRgba.d.ts +4 -3
- package/module/Color/hexaToRgba.js +18 -7
- package/module/Color/hexaToRgba.js.map +1 -1
- package/module/Color/hslaToRgba.d.ts +7 -6
- package/module/Color/hslaToRgba.js +19 -15
- package/module/Color/hslaToRgba.js.map +1 -1
- package/module/Color/rgbaToCmyk.d.ts +3 -3
- package/module/Color/rgbaToCmyk.js +14 -3
- package/module/Color/rgbaToCmyk.js.map +1 -1
- package/module/Color/rgbaToHexA.d.ts +4 -4
- package/module/Color/rgbaToHexA.js +5 -5
- package/module/Color/rgbaToHexA.js.map +1 -1
- package/module/Color/rgbaToHsla.d.ts +4 -3
- package/module/Color/rgbaToHsla.js +15 -3
- package/module/Color/rgbaToHsla.js.map +1 -1
- package/module/Consts/clock.d.ts +11 -11
- package/module/Consts/clock.js +11 -11
- package/module/Consts/httpStatus/httpClientErrorStatus.d.ts +28 -0
- package/module/Consts/httpStatus/httpClientErrorStatus.js +28 -0
- package/module/Consts/httpStatus/httpClientErrorStatus.js.map +1 -1
- package/module/Consts/httpStatus/httpInformationalStatus.d.ts +9 -0
- package/module/Consts/httpStatus/httpInformationalStatus.js +9 -0
- package/module/Consts/httpStatus/httpInformationalStatus.js.map +1 -1
- package/module/Consts/httpStatus/httpRedirectionStatus.d.ts +11 -0
- package/module/Consts/httpStatus/httpRedirectionStatus.js +11 -0
- package/module/Consts/httpStatus/httpRedirectionStatus.js.map +1 -1
- package/module/Consts/httpStatus/httpServerErrorStatus.d.ts +10 -0
- package/module/Consts/httpStatus/httpServerErrorStatus.js +10 -0
- package/module/Consts/httpStatus/httpServerErrorStatus.js.map +1 -1
- package/module/Consts/httpStatus/httpSuccessStatus.d.ts +11 -0
- package/module/Consts/httpStatus/httpSuccessStatus.js +11 -0
- package/module/Consts/httpStatus/httpSuccessStatus.js.map +1 -1
- package/module/Date/birthday.d.ts +7 -6
- package/module/Date/birthday.js +7 -6
- package/module/Date/birthday.js.map +1 -1
- package/module/Date/dateRange.d.ts +7 -4
- package/module/Date/dateRange.js +7 -4
- package/module/Date/dateRange.js.map +1 -1
- package/module/Date/dayOfWeek.d.ts +4 -4
- package/module/Date/dayOfWeek.js +4 -4
- package/module/Date/format.d.ts +30 -4
- package/module/Date/format.js +30 -4
- package/module/Date/format.js.map +1 -1
- package/module/Date/getDay.d.ts +8 -5
- package/module/Date/getDay.js +8 -5
- package/module/Date/getDay.js.map +1 -1
- package/module/Date/getTimezoneOffsetString.d.ts +3 -3
- package/module/Date/getTimezoneOffsetString.js +3 -3
- package/module/Date/isLeapYear.d.ts +8 -3
- package/module/Date/isLeapYear.js +8 -3
- package/module/Date/isLeapYear.js.map +1 -1
- package/module/Date/new.d.ts +20 -20
- package/module/Date/new.js +21 -21
- package/module/Date/new.js.map +1 -1
- package/module/Date/now.d.ts +7 -4
- package/module/Date/now.js +7 -4
- package/module/Date/now.js.map +1 -1
- package/module/Error/safeExecute.d.ts +21 -0
- package/module/Error/safeExecute.js +20 -0
- package/module/Error/safeExecute.js.map +1 -1
- package/module/IP/cidrToLong.d.ts +4 -3
- package/module/IP/cidrToLong.js +10 -4
- package/module/IP/cidrToLong.js.map +1 -1
- package/module/IP/cidrToSubnetMask.d.ts +4 -3
- package/module/IP/cidrToSubnetMask.js +4 -3
- package/module/IP/cidrToSubnetMask.js.map +1 -1
- package/module/IP/getIpClass.d.ts +3 -3
- package/module/IP/getIpClass.js +30 -18
- package/module/IP/getIpClass.js.map +1 -1
- package/module/IP/getNetworkAddress.d.ts +5 -4
- package/module/IP/getNetworkAddress.js +36 -6
- package/module/IP/getNetworkAddress.js.map +1 -1
- package/module/IP/ipToBinaryString.d.ts +4 -3
- package/module/IP/ipToBinaryString.js +32 -7
- package/module/IP/ipToBinaryString.js.map +1 -1
- package/module/IP/ipToLong.d.ts +4 -3
- package/module/IP/ipToLong.js +4 -3
- package/module/IP/ipToLong.js.map +1 -1
- package/module/IP/isInRange.d.ts +6 -5
- package/module/IP/isInRange.js +33 -7
- package/module/IP/isInRange.js.map +1 -1
- package/module/IP/isPrivateIp.d.ts +4 -3
- package/module/IP/isPrivateIp.js +17 -9
- package/module/IP/isPrivateIp.js.map +1 -1
- package/module/IP/longToIp.d.ts +4 -3
- package/module/IP/longToIp.js +16 -4
- package/module/IP/longToIp.js.map +1 -1
- package/module/IP/subnetMaskToCidr.d.ts +4 -3
- package/module/IP/subnetMaskToCidr.js +28 -12
- package/module/IP/subnetMaskToCidr.js.map +1 -1
- package/module/Math/addition.d.ts +3 -3
- package/module/Math/addition.js +3 -3
- package/module/Math/average.d.ts +7 -4
- package/module/Math/average.js +7 -4
- package/module/Math/average.js.map +1 -1
- package/module/Math/bitwise.d.ts +5 -5
- package/module/Math/bitwise.js +5 -5
- package/module/Math/calculator/calculator.d.ts +9 -7
- package/module/Math/calculator/calculator.js +9 -7
- package/module/Math/calculator/calculator.js.map +1 -1
- package/module/Math/calculator/calculatorInitialization.d.ts +4 -3
- package/module/Math/calculator/calculatorInitialization.js +6 -5
- package/module/Math/calculator/calculatorInitialization.js.map +1 -1
- package/module/Math/calculator/convertCurrency.d.ts +6 -4
- package/module/Math/calculator/convertCurrency.js +6 -4
- package/module/Math/calculator/convertCurrency.js.map +1 -1
- package/module/Math/calculator/core.js +13 -13
- package/module/Math/calculator/core.js.map +1 -1
- package/module/Math/calculator/literalExpression.d.ts +5 -3
- package/module/Math/calculator/literalExpression.js +12 -10
- package/module/Math/calculator/literalExpression.js.map +1 -1
- package/module/Math/degToRad.d.ts +3 -3
- package/module/Math/degToRad.js +3 -3
- package/module/Math/deviationValue.d.ts +5 -5
- package/module/Math/deviationValue.js +5 -5
- package/module/Math/division.d.ts +5 -5
- package/module/Math/division.js +31 -21
- package/module/Math/division.js.map +1 -1
- package/module/Math/factorial.d.ts +3 -3
- package/module/Math/factorial.js +3 -3
- package/module/Math/factorize.d.ts +3 -3
- package/module/Math/factorize.js +3 -3
- package/module/Math/flexibleNumberConversion.d.ts +11 -11
- package/module/Math/flexibleNumberConversion.js +19 -19
- package/module/Math/flexibleNumberConversion.js.map +1 -1
- package/module/Math/gcd.d.ts +5 -5
- package/module/Math/gcd.js +6 -6
- package/module/Math/gcd.js.map +1 -1
- package/module/Math/getDecimalLength.d.ts +7 -4
- package/module/Math/getDecimalLength.js +9 -5
- package/module/Math/getDecimalLength.js.map +1 -1
- package/module/Math/lcm.d.ts +4 -4
- package/module/Math/lcm.js +5 -5
- package/module/Math/lcm.js.map +1 -1
- package/module/Math/linearCongruentialGenerator.d.ts +6 -6
- package/module/Math/linearCongruentialGenerator.js +6 -6
- package/module/Math/mathConverter.d.ts +7 -3
- package/module/Math/mathConverter.js +7 -3
- package/module/Math/mathConverter.js.map +1 -1
- package/module/Math/mathSeparator.d.ts +8 -3
- package/module/Math/mathSeparator.js +8 -3
- package/module/Math/mathSeparator.js.map +1 -1
- package/module/Math/max.d.ts +4 -3
- package/module/Math/max.js +4 -3
- package/module/Math/max.js.map +1 -1
- package/module/Math/median.d.ts +3 -3
- package/module/Math/median.js +3 -3
- package/module/Math/min.d.ts +4 -3
- package/module/Math/min.js +4 -3
- package/module/Math/min.js.map +1 -1
- package/module/Math/multiples.d.ts +4 -4
- package/module/Math/multiples.js +4 -4
- package/module/Math/multiplication.d.ts +3 -3
- package/module/Math/multiplication.js +3 -3
- package/module/Math/nCr.d.ts +7 -4
- package/module/Math/nCr.js +7 -4
- package/module/Math/nCr.js.map +1 -1
- package/module/Math/nHr.d.ts +7 -4
- package/module/Math/nHr.js +7 -4
- package/module/Math/nHr.js.map +1 -1
- package/module/Math/nPr.d.ts +7 -4
- package/module/Math/nPr.js +7 -4
- package/module/Math/nPr.js.map +1 -1
- package/module/Math/primeFactorization.d.ts +6 -3
- package/module/Math/primeFactorization.js +11 -8
- package/module/Math/primeFactorization.js.map +1 -1
- package/module/Math/quotient.d.ts +7 -4
- package/module/Math/quotient.js +7 -4
- package/module/Math/quotient.js.map +1 -1
- package/module/Math/radToDeg.d.ts +5 -3
- package/module/Math/radToDeg.js +5 -3
- package/module/Math/radToDeg.js.map +1 -1
- package/module/Math/random.d.ts +6 -5
- package/module/Math/random.js +6 -5
- package/module/Math/random.js.map +1 -1
- package/module/Math/reduce.d.ts +9 -4
- package/module/Math/reduce.js +16 -6
- package/module/Math/reduce.js.map +1 -1
- package/module/Math/repeatedTrial.d.ts +5 -5
- package/module/Math/repeatedTrial.js +5 -5
- package/module/Math/roundOf.d.ts +7 -5
- package/module/Math/roundOf.js +8 -6
- package/module/Math/roundOf.js.map +1 -1
- package/module/Math/solveEquation.d.ts +12 -13
- package/module/Math/solveEquation.js +32 -37
- package/module/Math/solveEquation.js.map +1 -1
- package/module/Math/standardDeviation.d.ts +8 -3
- package/module/Math/standardDeviation.js +13 -7
- package/module/Math/standardDeviation.js.map +1 -1
- package/module/Math/subtract.d.ts +10 -4
- package/module/Math/subtract.js +12 -6
- package/module/Math/subtract.js.map +1 -1
- package/module/Math/toBaseN.d.ts +8 -6
- package/module/Math/toBaseN.js +9 -7
- package/module/Math/toBaseN.js.map +1 -1
- package/module/Math/toCelsius.d.ts +5 -3
- package/module/Math/toCelsius.js +5 -3
- package/module/Math/toCelsius.js.map +1 -1
- package/module/Math/toKelvin.d.ts +5 -3
- package/module/Math/toKelvin.js +5 -3
- package/module/Math/toKelvin.js.map +1 -1
- package/module/Math/uuidv7.d.ts +10 -2
- package/module/Math/uuidv7.js +10 -2
- package/module/Math/uuidv7.js.map +1 -1
- package/module/Math/valueSwap.d.ts +5 -4
- package/module/Math/valueSwap.js +5 -4
- package/module/Math/valueSwap.js.map +1 -1
- package/module/Math/xoshiro256.d.ts +8 -3
- package/module/Math/xoshiro256.js +8 -3
- package/module/Math/xoshiro256.js.map +1 -1
- package/module/Object/has.d.ts +4 -4
- package/module/Object/has.js +4 -4
- package/module/Object/keyBy.d.ts +3 -3
- package/module/Object/keyBy.js +4 -4
- package/module/Object/pick.d.ts +6 -6
- package/module/Object/pick.js +6 -6
- package/module/Object/pickDeep.d.ts +7 -7
- package/module/Object/pickDeep.js +7 -7
- package/module/Simple/Array/quickSortSimple.d.ts +9 -7
- package/module/Simple/Array/quickSortSimple.js +7 -6
- package/module/Simple/Array/quickSortSimple.js.map +1 -1
- package/module/Simple/Date/birthdaySimple.d.ts +4 -4
- package/module/Simple/Date/birthdaySimple.js +4 -4
- package/module/Simple/Date/dayOfWeekSimple.d.ts +4 -4
- package/module/Simple/Date/nowSimple.d.ts +3 -3
- package/module/Simple/Date/nowSimple.js +3 -3
- package/module/Simple/Math/deviationValueSimple.d.ts +10 -11
- package/module/Simple/Math/deviationValueSimple.js +14 -13
- package/module/Simple/Math/deviationValueSimple.js.map +1 -1
- package/module/String/deleteSpaces.d.ts +8 -4
- package/module/String/deleteSpaces.js +8 -4
- package/module/String/deleteSpaces.js.map +1 -1
- package/module/String/formatString.d.ts +8 -8
- package/module/String/formatString.js +7 -7
- package/module/String/formatString.js.map +1 -1
- package/module/String/fromBase64.d.ts +4 -3
- package/module/String/fromBase64.js +15 -9
- package/module/String/fromBase64.js.map +1 -1
- package/module/String/hasNoLetters.d.ts +9 -3
- package/module/String/hasNoLetters.js +12 -6
- package/module/String/hasNoLetters.js.map +1 -1
- package/module/String/padEnd.d.ts +5 -5
- package/module/String/padEnd.js +5 -5
- package/module/String/padStart.d.ts +11 -5
- package/module/String/padStart.js +17 -5
- package/module/String/padStart.js.map +1 -1
- package/module/String/randomString.d.ts +4 -4
- package/module/String/randomString.js +4 -4
- package/module/String/randomStringInitialization.d.ts +3 -3
- package/module/String/randomStringInitialization.js +3 -3
- package/module/String/reverseString.d.ts +3 -3
- package/module/String/reverseString.js +3 -3
- package/module/String/toBase64.d.ts +3 -3
- package/module/String/toBase64.js +3 -3
- package/module/String/toHalfWidth.d.ts +3 -3
- package/module/String/toHalfWidth.js +3 -3
- package/module/String/trimCharacters.d.ts +4 -4
- package/module/String/trimCharacters.js +4 -4
- package/module/String/trimEndCharacters.d.ts +10 -4
- package/module/String/trimEndCharacters.js +10 -4
- package/module/String/trimEndCharacters.js.map +1 -1
- package/module/String/trimStartCharacters.d.ts +10 -4
- package/module/String/trimStartCharacters.js +10 -4
- package/module/String/trimStartCharacters.js.map +1 -1
- package/module/Time/convertTime.d.ts +6 -6
- package/module/Time/convertTime.js +12 -11
- package/module/Time/convertTime.js.map +1 -1
- package/module/Tool/createPipeline.d.ts +8 -6
- package/module/Tool/createPipeline.js +6 -5
- package/module/Tool/createPipeline.js.map +1 -1
- package/module/Tool/parseJson.d.ts +7 -0
- package/module/Tool/parseJson.js +7 -0
- package/module/Tool/parseJson.js.map +1 -1
- package/module/UA/extractBrowserFromUserAgent.d.ts +12 -0
- package/module/UA/extractBrowserFromUserAgent.js +22 -5
- package/module/UA/extractBrowserFromUserAgent.js.map +1 -1
- package/module/UA/extractDeviceFromUserAgent.d.ts +12 -0
- package/module/UA/extractDeviceFromUserAgent.js +12 -0
- package/module/UA/extractDeviceFromUserAgent.js.map +1 -1
- package/module/UA/extractOsFromUserAgent.d.ts +12 -0
- package/module/UA/extractOsFromUserAgent.js +12 -0
- package/module/UA/extractOsFromUserAgent.js.map +1 -1
- package/module/UA/parseUserAgent.d.ts +16 -0
- package/module/UA/parseUserAgent.js +16 -0
- package/module/UA/parseUserAgent.js.map +1 -1
- package/module/Unit/unitConverterInitialization.d.ts +15 -0
- package/module/Unit/unitConverterInitialization.js +15 -0
- package/module/Unit/unitConverterInitialization.js.map +1 -1
- package/module/Validate/array/core.d.ts +12 -0
- package/module/Validate/array/core.js +15 -3
- package/module/Validate/array/core.js.map +1 -1
- package/module/Validate/boolean/core.d.ts +9 -0
- package/module/Validate/boolean/core.js +9 -0
- package/module/Validate/boolean/core.js.map +1 -1
- package/module/Validate/core/index.d.ts +10 -0
- package/module/Validate/core/index.js +11 -1
- package/module/Validate/core/index.js.map +1 -1
- package/module/Validate/isArray.d.ts +3 -3
- package/module/Validate/isArray.js +3 -3
- package/module/Validate/isBrowser.d.ts +1 -1
- package/module/Validate/isBrowser.js +1 -1
- package/module/Validate/isBun.d.ts +1 -1
- package/module/Validate/isBun.js +1 -1
- package/module/Validate/isDictionaryObject.d.ts +3 -3
- package/module/Validate/isDictionaryObject.js +3 -3
- package/module/Validate/isDouble.d.ts +4 -4
- package/module/Validate/isDouble.js +4 -4
- package/module/Validate/isNode.d.ts +1 -1
- package/module/Validate/isNode.js +1 -1
- package/module/Validate/isNodeWebkit.d.ts +1 -1
- package/module/Validate/isNodeWebkit.js +1 -1
- package/module/Validate/isNotEmpty.d.ts +3 -3
- package/module/Validate/isNotEmpty.js +4 -4
- package/module/Validate/isNotEmpty.js.map +1 -1
- package/module/Validate/isNumber.d.ts +4 -4
- package/module/Validate/isNumber.js +10 -4
- package/module/Validate/isNumber.js.map +1 -1
- package/module/Validate/isPerfectSquare.d.ts +8 -3
- package/module/Validate/isPerfectSquare.js +8 -3
- package/module/Validate/isPerfectSquare.js.map +1 -1
- package/module/Validate/isPrimeNumber.d.ts +7 -3
- package/module/Validate/isPrimeNumber.js +8 -4
- package/module/Validate/isPrimeNumber.js.map +1 -1
- package/module/Validate/isValueNaN.d.ts +7 -5
- package/module/Validate/isValueNaN.js +7 -5
- package/module/Validate/isValueNaN.js.map +1 -1
- package/module/Validate/number/core.d.ts +11 -0
- package/module/Validate/number/core.js +11 -0
- package/module/Validate/number/core.js.map +1 -1
- package/module/Validate/number/double.d.ts +9 -0
- package/module/Validate/number/double.js +9 -0
- package/module/Validate/number/double.js.map +1 -1
- package/module/Validate/number/even.d.ts +9 -0
- package/module/Validate/number/even.js +9 -0
- package/module/Validate/number/even.js.map +1 -1
- package/module/Validate/number/maxValue.d.ts +10 -0
- package/module/Validate/number/maxValue.js +10 -0
- package/module/Validate/number/maxValue.js.map +1 -1
- package/module/Validate/number/minValue.d.ts +10 -0
- package/module/Validate/number/minValue.js +10 -0
- package/module/Validate/number/minValue.js.map +1 -1
- package/module/Validate/number/prime.d.ts +9 -0
- package/module/Validate/number/prime.js +9 -0
- package/module/Validate/number/prime.js.map +1 -1
- package/module/Validate/object/core.d.ts +11 -0
- package/module/Validate/object/core.js +11 -0
- package/module/Validate/object/core.js.map +1 -1
- package/module/Validate/string/core.d.ts +11 -0
- package/module/Validate/string/core.js +11 -0
- package/module/Validate/string/core.js.map +1 -1
- package/module/Validate/string/email.d.ts +9 -0
- package/module/Validate/string/email.js +10 -1
- package/module/Validate/string/email.js.map +1 -1
- package/module/Validate/string/length.d.ts +11 -0
- package/module/Validate/string/length.js +11 -0
- package/module/Validate/string/length.js.map +1 -1
- package/module/Validate/string/maxLength.d.ts +10 -0
- package/module/Validate/string/maxLength.js +10 -0
- package/module/Validate/string/maxLength.js.map +1 -1
- package/module/Validate/string/minLength.d.ts +10 -0
- package/module/Validate/string/minLength.js +10 -0
- package/module/Validate/string/minLength.js.map +1 -1
- package/module/Validate/string/numberString.d.ts +9 -0
- package/module/Validate/string/numberString.js +9 -0
- package/module/Validate/string/numberString.js.map +1 -1
- package/module/Validate/string/regexMatch.d.ts +10 -0
- package/module/Validate/string/regexMatch.js +10 -0
- package/module/Validate/string/regexMatch.js.map +1 -1
- package/module/Validate/string/uuid.d.ts +8 -3
- package/module/Validate/string/uuid.js +9 -4
- package/module/Validate/string/uuid.js.map +1 -1
- package/module/Validate/type.d.ts +22 -0
- package/module/es5/Advance/rangeAdvance.d.ts +10 -6
- package/module/es5/Advance/rangeAdvance.js +10 -6
- package/module/es5/Array/arraysJoin.d.ts +4 -4
- package/module/es5/Array/arraysJoin.js +4 -4
- package/module/es5/Array/binarySearch.d.ts +4 -3
- package/module/es5/Array/binarySearch.js +4 -3
- package/module/es5/Array/checkFlagAlignment.d.ts +3 -3
- package/module/es5/Array/checkFlagAlignment.js +7 -7
- package/module/es5/Array/chunk.d.ts +4 -4
- package/module/es5/Array/chunk.js +4 -4
- package/module/es5/Array/compact.d.ts +8 -0
- package/module/es5/Array/compact.js +8 -0
- package/module/es5/Array/compareFunctionDefault.d.ts +13 -0
- package/module/es5/Array/compareFunctionDefault.js +13 -0
- package/module/es5/Array/drop.d.ts +5 -5
- package/module/es5/Array/drop.js +5 -5
- package/module/es5/Array/dualPivotQuickSort.d.ts +16 -0
- package/module/es5/Array/dualPivotQuickSort.js +201 -0
- package/module/es5/Array/first.d.ts +3 -3
- package/module/es5/Array/first.js +3 -3
- package/module/es5/Array/generateNumberArray.d.ts +6 -6
- package/module/es5/Array/generateNumberArray.js +6 -6
- package/module/es5/Array/getArraysCommon.d.ts +4 -4
- package/module/es5/Array/getArraysCommon.js +4 -4
- package/module/es5/Array/getArraysDiff.d.ts +4 -4
- package/module/es5/Array/getArraysDiff.js +4 -4
- package/module/es5/Array/groupBy.d.ts +8 -4
- package/module/es5/Array/groupBy.js +8 -4
- package/module/es5/Array/index.d.ts +1 -0
- package/module/es5/Array/index.js +11 -0
- package/module/es5/Array/insertionSort.d.ts +8 -7
- package/module/es5/Array/insertionSort.js +6 -6
- package/module/es5/Array/mergeSort.d.ts +6 -5
- package/module/es5/Array/mergeSort.js +9 -9
- package/module/es5/Array/quickSort.d.ts +12 -11
- package/module/es5/Array/quickSort.js +47 -10
- package/module/es5/Array/randomSelect.d.ts +5 -5
- package/module/es5/Array/randomSelect.js +5 -5
- package/module/es5/Array/range.d.ts +5 -5
- package/module/es5/Array/range.js +28 -10
- package/module/es5/Array/shuffle.d.ts +3 -3
- package/module/es5/Array/shuffle.js +3 -3
- package/module/es5/Array/shuffle2DArray.d.ts +4 -4
- package/module/es5/Array/shuffle2DArray.js +6 -6
- package/module/es5/Array/sum.d.ts +3 -3
- package/module/es5/Array/sum.js +4 -4
- package/module/es5/Array/timSort.d.ts +13 -11
- package/module/es5/Array/timSort.js +36 -9
- package/module/es5/Array/zip.d.ts +6 -3
- package/module/es5/Array/zip.js +6 -3
- package/module/es5/Array/zipLongest.d.ts +8 -5
- package/module/es5/Array/zipLongest.js +8 -5
- package/module/es5/Color/cmykToRgba.d.ts +7 -7
- package/module/es5/Color/cmykToRgba.js +12 -12
- package/module/es5/Color/hexaToRgba.d.ts +4 -3
- package/module/es5/Color/hexaToRgba.js +18 -6
- package/module/es5/Color/hslaToRgba.d.ts +7 -6
- package/module/es5/Color/hslaToRgba.js +19 -13
- package/module/es5/Color/rgbaToCmyk.d.ts +3 -3
- package/module/es5/Color/rgbaToCmyk.js +7 -3
- package/module/es5/Color/rgbaToHexA.d.ts +4 -4
- package/module/es5/Color/rgbaToHexA.js +5 -5
- package/module/es5/Color/rgbaToHsla.d.ts +4 -3
- package/module/es5/Color/rgbaToHsla.js +8 -3
- package/module/es5/Consts/clock.d.ts +11 -11
- package/module/es5/Consts/clock.js +11 -11
- package/module/es5/Consts/httpStatus/httpClientErrorStatus.d.ts +28 -0
- package/module/es5/Consts/httpStatus/httpClientErrorStatus.js +28 -0
- package/module/es5/Consts/httpStatus/httpInformationalStatus.d.ts +9 -0
- package/module/es5/Consts/httpStatus/httpInformationalStatus.js +9 -0
- package/module/es5/Consts/httpStatus/httpRedirectionStatus.d.ts +11 -0
- package/module/es5/Consts/httpStatus/httpRedirectionStatus.js +11 -0
- package/module/es5/Consts/httpStatus/httpServerErrorStatus.d.ts +10 -0
- package/module/es5/Consts/httpStatus/httpServerErrorStatus.js +10 -0
- package/module/es5/Consts/httpStatus/httpSuccessStatus.d.ts +11 -0
- package/module/es5/Consts/httpStatus/httpSuccessStatus.js +11 -0
- package/module/es5/Date/birthday.d.ts +7 -6
- package/module/es5/Date/birthday.js +7 -6
- package/module/es5/Date/dateRange.d.ts +7 -4
- package/module/es5/Date/dateRange.js +7 -4
- package/module/es5/Date/dayOfWeek.d.ts +4 -4
- package/module/es5/Date/dayOfWeek.js +4 -4
- package/module/es5/Date/format.d.ts +30 -4
- package/module/es5/Date/format.js +30 -4
- package/module/es5/Date/getDay.d.ts +8 -5
- package/module/es5/Date/getDay.js +8 -5
- package/module/es5/Date/getTimezoneOffsetString.d.ts +3 -3
- package/module/es5/Date/getTimezoneOffsetString.js +3 -3
- package/module/es5/Date/isLeapYear.d.ts +8 -3
- package/module/es5/Date/isLeapYear.js +8 -3
- package/module/es5/Date/new.d.ts +20 -20
- package/module/es5/Date/new.js +21 -21
- package/module/es5/Date/now.d.ts +7 -4
- package/module/es5/Date/now.js +7 -4
- package/module/es5/Error/safeExecute.d.ts +21 -0
- package/module/es5/Error/safeExecute.js +36 -0
- package/module/es5/IP/cidrToLong.d.ts +4 -3
- package/module/es5/IP/cidrToLong.js +7 -3
- package/module/es5/IP/cidrToSubnetMask.d.ts +4 -3
- package/module/es5/IP/cidrToSubnetMask.js +4 -3
- package/module/es5/IP/getIpClass.d.ts +3 -3
- package/module/es5/IP/getIpClass.js +44 -18
- package/module/es5/IP/getNetworkAddress.d.ts +5 -4
- package/module/es5/IP/getNetworkAddress.js +35 -6
- package/module/es5/IP/ipToBinaryString.d.ts +4 -3
- package/module/es5/IP/ipToBinaryString.js +44 -5
- package/module/es5/IP/ipToLong.d.ts +4 -3
- package/module/es5/IP/ipToLong.js +4 -3
- package/module/es5/IP/isInRange.d.ts +6 -5
- package/module/es5/IP/isInRange.js +34 -7
- package/module/es5/IP/isPrivateIp.d.ts +4 -3
- package/module/es5/IP/isPrivateIp.js +30 -17
- package/module/es5/IP/longToIp.d.ts +4 -3
- package/module/es5/IP/longToIp.js +17 -5
- package/module/es5/IP/subnetMaskToCidr.d.ts +4 -3
- package/module/es5/IP/subnetMaskToCidr.js +33 -12
- package/module/es5/Math/addition.d.ts +3 -3
- package/module/es5/Math/addition.js +3 -3
- package/module/es5/Math/average.d.ts +7 -4
- package/module/es5/Math/average.js +7 -4
- package/module/es5/Math/bitwise.d.ts +5 -5
- package/module/es5/Math/bitwise.js +5 -5
- package/module/es5/Math/calculator/calculator.d.ts +9 -7
- package/module/es5/Math/calculator/calculator.js +9 -7
- package/module/es5/Math/calculator/calculatorInitialization.d.ts +4 -3
- package/module/es5/Math/calculator/calculatorInitialization.js +6 -5
- package/module/es5/Math/calculator/convertCurrency.d.ts +6 -4
- package/module/es5/Math/calculator/convertCurrency.js +6 -4
- package/module/es5/Math/calculator/core.js +13 -13
- package/module/es5/Math/calculator/literalExpression.d.ts +5 -3
- package/module/es5/Math/calculator/literalExpression.js +12 -10
- package/module/es5/Math/degToRad.d.ts +3 -3
- package/module/es5/Math/degToRad.js +3 -3
- package/module/es5/Math/deviationValue.d.ts +5 -5
- package/module/es5/Math/deviationValue.js +5 -5
- package/module/es5/Math/division.d.ts +5 -5
- package/module/es5/Math/division.js +35 -21
- package/module/es5/Math/factorial.d.ts +3 -3
- package/module/es5/Math/factorial.js +3 -3
- package/module/es5/Math/factorize.d.ts +3 -3
- package/module/es5/Math/factorize.js +3 -3
- package/module/es5/Math/flexibleNumberConversion.d.ts +11 -11
- package/module/es5/Math/flexibleNumberConversion.js +19 -19
- package/module/es5/Math/gcd.d.ts +5 -5
- package/module/es5/Math/gcd.js +6 -6
- package/module/es5/Math/getDecimalLength.d.ts +7 -4
- package/module/es5/Math/getDecimalLength.js +9 -5
- package/module/es5/Math/lcm.d.ts +4 -4
- package/module/es5/Math/lcm.js +5 -5
- package/module/es5/Math/linearCongruentialGenerator.d.ts +6 -6
- package/module/es5/Math/linearCongruentialGenerator.js +6 -6
- package/module/es5/Math/mathConverter.d.ts +7 -3
- package/module/es5/Math/mathConverter.js +7 -3
- package/module/es5/Math/mathSeparator.d.ts +8 -3
- package/module/es5/Math/mathSeparator.js +8 -3
- package/module/es5/Math/max.d.ts +4 -3
- package/module/es5/Math/max.js +4 -3
- package/module/es5/Math/median.d.ts +3 -3
- package/module/es5/Math/median.js +3 -3
- package/module/es5/Math/min.d.ts +4 -3
- package/module/es5/Math/min.js +4 -3
- package/module/es5/Math/multiples.d.ts +4 -4
- package/module/es5/Math/multiples.js +4 -4
- package/module/es5/Math/multiplication.d.ts +3 -3
- package/module/es5/Math/multiplication.js +3 -3
- package/module/es5/Math/nCr.d.ts +7 -4
- package/module/es5/Math/nCr.js +7 -4
- package/module/es5/Math/nHr.d.ts +7 -4
- package/module/es5/Math/nHr.js +7 -4
- package/module/es5/Math/nPr.d.ts +7 -4
- package/module/es5/Math/nPr.js +7 -4
- package/module/es5/Math/primeFactorization.d.ts +6 -3
- package/module/es5/Math/primeFactorization.js +11 -8
- package/module/es5/Math/quotient.d.ts +7 -4
- package/module/es5/Math/quotient.js +7 -4
- package/module/es5/Math/radToDeg.d.ts +5 -3
- package/module/es5/Math/radToDeg.js +5 -3
- package/module/es5/Math/random.d.ts +6 -5
- package/module/es5/Math/random.js +6 -5
- package/module/es5/Math/reduce.d.ts +9 -4
- package/module/es5/Math/reduce.js +14 -8
- package/module/es5/Math/repeatedTrial.d.ts +5 -5
- package/module/es5/Math/repeatedTrial.js +5 -5
- package/module/es5/Math/roundOf.d.ts +7 -5
- package/module/es5/Math/roundOf.js +8 -6
- package/module/es5/Math/solveEquation.d.ts +12 -13
- package/module/es5/Math/solveEquation.js +34 -38
- package/module/es5/Math/standardDeviation.d.ts +8 -3
- package/module/es5/Math/standardDeviation.js +16 -7
- package/module/es5/Math/subtract.d.ts +10 -4
- package/module/es5/Math/subtract.js +12 -6
- package/module/es5/Math/toBaseN.d.ts +8 -6
- package/module/es5/Math/toBaseN.js +9 -7
- package/module/es5/Math/toCelsius.d.ts +5 -3
- package/module/es5/Math/toCelsius.js +5 -3
- package/module/es5/Math/toKelvin.d.ts +5 -3
- package/module/es5/Math/toKelvin.js +5 -3
- package/module/es5/Math/uuidv7.d.ts +10 -2
- package/module/es5/Math/uuidv7.js +10 -2
- package/module/es5/Math/valueSwap.d.ts +5 -4
- package/module/es5/Math/valueSwap.js +5 -4
- package/module/es5/Math/xoshiro256.d.ts +8 -3
- package/module/es5/Math/xoshiro256.js +8 -3
- package/module/es5/Object/has.d.ts +4 -4
- package/module/es5/Object/has.js +4 -4
- package/module/es5/Object/keyBy.d.ts +3 -3
- package/module/es5/Object/keyBy.js +4 -4
- package/module/es5/Object/pick.d.ts +6 -6
- package/module/es5/Object/pick.js +6 -6
- package/module/es5/Object/pickDeep.d.ts +7 -7
- package/module/es5/Object/pickDeep.js +7 -7
- package/module/es5/Simple/Array/quickSortSimple.d.ts +9 -7
- package/module/es5/Simple/Array/quickSortSimple.js +7 -6
- package/module/es5/Simple/Date/birthdaySimple.d.ts +4 -4
- package/module/es5/Simple/Date/birthdaySimple.js +4 -4
- package/module/es5/Simple/Date/dayOfWeekSimple.d.ts +4 -4
- package/module/es5/Simple/Date/dayOfWeekSimple.js +4 -4
- package/module/es5/Simple/Date/nowSimple.d.ts +3 -3
- package/module/es5/Simple/Date/nowSimple.js +3 -3
- package/module/es5/Simple/Math/deviationValueSimple.d.ts +10 -11
- package/module/es5/Simple/Math/deviationValueSimple.js +23 -12
- package/module/es5/String/deleteSpaces.d.ts +8 -4
- package/module/es5/String/deleteSpaces.js +8 -4
- package/module/es5/String/formatString.d.ts +8 -8
- package/module/es5/String/formatString.js +7 -7
- package/module/es5/String/fromBase64.d.ts +4 -3
- package/module/es5/String/fromBase64.js +14 -9
- package/module/es5/String/hasNoLetters.d.ts +9 -3
- package/module/es5/String/hasNoLetters.js +12 -6
- package/module/es5/String/padEnd.d.ts +5 -5
- package/module/es5/String/padEnd.js +5 -5
- package/module/es5/String/padStart.d.ts +11 -5
- package/module/es5/String/padStart.js +20 -5
- package/module/es5/String/randomString.d.ts +4 -4
- package/module/es5/String/randomString.js +4 -4
- package/module/es5/String/randomStringInitialization.d.ts +3 -3
- package/module/es5/String/randomStringInitialization.js +3 -3
- package/module/es5/String/reverseString.d.ts +3 -3
- package/module/es5/String/reverseString.js +3 -3
- package/module/es5/String/toBase64.d.ts +3 -3
- package/module/es5/String/toBase64.js +3 -3
- package/module/es5/String/toHalfWidth.d.ts +3 -3
- package/module/es5/String/toHalfWidth.js +3 -3
- package/module/es5/String/trimCharacters.d.ts +4 -4
- package/module/es5/String/trimCharacters.js +4 -4
- package/module/es5/String/trimEndCharacters.d.ts +10 -4
- package/module/es5/String/trimEndCharacters.js +10 -4
- package/module/es5/String/trimStartCharacters.d.ts +10 -4
- package/module/es5/String/trimStartCharacters.js +10 -4
- package/module/es5/Time/convertTime.d.ts +6 -6
- package/module/es5/Time/convertTime.js +12 -11
- package/module/es5/Tool/createPipeline.d.ts +8 -6
- package/module/es5/Tool/createPipeline.js +10 -8
- package/module/es5/Tool/parseJson.d.ts +7 -0
- package/module/es5/Tool/parseJson.js +7 -0
- package/module/es5/UA/extractBrowserFromUserAgent.d.ts +12 -0
- package/module/es5/UA/extractBrowserFromUserAgent.js +22 -5
- package/module/es5/UA/extractDeviceFromUserAgent.d.ts +12 -0
- package/module/es5/UA/extractDeviceFromUserAgent.js +12 -0
- package/module/es5/UA/extractOsFromUserAgent.d.ts +12 -0
- package/module/es5/UA/extractOsFromUserAgent.js +12 -0
- package/module/es5/UA/parseUserAgent.d.ts +16 -0
- package/module/es5/UA/parseUserAgent.js +16 -0
- package/module/es5/Unit/unitConverterInitialization.d.ts +15 -0
- package/module/es5/Unit/unitConverterInitialization.js +15 -0
- package/module/es5/Validate/array/core.d.ts +12 -0
- package/module/es5/Validate/array/core.js +15 -4
- package/module/es5/Validate/boolean/core.d.ts +9 -0
- package/module/es5/Validate/boolean/core.js +10 -0
- package/module/es5/Validate/core/index.d.ts +10 -0
- package/module/es5/Validate/core/index.js +13 -1
- package/module/es5/Validate/isArray.d.ts +3 -3
- package/module/es5/Validate/isArray.js +3 -3
- package/module/es5/Validate/isBrowser.d.ts +1 -1
- package/module/es5/Validate/isBrowser.js +1 -1
- package/module/es5/Validate/isBun.d.ts +1 -1
- package/module/es5/Validate/isBun.js +1 -1
- package/module/es5/Validate/isDictionaryObject.d.ts +3 -3
- package/module/es5/Validate/isDictionaryObject.js +3 -3
- package/module/es5/Validate/isDouble.d.ts +4 -4
- package/module/es5/Validate/isDouble.js +4 -4
- package/module/es5/Validate/isNode.d.ts +1 -1
- package/module/es5/Validate/isNode.js +1 -1
- package/module/es5/Validate/isNodeWebkit.d.ts +1 -1
- package/module/es5/Validate/isNodeWebkit.js +1 -1
- package/module/es5/Validate/isNotEmpty.d.ts +3 -3
- package/module/es5/Validate/isNotEmpty.js +4 -4
- package/module/es5/Validate/isNumber.d.ts +4 -4
- package/module/es5/Validate/isNumber.js +11 -4
- package/module/es5/Validate/isPerfectSquare.d.ts +8 -3
- package/module/es5/Validate/isPerfectSquare.js +8 -3
- package/module/es5/Validate/isPrimeNumber.d.ts +7 -3
- package/module/es5/Validate/isPrimeNumber.js +8 -4
- package/module/es5/Validate/isValueNaN.d.ts +7 -5
- package/module/es5/Validate/isValueNaN.js +7 -5
- package/module/es5/Validate/number/core.d.ts +11 -0
- package/module/es5/Validate/number/core.js +12 -0
- package/module/es5/Validate/number/double.d.ts +9 -0
- package/module/es5/Validate/number/double.js +10 -0
- package/module/es5/Validate/number/even.d.ts +9 -0
- package/module/es5/Validate/number/even.js +10 -0
- package/module/es5/Validate/number/maxValue.d.ts +10 -0
- package/module/es5/Validate/number/maxValue.js +11 -0
- package/module/es5/Validate/number/minValue.d.ts +10 -0
- package/module/es5/Validate/number/minValue.js +11 -0
- package/module/es5/Validate/number/prime.d.ts +9 -0
- package/module/es5/Validate/number/prime.js +10 -0
- package/module/es5/Validate/object/core.d.ts +11 -0
- package/module/es5/Validate/object/core.js +12 -0
- package/module/es5/Validate/string/core.d.ts +11 -0
- package/module/es5/Validate/string/core.js +12 -0
- package/module/es5/Validate/string/email.d.ts +9 -0
- package/module/es5/Validate/string/email.js +11 -1
- package/module/es5/Validate/string/length.d.ts +11 -0
- package/module/es5/Validate/string/length.js +12 -0
- package/module/es5/Validate/string/maxLength.d.ts +10 -0
- package/module/es5/Validate/string/maxLength.js +11 -0
- package/module/es5/Validate/string/minLength.d.ts +10 -0
- package/module/es5/Validate/string/minLength.js +11 -0
- package/module/es5/Validate/string/numberString.d.ts +9 -0
- package/module/es5/Validate/string/numberString.js +10 -0
- package/module/es5/Validate/string/regexMatch.d.ts +10 -0
- package/module/es5/Validate/string/regexMatch.js +11 -0
- package/module/es5/Validate/string/uuid.d.ts +8 -3
- package/module/es5/Validate/string/uuid.js +10 -4
- package/module/es5/Validate/type.d.ts +22 -0
- package/module/es5/tests/integration/Array/drop-and-first.test.js +20 -0
- package/module/es5/tests/integration/Tool/parseJson-and-Validate.test.js +68 -14
- package/module/es5/tests/unit/Array/arraysJoin.test.js +15 -3
- package/module/es5/tests/unit/Array/checkFlagAlignment.test.js +10 -10
- package/module/es5/tests/unit/Array/compact.test.js +17 -17
- package/module/es5/tests/unit/Array/compareFunctionDefault.test.d.ts +1 -0
- package/module/es5/tests/unit/Array/compareFunctionDefault.test.js +29 -0
- package/module/es5/tests/unit/Array/drop.test.js +10 -10
- package/module/es5/tests/unit/Array/dualPivotQuickSort.test.d.ts +1 -0
- package/module/es5/tests/unit/Array/dualPivotQuickSort.test.js +87 -0
- package/module/es5/tests/unit/Array/generateNumberArray.test.js +6 -6
- package/module/es5/tests/unit/Array/getArraysCommon.test.js +36 -4
- package/module/es5/tests/unit/Array/getArraysDiff.test.js +14 -14
- package/module/es5/tests/unit/Array/groupBy.test.js +6 -6
- package/module/es5/tests/unit/Array/insertionSort.test.js +8 -8
- package/module/es5/tests/unit/Array/mergeSort.test.js +34 -5
- package/module/es5/tests/unit/Array/quickSort.test.js +76 -11
- package/module/es5/tests/unit/Array/randomSelect.test.js +11 -6
- package/module/es5/tests/unit/Array/range.test.js +25 -4
- package/module/es5/tests/unit/Array/shuffle.test.js +53 -6
- package/module/es5/tests/unit/Array/shuffle2DArray.test.js +51 -8
- package/module/es5/tests/unit/Array/sum.test.js +40 -2
- package/module/es5/tests/unit/Array/timSort.test.js +89 -9
- package/module/es5/tests/unit/Array/zip.test.js +48 -9
- package/module/es5/tests/unit/Array/zipLongest.test.js +52 -9
- package/module/es5/tests/unit/Color/cmykToRgba.test.js +3 -3
- package/module/es5/tests/unit/Color/hexaToRgba.test.js +53 -1
- package/module/es5/tests/unit/Color/hslaToRgba.test.js +35 -53
- package/module/es5/tests/unit/Color/rgbaToCmyk.test.js +67 -1
- package/module/es5/tests/unit/Color/rgbaToHsla.test.js +91 -1
- package/module/es5/tests/unit/Consts/clock.test.js +51 -18
- package/module/es5/tests/unit/Consts/httpStatus.test.js +9 -0
- package/module/es5/tests/unit/Date/birthday.test.d.ts +1 -0
- package/module/es5/tests/unit/Date/birthday.test.js +31 -0
- package/module/es5/tests/unit/Date/dateRange.test.d.ts +1 -0
- package/module/es5/tests/unit/Date/dateRange.test.js +40 -0
- package/module/es5/tests/unit/Date/dayOfWeek.test.js +5 -5
- package/module/es5/tests/unit/Date/format.test.js +22 -0
- package/module/es5/tests/unit/Date/getDay.test.d.ts +1 -0
- package/module/es5/tests/unit/Date/getDay.test.js +40 -0
- package/module/es5/tests/unit/Date/getTimezoneOffsetString.test.js +3 -3
- package/module/es5/tests/unit/Date/isLeapYear.test.d.ts +1 -0
- package/module/es5/tests/unit/Date/isLeapYear.test.js +30 -0
- package/module/es5/tests/unit/Date/new.test.d.ts +1 -0
- package/module/es5/tests/unit/Date/new.test.js +39 -0
- package/module/es5/tests/unit/Date/now.test.d.ts +1 -0
- package/module/es5/tests/unit/Date/now.test.js +42 -0
- package/module/es5/tests/unit/Error/safeExecute.test.js +69 -15
- package/module/es5/tests/unit/IP/cidrToLong.test.js +27 -5
- package/module/es5/tests/unit/IP/cidrToSubnetMask.test.js +29 -10
- package/module/es5/tests/unit/IP/getIpClass.test.js +29 -18
- package/module/es5/tests/unit/IP/getNetworkAddress.test.js +35 -14
- package/module/es5/tests/unit/IP/ipToBinaryString.test.js +38 -9
- package/module/es5/tests/unit/IP/ipToLong.test.js +27 -13
- package/module/es5/tests/unit/IP/isInRange.test.js +75 -4
- package/module/es5/tests/unit/IP/isPrivateIp.test.js +18 -12
- package/module/es5/tests/unit/IP/longToIp.test.d.ts +1 -0
- package/module/es5/tests/unit/IP/longToIp.test.js +39 -0
- package/module/es5/tests/unit/IP/subnetMaskToCidr.test.js +34 -20
- package/module/es5/tests/unit/Math/average.test.js +40 -18
- package/module/es5/tests/unit/Math/bitwise.test.js +14 -14
- package/module/es5/tests/unit/Math/calculator/calculator.test.js +9 -9
- package/module/es5/tests/unit/Math/calculator/calculatorInitialization.test.js +16 -5
- package/module/es5/tests/unit/Math/calculator/convertCurrency.test.js +12 -12
- package/module/es5/tests/unit/Math/calculator/literalExpression.test.js +8 -8
- package/module/es5/tests/unit/Math/degToRad.test.js +10 -10
- package/module/es5/tests/unit/Math/deviationValue.test.js +12 -12
- package/module/es5/tests/unit/Math/division.test.js +72 -25
- package/module/es5/tests/unit/Math/factorial.test.js +4 -4
- package/module/es5/tests/unit/Math/factorize.test.js +34 -9
- package/module/es5/tests/unit/Math/flexibleNumberConversion.test.js +75 -75
- package/module/es5/tests/unit/Math/gcd.test.js +5 -5
- package/module/es5/tests/unit/Math/getDecimalLength.test.js +40 -4
- package/module/es5/tests/unit/Math/lcm.test.js +16 -9
- package/module/es5/tests/unit/Math/linearCongruentialGenerator.test.js +4 -4
- package/module/es5/tests/unit/Math/mathConverter.test.js +13 -13
- package/module/es5/tests/unit/Math/mathSeparator.test.js +23 -5
- package/module/es5/tests/unit/Math/max.test.js +18 -3
- package/module/es5/tests/unit/Math/median.test.js +4 -4
- package/module/es5/tests/unit/Math/min.test.js +18 -3
- package/module/es5/tests/unit/Math/multiples.test.js +26 -10
- package/module/es5/tests/unit/Math/multiplication.test.js +43 -9
- package/module/es5/tests/unit/Math/nCr.test.js +27 -14
- package/module/es5/tests/unit/Math/nHr.test.js +28 -15
- package/module/es5/tests/unit/Math/nPr.test.js +31 -14
- package/module/es5/tests/unit/Math/primeFactorization.test.js +79 -8
- package/module/es5/tests/unit/Math/quotient.test.js +32 -10
- package/module/es5/tests/unit/Math/radToDeg.test.js +39 -38
- package/module/es5/tests/unit/Math/random.test.js +55 -17
- package/module/es5/tests/unit/Math/reduce.test.js +87 -8
- package/module/es5/tests/unit/Math/repeatedTrial.test.js +35 -5
- package/module/es5/tests/unit/Math/roundOf.test.js +36 -11
- package/module/es5/tests/unit/Math/solveEquation.test.js +20 -20
- package/module/es5/tests/unit/Math/standardDeviation.test.js +19 -2
- package/module/es5/tests/unit/Math/subtract.test.js +14 -2
- package/module/es5/tests/unit/Math/toBaseN.test.js +36 -19
- package/module/es5/tests/unit/Math/toCelsius.test.js +14 -2
- package/module/es5/tests/unit/Math/toKelvin.test.js +14 -2
- package/module/es5/tests/unit/Math/uuidv7.test.js +6 -6
- package/module/es5/tests/unit/Math/valueSwap.test.js +24 -6
- package/module/es5/tests/unit/Math/xoshiro256.test.js +22 -11
- package/module/es5/tests/unit/Object/keyBy.test.js +6 -6
- package/module/es5/tests/unit/Object/pick.test.js +11 -11
- package/module/es5/tests/unit/Object/pickDeep.test.js +15 -15
- package/module/es5/tests/unit/Simple/Array/quickSortSimple.test.js +4 -4
- package/module/es5/tests/unit/Simple/Math/deviationValueSimple.test.js +39 -3
- package/module/es5/tests/unit/String/deleteSpaces.test.d.ts +1 -0
- package/module/es5/tests/unit/String/deleteSpaces.test.js +22 -0
- package/module/es5/tests/unit/String/formatString.test.js +41 -14
- package/module/es5/tests/unit/String/fromBase64.test.js +19 -8
- package/module/es5/tests/unit/String/hasNoLetters.test.js +20 -24
- package/module/es5/tests/unit/String/padEnd.test.js +5 -5
- package/module/es5/tests/unit/String/padStart.test.js +32 -19
- package/module/es5/tests/unit/String/randomString.test.js +3 -3
- package/module/es5/tests/unit/String/randomStringInitialization.test.js +2 -2
- package/module/es5/tests/unit/String/reverseString.test.js +10 -12
- package/module/es5/tests/unit/String/toBase64.test.js +5 -5
- package/module/es5/tests/unit/String/toHalfWidth.test.js +3 -3
- package/module/es5/tests/unit/String/trimCharacters.test.js +4 -4
- package/module/es5/tests/unit/String/trimEndCharacters.test.js +17 -7
- package/module/es5/tests/unit/String/trimStartCharacters.test.js +23 -10
- package/module/es5/tests/unit/Time/convertTime.test.js +40 -46
- package/module/es5/tests/unit/Tool/createPipeline.test.js +15 -15
- package/module/es5/tests/unit/UA/extractBrowserFromUserAgent.test.d.ts +1 -0
- package/module/es5/tests/unit/UA/extractBrowserFromUserAgent.test.js +47 -0
- package/module/es5/tests/unit/UA/extractDeviceFromUserAgent.test.d.ts +1 -0
- package/module/es5/tests/unit/UA/extractDeviceFromUserAgent.test.js +55 -0
- package/module/es5/tests/unit/UA/extractOsFromUserAgent.test.d.ts +1 -0
- package/module/es5/tests/unit/UA/extractOsFromUserAgent.test.js +57 -0
- package/module/es5/tests/unit/Unit/unitConverterInitialization.test.js +27 -25
- package/module/es5/tests/unit/Validate/array/core.test.js +39 -10
- package/module/es5/tests/unit/Validate/core/core.test.d.ts +1 -0
- package/module/es5/tests/unit/Validate/core/core.test.js +87 -0
- package/module/es5/tests/unit/Validate/isArray.test.js +11 -0
- package/module/es5/tests/unit/Validate/isDictionaryObject.test.js +15 -1
- package/module/es5/tests/unit/Validate/isDouble.test.js +21 -4
- package/module/es5/tests/unit/Validate/isNotEmpty.test.js +3 -3
- package/module/es5/tests/unit/Validate/isNumber.test.js +67 -29
- package/module/es5/tests/unit/Validate/isPerfectSquare.test.js +5 -0
- package/module/es5/tests/unit/Validate/isPrimeNumber.test.js +14 -4
- package/module/es5/tests/unit/Validate/isValueNaN.test.js +50 -11
- package/module/es5/tests/unit/Validate/string/uuid.test.js +13 -13
- package/module/es5/tsconfig.tsbuildinfo +1 -1
- package/module/es5/types/array/compareFunction.d.ts +2 -0
- package/module/es5/types/array/compareFunction.js +5 -0
- package/module/es5/types/time/timeUnit.d.ts +1 -1
- package/module/types/array/compareFunction.d.ts +2 -0
- package/module/types/array/compareFunction.js +2 -0
- package/module/types/array/compareFunction.js.map +1 -0
- package/module/types/time/timeUnit.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param array
|
|
4
|
-
* @param count
|
|
5
|
-
* @param allowDuplicates
|
|
6
|
-
* @returns
|
|
2
|
+
* Randomly selects a specified number of elements from an array
|
|
3
|
+
* @param array Source array
|
|
4
|
+
* @param count Number of elements to select
|
|
5
|
+
* @param allowDuplicates Whether to allow duplicate selections (default: false)
|
|
6
|
+
* @returns Array of randomly selected elements
|
|
7
7
|
* @example randomSelect([1, 2, 3, 4, 5], 2); // [3, 1]
|
|
8
8
|
*/
|
|
9
9
|
export declare const randomSelect: <T>(array: T[], count: number, allowDuplicates?: boolean) => T[];
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.randomSelect = void 0;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param array
|
|
10
|
-
* @param count
|
|
11
|
-
* @param allowDuplicates
|
|
12
|
-
* @returns
|
|
8
|
+
* Randomly selects a specified number of elements from an array
|
|
9
|
+
* @param array Source array
|
|
10
|
+
* @param count Number of elements to select
|
|
11
|
+
* @param allowDuplicates Whether to allow duplicate selections (default: false)
|
|
12
|
+
* @returns Array of randomly selected elements
|
|
13
13
|
* @example randomSelect([1, 2, 3, 4, 5], 2); // [3, 1]
|
|
14
14
|
*/
|
|
15
15
|
var randomSelect = exports.randomSelect = function randomSelect(array, count) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param start
|
|
4
|
-
* @param end
|
|
5
|
-
* @param step
|
|
6
|
-
* @returns
|
|
2
|
+
* Generates an array of sequential numbers
|
|
3
|
+
* @param start Starting number
|
|
4
|
+
* @param end Ending number (if omitted, generates array from 0 to start)
|
|
5
|
+
* @param step Step value (defaults to 1)
|
|
6
|
+
* @returns Array of sequential numbers
|
|
7
7
|
* @example range(5); // [0, 1, 2, 3, 4]
|
|
8
8
|
* @example range(2, 10, 2); // [2, 4, 6, 8]
|
|
9
9
|
*/
|
|
@@ -5,24 +5,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.range = void 0;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param start
|
|
10
|
-
* @param end
|
|
11
|
-
* @param step
|
|
12
|
-
* @returns
|
|
8
|
+
* Generates an array of sequential numbers
|
|
9
|
+
* @param start Starting number
|
|
10
|
+
* @param end Ending number (if omitted, generates array from 0 to start)
|
|
11
|
+
* @param step Step value (defaults to 1)
|
|
12
|
+
* @returns Array of sequential numbers
|
|
13
13
|
* @example range(5); // [0, 1, 2, 3, 4]
|
|
14
14
|
* @example range(2, 10, 2); // [2, 4, 6, 8]
|
|
15
15
|
*/
|
|
16
16
|
var range = exports.range = function range(start, end) {
|
|
17
17
|
var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
18
18
|
var array = [];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
|
|
20
|
+
// Handle invalid step
|
|
21
|
+
if (step === 0) {
|
|
22
|
+
return array;
|
|
23
|
+
}
|
|
24
|
+
var actualStart = end === undefined ? 0 : start;
|
|
25
|
+
var actualEnd = end === undefined ? start : end;
|
|
26
|
+
|
|
27
|
+
// Return empty array if invalid range
|
|
28
|
+
if (step > 0 && actualStart >= actualEnd || step < 0 && actualStart <= actualEnd) {
|
|
29
|
+
return array;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Handle both positive and negative steps
|
|
33
|
+
if (step > 0) {
|
|
34
|
+
for (var index = actualStart; index < actualEnd; index += step) {
|
|
35
|
+
// Handle floating point precision
|
|
36
|
+
var roundedValue = Number((Math.round(index * 1e10) / 1e10).toFixed(10));
|
|
37
|
+
array.push(roundedValue);
|
|
22
38
|
}
|
|
23
39
|
} else {
|
|
24
|
-
for (var _index =
|
|
25
|
-
|
|
40
|
+
for (var _index = actualStart; _index > actualEnd; _index += step) {
|
|
41
|
+
// Handle floating point precision
|
|
42
|
+
var _roundedValue = Number((Math.round(_index * 1e10) / 1e10).toFixed(10));
|
|
43
|
+
array.push(_roundedValue);
|
|
26
44
|
}
|
|
27
45
|
}
|
|
28
46
|
return array;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param array
|
|
4
|
-
* @returns
|
|
2
|
+
* Randomly shuffles the elements of an array
|
|
3
|
+
* @param array Array to shuffle
|
|
4
|
+
* @returns New array with shuffled elements
|
|
5
5
|
* @example shuffle([1, 2, 3, 4, 5]); // [3, 5, 2, 4, 1]
|
|
6
6
|
*/
|
|
7
7
|
export declare const shuffle: <T>(array: T[]) => T[];
|
|
@@ -11,9 +11,9 @@ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Sym
|
|
|
11
11
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
12
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param array
|
|
16
|
-
* @returns
|
|
14
|
+
* Randomly shuffles the elements of an array
|
|
15
|
+
* @param array Array to shuffle
|
|
16
|
+
* @returns New array with shuffled elements
|
|
17
17
|
* @example shuffle([1, 2, 3, 4, 5]); // [3, 5, 2, 4, 1]
|
|
18
18
|
*/
|
|
19
19
|
var shuffle = exports.shuffle = function shuffle(array) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param array
|
|
4
|
-
* @returns
|
|
2
|
+
* Shuffles all elements in a 2D array while maintaining the row lengths
|
|
3
|
+
* @param array The 2D array to shuffle
|
|
4
|
+
* @returns A new 2D array with shuffled elements
|
|
5
5
|
* @example
|
|
6
6
|
* shuffle2DArray([[1, 2], [3, 4], [5, 6]]);
|
|
7
|
-
* //
|
|
7
|
+
* // Result: [[1, 3], [6, 4], [2, 5]]
|
|
8
8
|
*/
|
|
9
9
|
export declare const shuffle2DArray: <T>(array: T[][]) => T[][];
|
|
@@ -12,15 +12,15 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
12
12
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
13
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @param array
|
|
17
|
-
* @returns
|
|
15
|
+
* Shuffles all elements in a 2D array while maintaining the row lengths
|
|
16
|
+
* @param array The 2D array to shuffle
|
|
17
|
+
* @returns A new 2D array with shuffled elements
|
|
18
18
|
* @example
|
|
19
19
|
* shuffle2DArray([[1, 2], [3, 4], [5, 6]]);
|
|
20
|
-
* //
|
|
20
|
+
* // Result: [[1, 3], [6, 4], [2, 5]]
|
|
21
21
|
*/
|
|
22
22
|
var shuffle2DArray = exports.shuffle2DArray = function shuffle2DArray(array) {
|
|
23
|
-
//
|
|
23
|
+
// Flatten the 2D array into 1D and shuffle it
|
|
24
24
|
var flatArray = [];
|
|
25
25
|
var _iterator = _createForOfIteratorHelper(array),
|
|
26
26
|
_step;
|
|
@@ -41,7 +41,7 @@ var shuffle2DArray = exports.shuffle2DArray = function shuffle2DArray(array) {
|
|
|
41
41
|
flatArray[index_] = _ref[1];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
//
|
|
44
|
+
// Reconstruct the 2D array from the shuffled flat array
|
|
45
45
|
var rowIndex = 0;
|
|
46
46
|
return array.map(function (subArray) {
|
|
47
47
|
var newRow = flatArray.slice(rowIndex, rowIndex + subArray.length);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {number[]} x
|
|
4
|
-
* @returns
|
|
2
|
+
* Returns the sum of an array of numbers
|
|
3
|
+
* @param {number[]} x Array of numbers
|
|
4
|
+
* @returns Sum of the array elements
|
|
5
5
|
* @example sum([1, 2, 3]); // 6
|
|
6
6
|
*/
|
|
7
7
|
export declare const sum: (x: number[]) => number;
|
package/module/es5/Array/sum.js
CHANGED
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.sum = void 0;
|
|
7
7
|
var _addition = require("@/Math/addition");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param {number[]} x
|
|
11
|
-
* @returns
|
|
9
|
+
* Returns the sum of an array of numbers
|
|
10
|
+
* @param {number[]} x Array of numbers
|
|
11
|
+
* @returns Sum of the array elements
|
|
12
12
|
* @example sum([1, 2, 3]); // 6
|
|
13
13
|
*/
|
|
14
14
|
var sum = exports.sum = function sum(x) {
|
|
15
15
|
return x.reduce(function (a, b) {
|
|
16
16
|
return (0, _addition.addition)(a, b);
|
|
17
|
-
});
|
|
17
|
+
}, 0);
|
|
18
18
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
type CompareFunction
|
|
1
|
+
import type { CompareFunction } from "$/array/compareFunction";
|
|
2
2
|
/**
|
|
3
|
-
* TimSort
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Implementation of the TimSort algorithm, which combines the best features of
|
|
4
|
+
* insertion sort and merge sort. It provides a stable sort with O(n log n)
|
|
5
|
+
* worst-case time complexity.
|
|
6
6
|
*
|
|
7
|
-
* @param {T[]} array
|
|
8
|
-
* @param {CompareFunction<T>} [compareFunction=compareFunctionDefault<T>]
|
|
9
|
-
*
|
|
10
|
-
* @param {number} [start=0]
|
|
11
|
-
* @param {number} [end=array.length - 1]
|
|
12
|
-
* @returns {T[]}
|
|
7
|
+
* @param {T[]} array Array to sort
|
|
8
|
+
* @param {CompareFunction<T>} [compareFunction=compareFunctionDefault<T>]
|
|
9
|
+
* Function to compare elements
|
|
10
|
+
* @param {number} [start=0] Starting index for the sort range
|
|
11
|
+
* @param {number} [end=array.length - 1] Ending index for the sort range
|
|
12
|
+
* @returns {T[]} Sorted array
|
|
13
|
+
* @example
|
|
14
|
+
* timSort([3, 1, 4, 1, 5]); // [1, 1, 3, 4, 5]
|
|
15
|
+
* timSort(['b', 'a', 'c']); // ['a', 'b', 'c']
|
|
13
16
|
*/
|
|
14
17
|
export declare const timSort: <T>(array: T[], compareFunction?: CompareFunction<T>, start?: number, end?: number) => T[];
|
|
15
|
-
export {};
|
|
@@ -6,6 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.timSort = void 0;
|
|
7
7
|
var _compareFunctionDefault = require("./compareFunctionDefault");
|
|
8
8
|
var MIN_RUN = 32;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Sorts a portion of the array using insertion sort algorithm
|
|
12
|
+
* @param array Array to sort
|
|
13
|
+
* @param start Starting index of the range to sort
|
|
14
|
+
* @param end Ending index of the range to sort
|
|
15
|
+
* @param compareFunction Function to compare elements
|
|
16
|
+
*/
|
|
9
17
|
var insertionSort = function insertionSort(array, start, end, compareFunction) {
|
|
10
18
|
for (var index = start + 1; index <= end; index++) {
|
|
11
19
|
var temporary = array[index];
|
|
@@ -17,6 +25,15 @@ var insertionSort = function insertionSort(array, start, end, compareFunction) {
|
|
|
17
25
|
array[currentIndex + 1] = temporary;
|
|
18
26
|
}
|
|
19
27
|
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Merges two sorted portions of the array
|
|
31
|
+
* @param array Array containing the portions to merge
|
|
32
|
+
* @param start Starting index of the first portion
|
|
33
|
+
* @param mid Middle index separating the two portions
|
|
34
|
+
* @param end Ending index of the second portion
|
|
35
|
+
* @param compareFunction Function to compare elements
|
|
36
|
+
*/
|
|
20
37
|
var merge = function merge(array, start, mid, end, compareFunction) {
|
|
21
38
|
var left = array.slice(start, mid + 1);
|
|
22
39
|
var right = array.slice(mid + 1, end + 1);
|
|
@@ -44,6 +61,13 @@ var merge = function merge(array, start, mid, end, compareFunction) {
|
|
|
44
61
|
arrayIndex++;
|
|
45
62
|
}
|
|
46
63
|
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Calculates the minimum length of a run for the given input size
|
|
67
|
+
* This is used to determine the size of runs for the initial insertion sort phase
|
|
68
|
+
* @param input Size of the array to be sorted
|
|
69
|
+
* @returns Minimum length of a run
|
|
70
|
+
*/
|
|
47
71
|
var getMinRunLength = function getMinRunLength(input) {
|
|
48
72
|
var n = input;
|
|
49
73
|
var r = 0;
|
|
@@ -55,16 +79,19 @@ var getMinRunLength = function getMinRunLength(input) {
|
|
|
55
79
|
};
|
|
56
80
|
|
|
57
81
|
/**
|
|
58
|
-
* TimSort
|
|
59
|
-
*
|
|
60
|
-
*
|
|
82
|
+
* Implementation of the TimSort algorithm, which combines the best features of
|
|
83
|
+
* insertion sort and merge sort. It provides a stable sort with O(n log n)
|
|
84
|
+
* worst-case time complexity.
|
|
61
85
|
*
|
|
62
|
-
* @param {T[]} array
|
|
63
|
-
* @param {CompareFunction<T>} [compareFunction=compareFunctionDefault<T>]
|
|
64
|
-
*
|
|
65
|
-
* @param {number} [start=0]
|
|
66
|
-
* @param {number} [end=array.length - 1]
|
|
67
|
-
* @returns {T[]}
|
|
86
|
+
* @param {T[]} array Array to sort
|
|
87
|
+
* @param {CompareFunction<T>} [compareFunction=compareFunctionDefault<T>]
|
|
88
|
+
* Function to compare elements
|
|
89
|
+
* @param {number} [start=0] Starting index for the sort range
|
|
90
|
+
* @param {number} [end=array.length - 1] Ending index for the sort range
|
|
91
|
+
* @returns {T[]} Sorted array
|
|
92
|
+
* @example
|
|
93
|
+
* timSort([3, 1, 4, 1, 5]); // [1, 1, 3, 4, 5]
|
|
94
|
+
* timSort(['b', 'a', 'c']); // ['a', 'b', 'c']
|
|
68
95
|
*/
|
|
69
96
|
var timSort = exports.timSort = function timSort(array) {
|
|
70
97
|
var compareFunction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _compareFunctionDefault.compareFunctionDefault;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ZipArrayType } from "$/array/zip";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {T} arrays
|
|
5
|
-
* @returns {ZipArrayType<T>}
|
|
3
|
+
* Creates a new array by combining elements from multiple arrays at corresponding positions
|
|
4
|
+
* @param {T} arrays List of arrays to combine
|
|
5
|
+
* @returns {ZipArrayType<T>} New array with combined elements from each input array
|
|
6
|
+
* @example
|
|
7
|
+
* zip([1, 2], ['a', 'b']); // [[1, 'a'], [2, 'b']]
|
|
8
|
+
* zip([1, 2, 3], ['a', 'b']); // [[1, 'a'], [2, 'b']]
|
|
6
9
|
*/
|
|
7
10
|
export declare const zip: <T extends unknown[][]>(...arrays: T) => ZipArrayType<T>;
|
package/module/es5/Array/zip.js
CHANGED
|
@@ -11,9 +11,12 @@ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Sym
|
|
|
11
11
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
12
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param {T} arrays
|
|
16
|
-
* @returns {ZipArrayType<T>}
|
|
14
|
+
* Creates a new array by combining elements from multiple arrays at corresponding positions
|
|
15
|
+
* @param {T} arrays List of arrays to combine
|
|
16
|
+
* @returns {ZipArrayType<T>} New array with combined elements from each input array
|
|
17
|
+
* @example
|
|
18
|
+
* zip([1, 2], ['a', 'b']); // [[1, 'a'], [2, 'b']]
|
|
19
|
+
* zip([1, 2, 3], ['a', 'b']); // [[1, 'a'], [2, 'b']]
|
|
17
20
|
*/
|
|
18
21
|
var zip = exports.zip = function zip() {
|
|
19
22
|
for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { ZipArrayType } from "$/array/zip";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Combines arrays of different lengths by padding shorter arrays with undefined values
|
|
4
|
+
* to match the length of the longest array
|
|
5
5
|
*
|
|
6
|
-
* @param {T} arrays
|
|
7
|
-
* @returns {ZipArrayType<T>}
|
|
8
|
-
*
|
|
6
|
+
* @param {T} arrays List of arrays to combine
|
|
7
|
+
* @returns {ZipArrayType<T>} New array with combined elements from each input array,
|
|
8
|
+
* padded with undefined values where necessary
|
|
9
|
+
* @example
|
|
10
|
+
* zipLongest([1, 2], ['a']); // [[1, 'a'], [2, undefined]]
|
|
11
|
+
* zipLongest([1], ['a', 'b']); // [[1, 'a'], [undefined, 'b']]
|
|
9
12
|
*/
|
|
10
13
|
export declare const zipLongest: <T extends unknown[][]>(...arrays: T) => ZipArrayType<T>;
|
|
@@ -11,12 +11,15 @@ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Sym
|
|
|
11
11
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
12
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Combines arrays of different lengths by padding shorter arrays with undefined values
|
|
15
|
+
* to match the length of the longest array
|
|
16
16
|
*
|
|
17
|
-
* @param {T} arrays
|
|
18
|
-
* @returns {ZipArrayType<T>}
|
|
19
|
-
*
|
|
17
|
+
* @param {T} arrays List of arrays to combine
|
|
18
|
+
* @returns {ZipArrayType<T>} New array with combined elements from each input array,
|
|
19
|
+
* padded with undefined values where necessary
|
|
20
|
+
* @example
|
|
21
|
+
* zipLongest([1, 2], ['a']); // [[1, 'a'], [2, undefined]]
|
|
22
|
+
* zipLongest([1], ['a', 'b']); // [[1, 'a'], [undefined, 'b']]
|
|
20
23
|
*/
|
|
21
24
|
var zipLongest = exports.zipLongest = function zipLongest() {
|
|
22
25
|
for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {number} c
|
|
4
|
-
* @param {number} m
|
|
5
|
-
* @param {number} y
|
|
6
|
-
* @param {number} k
|
|
7
|
-
* @param {number} a
|
|
8
|
-
* @returns { r
|
|
2
|
+
* Convert CMYK color values to RGBA color space
|
|
3
|
+
* @param {number} c Cyan percentage (0-100)
|
|
4
|
+
* @param {number} m Magenta percentage (0-100)
|
|
5
|
+
* @param {number} y Yellow percentage (0-100)
|
|
6
|
+
* @param {number} k Key/Black percentage (0-100)
|
|
7
|
+
* @param {number} a Alpha value (0-1)
|
|
8
|
+
* @returns {Object} RGBA values (r, g, b as 0-255, a as 0-1)
|
|
9
9
|
* @example cmykToRgba(100, 100, 0, 60.78) // { r: 0, g: 0, b: 100, a: 1 }
|
|
10
10
|
*/
|
|
11
11
|
export declare const cmykToRgba: (c: number, m: number, y: number, k: number, a?: number) => {
|
|
@@ -11,40 +11,40 @@ var _multiplication = require("@/Math/multiplication");
|
|
|
11
11
|
var _roundOf = require("@/Math/roundOf");
|
|
12
12
|
var _subtract = require("@/Math/subtract");
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param {number} c
|
|
16
|
-
* @param {number} m
|
|
17
|
-
* @param {number} y
|
|
18
|
-
* @param {number} k
|
|
19
|
-
* @param {number} a
|
|
20
|
-
* @returns { r
|
|
14
|
+
* Convert CMYK color values to RGBA color space
|
|
15
|
+
* @param {number} c Cyan percentage (0-100)
|
|
16
|
+
* @param {number} m Magenta percentage (0-100)
|
|
17
|
+
* @param {number} y Yellow percentage (0-100)
|
|
18
|
+
* @param {number} k Key/Black percentage (0-100)
|
|
19
|
+
* @param {number} a Alpha value (0-1)
|
|
20
|
+
* @returns {Object} RGBA values (r, g, b as 0-255, a as 0-1)
|
|
21
21
|
* @example cmykToRgba(100, 100, 0, 60.78) // { r: 0, g: 0, b: 100, a: 1 }
|
|
22
22
|
*/
|
|
23
23
|
var cmykToRgba = exports.cmykToRgba = function cmykToRgba(c, m, y, k) {
|
|
24
24
|
var a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
25
|
-
// CMYK
|
|
25
|
+
// Clamp CMYK values to 0-100 range
|
|
26
26
|
var clampedC = (0, _max.max)(0, (0, _min.min)(100, c));
|
|
27
27
|
var clampedM = (0, _max.max)(0, (0, _min.min)(100, m));
|
|
28
28
|
var clampedY = (0, _max.max)(0, (0, _min.min)(100, y));
|
|
29
29
|
var clampedK = (0, _max.max)(0, (0, _min.min)(100, k));
|
|
30
30
|
|
|
31
|
-
// CMYK
|
|
31
|
+
// Convert CMYK values to 0-1 range
|
|
32
32
|
var cPercentage = (0, _division.division)(clampedC, 100);
|
|
33
33
|
var mPercentage = (0, _division.division)(clampedM, 100);
|
|
34
34
|
var yPercentage = (0, _division.division)(clampedY, 100);
|
|
35
35
|
var kPercentage = (0, _division.division)(clampedK, 100);
|
|
36
36
|
|
|
37
|
-
// RGB
|
|
37
|
+
// Calculate RGB values
|
|
38
38
|
var r = (0, _multiplication.multiplication)(255, (0, _subtract.subtract)(1, cPercentage), (0, _subtract.subtract)(1, kPercentage));
|
|
39
39
|
var g = (0, _multiplication.multiplication)(255, (0, _subtract.subtract)(1, mPercentage), (0, _subtract.subtract)(1, kPercentage));
|
|
40
40
|
var b = (0, _multiplication.multiplication)(255, (0, _subtract.subtract)(1, yPercentage), (0, _subtract.subtract)(1, kPercentage));
|
|
41
41
|
|
|
42
|
-
// RGB
|
|
42
|
+
// Round RGB values to 0-255 range
|
|
43
43
|
var roundedR = (0, _roundOf.roundOf)(r);
|
|
44
44
|
var roundedG = (0, _roundOf.roundOf)(g);
|
|
45
45
|
var roundedB = (0, _roundOf.roundOf)(b);
|
|
46
46
|
|
|
47
|
-
//
|
|
47
|
+
// Clamp alpha value to 0-1 range
|
|
48
48
|
var clampedA = (0, _max.max)(0, (0, _min.min)(1, a));
|
|
49
49
|
return {
|
|
50
50
|
r: roundedR,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param hex
|
|
4
|
-
* @returns { r
|
|
2
|
+
* Convert hexadecimal color code to RGBA color values
|
|
3
|
+
* @param hex Hexadecimal color code (3, 6, or 8 digits with #)
|
|
4
|
+
* @returns {Object} RGBA values (r, g, b as 0-255, a as 0-1)
|
|
5
5
|
* @example hexToRgba("#00000000") // { r: 0, g: 0, b: 0, a: 0 }
|
|
6
|
+
* @throws {Error} If the hex code format is invalid
|
|
6
7
|
*/
|
|
7
8
|
export declare const hexaToRgba: (hex: string) => {
|
|
8
9
|
r: number;
|
|
@@ -5,26 +5,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.hexaToRgba = void 0;
|
|
7
7
|
var _division = require("@/Math/division");
|
|
8
|
+
var _roundOf = require("@/Math/roundOf");
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param hex
|
|
11
|
-
* @returns { r
|
|
10
|
+
* Convert hexadecimal color code to RGBA color values
|
|
11
|
+
* @param hex Hexadecimal color code (3, 6, or 8 digits with #)
|
|
12
|
+
* @returns {Object} RGBA values (r, g, b as 0-255, a as 0-1)
|
|
12
13
|
* @example hexToRgba("#00000000") // { r: 0, g: 0, b: 0, a: 0 }
|
|
14
|
+
* @throws {Error} If the hex code format is invalid
|
|
13
15
|
*/
|
|
14
16
|
var hexaToRgba = exports.hexaToRgba = function hexaToRgba(hex) {
|
|
15
|
-
// hex
|
|
17
|
+
// Validate hex code format
|
|
16
18
|
if (/^#([\da-f]{3}|[\da-f]{6}|[\da-f]{8})$/i.test(hex) === false) {
|
|
17
19
|
throw new Error("Invalid hex code");
|
|
18
20
|
}
|
|
19
21
|
var hexCode = hex.replace("#", "");
|
|
22
|
+
|
|
23
|
+
// Convert 3-digit hex to 6-digit format
|
|
24
|
+
if (hexCode.length === 3) {
|
|
25
|
+
hexCode = hexCode.split("").map(function (_char) {
|
|
26
|
+
return _char + _char;
|
|
27
|
+
}).join("");
|
|
28
|
+
}
|
|
20
29
|
var r = Number.parseInt(hexCode.slice(0, 2), 16);
|
|
21
30
|
var g = Number.parseInt(hexCode.slice(2, 4), 16);
|
|
22
31
|
var b = Number.parseInt(hexCode.slice(4, 6), 16);
|
|
23
|
-
var
|
|
32
|
+
var alphaValue = hexCode.length === 8 ? Number.parseInt(hexCode.slice(6, 8), 16) : 255;
|
|
33
|
+
var a = (0, _roundOf.roundOf)((0, _division.division)(alphaValue, 255), 2);
|
|
34
|
+
|
|
35
|
+
// NaN check is not necessary since validation ensures valid hex values
|
|
24
36
|
return {
|
|
25
37
|
r: r,
|
|
26
38
|
g: g,
|
|
27
39
|
b: b,
|
|
28
|
-
a:
|
|
40
|
+
a: a
|
|
29
41
|
};
|
|
30
42
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param h
|
|
4
|
-
* @param s
|
|
5
|
-
* @param l
|
|
6
|
-
* @param a
|
|
7
|
-
* @returns { r
|
|
2
|
+
* Convert HSLA color values to RGBA color space
|
|
3
|
+
* @param h Hue angle in degrees (0-360)
|
|
4
|
+
* @param s Saturation percentage (0-100)
|
|
5
|
+
* @param l Lightness percentage (0-100)
|
|
6
|
+
* @param a Alpha value (0-1)
|
|
7
|
+
* @returns {Object} RGBA values (r, g, b as 0-255, a as 0-1)
|
|
8
8
|
* @example hslaToRgba(120, 50, 50, 1) // { r: 64, g: 191, b: 64, a: 1 }
|
|
9
|
+
* @throws {Error} If any input values are out of their valid ranges
|
|
9
10
|
*/
|
|
10
11
|
export declare const hslaToRgba: (h: number, s: number, l: number, a?: number) => {
|
|
11
12
|
r: number;
|
|
@@ -12,23 +12,29 @@ var _multiplication = require("@/Math/multiplication");
|
|
|
12
12
|
var _roundOf = require("@/Math/roundOf");
|
|
13
13
|
var _subtract = require("@/Math/subtract");
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @param h
|
|
17
|
-
* @param s
|
|
18
|
-
* @param l
|
|
19
|
-
* @param a
|
|
20
|
-
* @returns { r
|
|
15
|
+
* Convert HSLA color values to RGBA color space
|
|
16
|
+
* @param h Hue angle in degrees (0-360)
|
|
17
|
+
* @param s Saturation percentage (0-100)
|
|
18
|
+
* @param l Lightness percentage (0-100)
|
|
19
|
+
* @param a Alpha value (0-1)
|
|
20
|
+
* @returns {Object} RGBA values (r, g, b as 0-255, a as 0-1)
|
|
21
21
|
* @example hslaToRgba(120, 50, 50, 1) // { r: 64, g: 191, b: 64, a: 1 }
|
|
22
|
+
* @throws {Error} If any input values are out of their valid ranges
|
|
22
23
|
*/
|
|
23
24
|
var hslaToRgba = exports.hslaToRgba = function hslaToRgba(h, s, l) {
|
|
24
25
|
var a = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
// Validate input ranges
|
|
27
|
+
if (h < 0 || h > 360) {
|
|
28
|
+
throw new Error("Hue must be between 0 and 360 degrees");
|
|
29
|
+
}
|
|
30
|
+
if (s < 0 || s > 100) {
|
|
31
|
+
throw new Error("Saturation must be between 0 and 100 percent");
|
|
32
|
+
}
|
|
33
|
+
if (l < 0 || l > 100) {
|
|
34
|
+
throw new Error("Lightness must be between 0 and 100 percent");
|
|
35
|
+
}
|
|
36
|
+
if (a < 0 || a > 1) {
|
|
37
|
+
throw new Error("Alpha must be between 0 and 1");
|
|
32
38
|
}
|
|
33
39
|
var hue = (0, _division.division)((0, _division.division)(h, 360, false)[1], 360);
|
|
34
40
|
var saturation = (0, _division.division)((0, _max.max)(0, (0, _min.min)(s, 100)), 100);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param rgba
|
|
4
|
-
* @returns { c
|
|
2
|
+
* Convert RGBA color to CMYK color model
|
|
3
|
+
* @param rgba Object containing r, g, b values (0-255) and optional a (0-1)
|
|
4
|
+
* @returns {Object} CMYK values (c, m, y, k as percentages 0-100) and alpha channel
|
|
5
5
|
* @example rgbaToCmyk({ r: 0, g: 0, b: 0, a: 1 }); // { c: 0, m: 0, y: 0, k: 100, a: 1 }
|
|
6
6
|
*/
|
|
7
7
|
export declare const rgbaToCmyk: ({ r, g, b, a, }: {
|
|
@@ -8,9 +8,9 @@ var _division = require("@/Math/division");
|
|
|
8
8
|
var _roundOf = require("@/Math/roundOf");
|
|
9
9
|
var _subtract = require("@/Math/subtract");
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param rgba
|
|
13
|
-
* @returns { c
|
|
11
|
+
* Convert RGBA color to CMYK color model
|
|
12
|
+
* @param rgba Object containing r, g, b values (0-255) and optional a (0-1)
|
|
13
|
+
* @returns {Object} CMYK values (c, m, y, k as percentages 0-100) and alpha channel
|
|
14
14
|
* @example rgbaToCmyk({ r: 0, g: 0, b: 0, a: 1 }); // { c: 0, m: 0, y: 0, k: 100, a: 1 }
|
|
15
15
|
*/
|
|
16
16
|
var rgbaToCmyk = exports.rgbaToCmyk = function rgbaToCmyk(_ref) {
|
|
@@ -19,6 +19,10 @@ var rgbaToCmyk = exports.rgbaToCmyk = function rgbaToCmyk(_ref) {
|
|
|
19
19
|
b = _ref.b,
|
|
20
20
|
_ref$a = _ref.a,
|
|
21
21
|
a = _ref$a === void 0 ? 1 : _ref$a;
|
|
22
|
+
// Validate RGBA values
|
|
23
|
+
if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255 || a < 0 || a > 1) {
|
|
24
|
+
throw new Error("Invalid rgba value");
|
|
25
|
+
}
|
|
22
26
|
var rPrime = (0, _division.division)(r, 255);
|
|
23
27
|
var gPrime = (0, _division.division)(g, 255);
|
|
24
28
|
var bPrime = (0, _division.division)(b, 255);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param rgba
|
|
4
|
-
* @returns {string}
|
|
5
|
-
* @example rgbaToHexA({ r: 0, g: 0, b: 0, a: 1 }); // "#
|
|
2
|
+
* Convert RGBA color to hexadecimal color code
|
|
3
|
+
* @param rgba Object containing r, g, b values (0-255) and optional a (0-1)
|
|
4
|
+
* @returns {string} Hexadecimal color code including alpha channel
|
|
5
|
+
* @example rgbaToHexA({ r: 0, g: 0, b: 0, a: 1 }); // "#000000ff"
|
|
6
6
|
*/
|
|
7
7
|
export declare const rgbaToHexA: ({ r, g, b, a, }: {
|
|
8
8
|
r: number;
|