umt 2.1.2 → 2.2.1
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 -2
- package/module/Validate/isBun.js.map +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 -2
- 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 +2 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _randomSelect = require("@/Array/randomSelect");
|
|
4
4
|
describe("randomSelect", function () {
|
|
5
|
-
it("
|
|
5
|
+
it("should randomly select the specified number of elements", function () {
|
|
6
6
|
var array = [1, 2, 3, 4, 5];
|
|
7
7
|
var result = (0, _randomSelect.randomSelect)(array, 2);
|
|
8
8
|
expect(result).toHaveLength(2);
|
|
@@ -10,7 +10,7 @@ describe("randomSelect", function () {
|
|
|
10
10
|
expect(array).toContain(item);
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
-
it("
|
|
13
|
+
it("should return elements equal to array length when count exceeds array length", function () {
|
|
14
14
|
var array = [1, 2, 3];
|
|
15
15
|
var result = (0, _randomSelect.randomSelect)(array, 5);
|
|
16
16
|
expect(result).toHaveLength(3);
|
|
@@ -18,11 +18,11 @@ describe("randomSelect", function () {
|
|
|
18
18
|
expect(array).toContain(item);
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
it("
|
|
21
|
+
it("should return an empty array when given an empty array", function () {
|
|
22
22
|
var result = (0, _randomSelect.randomSelect)([], 3);
|
|
23
23
|
expect(result).toEqual([]);
|
|
24
24
|
});
|
|
25
|
-
it("
|
|
25
|
+
it("should return specified count with duplicates when allowDuplicates is true", function () {
|
|
26
26
|
var array = [1, 2, 3];
|
|
27
27
|
var result = (0, _randomSelect.randomSelect)(array, 5, true);
|
|
28
28
|
expect(result).toHaveLength(5);
|
|
@@ -30,7 +30,7 @@ describe("randomSelect", function () {
|
|
|
30
30
|
expect(array).toContain(item);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
|
-
it("
|
|
33
|
+
it("should return specified count without duplicates when allowDuplicates is false", function () {
|
|
34
34
|
var array = [1, 2, 3, 4, 5];
|
|
35
35
|
var result = (0, _randomSelect.randomSelect)(array, 3, false);
|
|
36
36
|
expect(result).toHaveLength(3);
|
|
@@ -38,9 +38,14 @@ describe("randomSelect", function () {
|
|
|
38
38
|
expect(array).toContain(item);
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
-
it("
|
|
41
|
+
it("should return an empty array when count is negative", function () {
|
|
42
42
|
var array = [1, 2, 3, 4, 5];
|
|
43
43
|
var result = (0, _randomSelect.randomSelect)(array, -1);
|
|
44
44
|
expect(result).toEqual([]);
|
|
45
45
|
});
|
|
46
|
+
it("should return an empty array when count is zero", function () {
|
|
47
|
+
var array = [1, 2, 3, 4, 5];
|
|
48
|
+
var result = (0, _randomSelect.randomSelect)(array, 0);
|
|
49
|
+
expect(result).toEqual([]);
|
|
50
|
+
});
|
|
46
51
|
});
|
|
@@ -2,20 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
var _range = require("@/Array/range");
|
|
4
4
|
describe("range", function () {
|
|
5
|
-
test("-5
|
|
5
|
+
test("should generate an array of consecutive numbers from -5 to 5", function () {
|
|
6
6
|
var result = (0, _range.range)(-5, 5);
|
|
7
7
|
expect(result).toEqual([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4]);
|
|
8
8
|
});
|
|
9
|
-
test("1
|
|
9
|
+
test("should generate an array of consecutive numbers from 1 to 10", function () {
|
|
10
10
|
var result = (0, _range.range)(1, 10);
|
|
11
11
|
expect(result).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
|
12
12
|
});
|
|
13
|
-
test("
|
|
13
|
+
test("should return an empty array when start equals end", function () {
|
|
14
14
|
expect((0, _range.range)(0, 0)).toEqual([]);
|
|
15
15
|
expect((0, _range.range)(5, 5)).toEqual([]);
|
|
16
16
|
});
|
|
17
|
-
test("0
|
|
17
|
+
test("should generate an array of consecutive numbers from 0 to start", function () {
|
|
18
18
|
var result = (0, _range.range)(5);
|
|
19
19
|
expect(result).toEqual([0, 1, 2, 3, 4]);
|
|
20
20
|
});
|
|
21
|
+
test("should generate an array with specified step", function () {
|
|
22
|
+
expect((0, _range.range)(0, 10, 2)).toEqual([0, 2, 4, 6, 8]);
|
|
23
|
+
expect((0, _range.range)(0, 5, 0.5)).toEqual([0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5]);
|
|
24
|
+
});
|
|
25
|
+
test("should handle negative step", function () {
|
|
26
|
+
expect((0, _range.range)(5, 0, -1)).toEqual([5, 4, 3, 2, 1]);
|
|
27
|
+
expect((0, _range.range)(0, -5, -1)).toEqual([0, -1, -2, -3, -4]);
|
|
28
|
+
expect((0, _range.range)(10, 5, -2)).toEqual([10, 8, 6]);
|
|
29
|
+
});
|
|
30
|
+
test("should handle step of zero", function () {
|
|
31
|
+
expect((0, _range.range)(0, 5, 0)).toEqual([]); // Avoid infinite loop
|
|
32
|
+
});
|
|
33
|
+
test("should handle start greater than end", function () {
|
|
34
|
+
expect((0, _range.range)(10, 5)).toEqual([]); // Returns empty array when start > end
|
|
35
|
+
});
|
|
36
|
+
test("should handle floating point steps", function () {
|
|
37
|
+
expect((0, _range.range)(0, 1, 0.2)).toEqual([0, 0.2, 0.4, 0.6, 0.8]);
|
|
38
|
+
});
|
|
39
|
+
test("should handle single step from 0 to start", function () {
|
|
40
|
+
expect((0, _range.range)(3, undefined, 2)).toEqual([0, 2]);
|
|
41
|
+
});
|
|
21
42
|
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _shuffle = require("@/Array/shuffle");
|
|
4
|
-
describe("shuffle
|
|
5
|
-
it("
|
|
4
|
+
describe("shuffle function", function () {
|
|
5
|
+
it("should shuffle array elements", function () {
|
|
6
6
|
var array = [1, 2, 3, 4, 5];
|
|
7
7
|
var shuffledArray = (0, _shuffle.shuffle)(array);
|
|
8
8
|
expect(shuffledArray).not.toEqual(array);
|
|
9
9
|
expect(shuffledArray.sort()).toEqual(array.sort());
|
|
10
10
|
});
|
|
11
|
-
it("
|
|
11
|
+
it("should return empty array unchanged", function () {
|
|
12
12
|
var array = [];
|
|
13
13
|
var shuffledArray = (0, _shuffle.shuffle)(array);
|
|
14
14
|
expect(shuffledArray).toEqual(array);
|
|
15
15
|
});
|
|
16
|
-
it("
|
|
16
|
+
it("should maintain the same length after shuffling", function () {
|
|
17
17
|
var array = [1, 2, 3, 4, 5];
|
|
18
18
|
var shuffledArray = (0, _shuffle.shuffle)(array);
|
|
19
19
|
expect(shuffledArray.length).toBe(array.length);
|
|
20
20
|
});
|
|
21
|
-
it("
|
|
21
|
+
it("should shuffle array with mixed strings and numbers", function () {
|
|
22
22
|
var array = [1, "2", 3, "4", 5];
|
|
23
23
|
var shuffledArray = (0, _shuffle.shuffle)(array);
|
|
24
24
|
expect(shuffledArray).not.toEqual(array);
|
|
25
25
|
expect(shuffledArray.sort()).toEqual(array.sort());
|
|
26
26
|
});
|
|
27
|
-
it("
|
|
27
|
+
it("should shuffle large arrays", function () {
|
|
28
28
|
var array = Array.from({
|
|
29
29
|
length: 1000
|
|
30
30
|
}, function (_, index) {
|
|
@@ -34,4 +34,51 @@ describe("shuffle関数のテスト", function () {
|
|
|
34
34
|
expect(shuffledArray).not.toEqual(array);
|
|
35
35
|
expect(shuffledArray.sort()).toEqual(array.sort());
|
|
36
36
|
});
|
|
37
|
+
it("should return single-element array unchanged", function () {
|
|
38
|
+
var array = [1];
|
|
39
|
+
var shuffledArray = (0, _shuffle.shuffle)(array);
|
|
40
|
+
expect(shuffledArray).toEqual(array);
|
|
41
|
+
});
|
|
42
|
+
it("should maintain frequency of duplicate elements", function () {
|
|
43
|
+
var array = [1, 1, 2, 2, 3, 3];
|
|
44
|
+
var shuffledArray = (0, _shuffle.shuffle)(array);
|
|
45
|
+
var countElements = function countElements(arr) {
|
|
46
|
+
return arr.reduce(function (acc, curr) {
|
|
47
|
+
acc[curr] = (acc[curr] || 0) + 1;
|
|
48
|
+
return acc;
|
|
49
|
+
}, {});
|
|
50
|
+
};
|
|
51
|
+
expect(countElements(shuffledArray)).toEqual(countElements(array));
|
|
52
|
+
});
|
|
53
|
+
it("should handle array of objects", function () {
|
|
54
|
+
var array = [{
|
|
55
|
+
id: 1,
|
|
56
|
+
value: "one"
|
|
57
|
+
}, {
|
|
58
|
+
id: 2,
|
|
59
|
+
value: "two"
|
|
60
|
+
}, {
|
|
61
|
+
id: 3,
|
|
62
|
+
value: "three"
|
|
63
|
+
}, {
|
|
64
|
+
id: 4,
|
|
65
|
+
value: "four"
|
|
66
|
+
}, {
|
|
67
|
+
id: 5,
|
|
68
|
+
value: "five"
|
|
69
|
+
}];
|
|
70
|
+
var shuffledArray = (0, _shuffle.shuffle)(array);
|
|
71
|
+
expect(shuffledArray).not.toEqual(array);
|
|
72
|
+
expect(shuffledArray.map(function (obj) {
|
|
73
|
+
return obj.id;
|
|
74
|
+
}).sort()).toEqual(array.map(function (obj) {
|
|
75
|
+
return obj.id;
|
|
76
|
+
}).sort());
|
|
77
|
+
});
|
|
78
|
+
it("should not modify the original array", function () {
|
|
79
|
+
var array = [1, 2, 3, 4, 5];
|
|
80
|
+
var originalArray = [].concat(array);
|
|
81
|
+
(0, _shuffle.shuffle)(array);
|
|
82
|
+
expect(array).toEqual(originalArray);
|
|
83
|
+
});
|
|
37
84
|
});
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _shuffle2DArray = require("@/Array/shuffle2DArray");
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
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; } }
|
|
7
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
9
|
+
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; }
|
|
10
|
+
describe("shuffle2DArray function", function () {
|
|
11
|
+
it("should handle single-element 2D array", function () {
|
|
12
|
+
var array = [[1]];
|
|
13
|
+
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
14
|
+
expect(shuffledArray).toEqual(array);
|
|
15
|
+
});
|
|
16
|
+
it("should return empty 2D array unchanged", function () {
|
|
6
17
|
var array = [];
|
|
7
18
|
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
8
19
|
expect(shuffledArray).toEqual(array);
|
|
9
20
|
});
|
|
10
|
-
it("
|
|
21
|
+
it("should return array with empty subarrays unchanged", function () {
|
|
11
22
|
var array = [[], [], []];
|
|
12
23
|
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
13
24
|
expect(shuffledArray).toEqual(array);
|
|
14
25
|
});
|
|
15
|
-
it("
|
|
26
|
+
it("should maintain the same length of 2D array and subarrays after shuffling", function () {
|
|
16
27
|
var array = [[1, 2], [3, 4], [5, 6]];
|
|
17
28
|
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
18
29
|
expect(shuffledArray.length).toBe(array.length);
|
|
@@ -20,28 +31,60 @@ describe("shuffle2DArray関数のテスト", function () {
|
|
|
20
31
|
expect(subArray.length).toBe(array[index].length);
|
|
21
32
|
});
|
|
22
33
|
});
|
|
23
|
-
it("
|
|
34
|
+
it("should shuffle 2D array with mixed types", function () {
|
|
24
35
|
var array = [[1, "2"], ["3", 4], [5, "6"]];
|
|
25
36
|
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
26
|
-
//
|
|
37
|
+
// Check if the entire array is shuffled
|
|
27
38
|
expect(shuffledArray.map(function (subArray) {
|
|
28
39
|
return subArray.sort();
|
|
29
40
|
})).not.toEqual(array.map(function (subArray) {
|
|
30
41
|
return subArray.sort();
|
|
31
42
|
}));
|
|
32
43
|
});
|
|
33
|
-
it("
|
|
44
|
+
it("should shuffle large 2D arrays", function () {
|
|
34
45
|
var array = Array.from({
|
|
35
46
|
length: 1000
|
|
36
47
|
}, function (_, index) {
|
|
37
48
|
return [index, index + 1];
|
|
38
49
|
});
|
|
39
50
|
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
40
|
-
//
|
|
51
|
+
// Check if the entire array is shuffled
|
|
41
52
|
expect(shuffledArray.map(function (subArray) {
|
|
42
53
|
return subArray.sort();
|
|
43
54
|
})).not.toEqual(array.map(function (subArray) {
|
|
44
55
|
return subArray.sort();
|
|
45
56
|
}));
|
|
46
57
|
});
|
|
58
|
+
it("should handle subarrays of different lengths", function () {
|
|
59
|
+
var array = [[1], [2, 3], [4, 5, 6]];
|
|
60
|
+
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
61
|
+
expect(shuffledArray.length).toBe(array.length);
|
|
62
|
+
shuffledArray.forEach(function (subArray, index) {
|
|
63
|
+
expect(subArray.length).toBe(array[index].length);
|
|
64
|
+
});
|
|
65
|
+
// Verify the total number of elements remains the same
|
|
66
|
+
var flatOriginal = array.flat();
|
|
67
|
+
var flatShuffled = shuffledArray.flat();
|
|
68
|
+
expect(flatShuffled.sort()).toEqual(flatOriginal.sort());
|
|
69
|
+
});
|
|
70
|
+
it("should not modify the original array", function () {
|
|
71
|
+
var array = [[1, 2], [3, 4], [5, 6]];
|
|
72
|
+
var originalArray = array.map(function (subArray) {
|
|
73
|
+
return _toConsumableArray(subArray);
|
|
74
|
+
});
|
|
75
|
+
(0, _shuffle2DArray.shuffle2DArray)(array);
|
|
76
|
+
expect(array).toEqual(originalArray);
|
|
77
|
+
});
|
|
78
|
+
it("should maintain the total count of each unique element", function () {
|
|
79
|
+
var array = [[1, 1], [2, 2], [1, 2]];
|
|
80
|
+
var shuffledArray = (0, _shuffle2DArray.shuffle2DArray)(array);
|
|
81
|
+
var countElements = function countElements(arr) {
|
|
82
|
+
var counts = {};
|
|
83
|
+
arr.flat().forEach(function (num) {
|
|
84
|
+
counts[num] = (counts[num] || 0) + 1;
|
|
85
|
+
});
|
|
86
|
+
return counts;
|
|
87
|
+
};
|
|
88
|
+
expect(countElements(shuffledArray)).toEqual(countElements(array));
|
|
89
|
+
});
|
|
47
90
|
});
|
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _sum = require("@/Array/sum");
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
describe("sum function", function () {
|
|
5
|
+
it("should calculate sum of integer numbers", function () {
|
|
6
|
+
expect((0, _sum.sum)([1, 2, 3])).toBe(6);
|
|
7
|
+
expect((0, _sum.sum)([10, 20, 30])).toBe(60);
|
|
8
|
+
expect((0, _sum.sum)([-1, -2, -3])).toBe(-6);
|
|
9
|
+
expect((0, _sum.sum)([])).toBe(0);
|
|
10
|
+
});
|
|
11
|
+
it("should calculate sum of decimal numbers", function () {
|
|
12
|
+
expect((0, _sum.sum)([0.1, 0.2, 0.3])).toBe(0.6);
|
|
13
|
+
expect((0, _sum.sum)([1.1, 2.2, 3.3])).toBe(6.6);
|
|
14
|
+
expect((0, _sum.sum)([0.1, 0.02, 0.003])).toBe(0.123);
|
|
15
|
+
});
|
|
16
|
+
it("should handle mixed integer and decimal numbers", function () {
|
|
17
|
+
expect((0, _sum.sum)([1, 2.5, 3.7])).toBe(7.2);
|
|
18
|
+
expect((0, _sum.sum)([-1.5, 2, -3.7])).toBe(-3.2);
|
|
19
|
+
});
|
|
20
|
+
it("should handle large numbers", function () {
|
|
21
|
+
var largeNum = 1000000000; // 10^9
|
|
22
|
+
expect((0, _sum.sum)([largeNum, largeNum])).toBe(2 * largeNum);
|
|
23
|
+
expect((0, _sum.sum)([largeNum, -largeNum])).toBe(0);
|
|
24
|
+
expect((0, _sum.sum)([largeNum, 1, -1])).toBe(largeNum);
|
|
25
|
+
var mediumNum = 1000000; // 10^6
|
|
26
|
+
var count = 1000;
|
|
27
|
+
var arr = new Array(count).fill(mediumNum);
|
|
28
|
+
expect((0, _sum.sum)(arr)).toBe(mediumNum * count);
|
|
29
|
+
});
|
|
30
|
+
it("should handle very small numbers", function () {
|
|
31
|
+
var smallNum = Number.MIN_VALUE;
|
|
32
|
+
expect((0, _sum.sum)([smallNum, smallNum])).toBe(2 * smallNum);
|
|
33
|
+
expect((0, _sum.sum)([smallNum, -smallNum])).toBe(0);
|
|
34
|
+
});
|
|
35
|
+
it("should handle JavaScript number precision", function () {
|
|
36
|
+
// Testing number precision handling
|
|
37
|
+
expect((0, _sum.sum)([0.1, 0.2])).toBeCloseTo(0.3, 10);
|
|
38
|
+
expect((0, _sum.sum)([0.1, 0.2, 0.3, 0.4, 0.5])).toBeCloseTo(1.5, 10);
|
|
39
|
+
});
|
|
40
|
+
it("should maintain precision for many decimal places", function () {
|
|
41
|
+
expect((0, _sum.sum)([0.0001, 0.0002, 0.0003])).toBe(0.0006);
|
|
42
|
+
expect((0, _sum.sum)([1.23456, 2.34567, 3.45678])).toBeCloseTo(7.03701, 5);
|
|
43
|
+
});
|
|
6
44
|
});
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
var _timSort = require("@/Array/timSort");
|
|
4
4
|
describe("timSort", function () {
|
|
5
|
-
it("
|
|
5
|
+
it("should return an empty array when sorting an empty array", function () {
|
|
6
6
|
expect((0, _timSort.timSort)([])).toEqual([]);
|
|
7
7
|
});
|
|
8
|
-
it("
|
|
8
|
+
it("should return the same array when it's already sorted", function () {
|
|
9
9
|
expect((0, _timSort.timSort)([1, 2, 3])).toEqual([1, 2, 3]);
|
|
10
10
|
});
|
|
11
|
-
it("
|
|
11
|
+
it("should correctly sort a reverse-sorted array", function () {
|
|
12
12
|
expect((0, _timSort.timSort)([3, 2, 1])).toEqual([1, 2, 3]);
|
|
13
13
|
});
|
|
14
|
-
it("
|
|
14
|
+
it("should correctly sort a random array", function () {
|
|
15
15
|
var array = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5];
|
|
16
16
|
var sortedArray = [].concat(array).sort(function (a, b) {
|
|
17
17
|
return a - b;
|
|
18
18
|
});
|
|
19
19
|
expect((0, _timSort.timSort)(array)).toEqual(sortedArray);
|
|
20
20
|
});
|
|
21
|
-
it("
|
|
21
|
+
it("should correctly sort an array with duplicate elements", function () {
|
|
22
22
|
expect((0, _timSort.timSort)([2, 3, 3, 1, 2])).toEqual([1, 2, 2, 3, 3]);
|
|
23
23
|
});
|
|
24
|
-
it("
|
|
24
|
+
it("should correctly sort an array with large number of elements", function () {
|
|
25
25
|
var largeArray = Array.from({
|
|
26
26
|
length: 10000
|
|
27
27
|
}, function () {
|
|
@@ -32,17 +32,97 @@ describe("timSort", function () {
|
|
|
32
32
|
});
|
|
33
33
|
expect((0, _timSort.timSort)(largeArray)).toEqual(sortedArray);
|
|
34
34
|
});
|
|
35
|
-
it("
|
|
35
|
+
it("should correctly sort an array with negative numbers", function () {
|
|
36
36
|
expect((0, _timSort.timSort)([5, -1, 3, 2, 4, -5, 1, -2, 0])).toEqual([-5, -2, -1, 0, 1, 2, 3, 4, 5]);
|
|
37
37
|
});
|
|
38
|
-
it("
|
|
38
|
+
it("should sort array in descending order", function () {
|
|
39
39
|
expect((0, _timSort.timSort)([1, 2, 3], function (a, b) {
|
|
40
40
|
return b - a;
|
|
41
41
|
})).toEqual([3, 2, 1]);
|
|
42
42
|
});
|
|
43
|
-
it("
|
|
43
|
+
it("should sort a portion of the array", function () {
|
|
44
44
|
expect((0, _timSort.timSort)([1, 3, 2, 5, 4], function (a, b) {
|
|
45
45
|
return a - b;
|
|
46
46
|
}, 1, 3)).toEqual([1, 2, 3, 5, 4]);
|
|
47
47
|
});
|
|
48
|
+
it("should maintain stability when sorting objects", function () {
|
|
49
|
+
var array = [{
|
|
50
|
+
value: 2,
|
|
51
|
+
order: 1
|
|
52
|
+
}, {
|
|
53
|
+
value: 1,
|
|
54
|
+
order: 2
|
|
55
|
+
}, {
|
|
56
|
+
value: 2,
|
|
57
|
+
order: 3
|
|
58
|
+
}, {
|
|
59
|
+
value: 1,
|
|
60
|
+
order: 4
|
|
61
|
+
}];
|
|
62
|
+
var result = (0, _timSort.timSort)(array, function (a, b) {
|
|
63
|
+
return a.value - b.value;
|
|
64
|
+
});
|
|
65
|
+
expect(result.map(function (x) {
|
|
66
|
+
return x.order;
|
|
67
|
+
})).toEqual([2, 4, 1, 3]); // original order within same values
|
|
68
|
+
});
|
|
69
|
+
it("should handle arrays just larger than MIN_RUN", function () {
|
|
70
|
+
var array = Array.from({
|
|
71
|
+
length: 33
|
|
72
|
+
}, function (_, i) {
|
|
73
|
+
return 33 - i;
|
|
74
|
+
});
|
|
75
|
+
var result = (0, _timSort.timSort)(array);
|
|
76
|
+
expect(result).toEqual(Array.from({
|
|
77
|
+
length: 33
|
|
78
|
+
}, function (_, i) {
|
|
79
|
+
return i + 1;
|
|
80
|
+
}));
|
|
81
|
+
});
|
|
82
|
+
it("should handle arrays with repeated elements near run boundaries", function () {
|
|
83
|
+
// Creates runs with repeated elements at boundaries
|
|
84
|
+
var array = [];
|
|
85
|
+
for (var i = 0; i < 64; i++) {
|
|
86
|
+
array.push(Math.floor(i / 16)); // Creates 4 values, each repeated 16 times
|
|
87
|
+
}
|
|
88
|
+
var shuffled = [].concat(array).sort(function () {
|
|
89
|
+
return Math.random() - 0.5;
|
|
90
|
+
});
|
|
91
|
+
expect((0, _timSort.timSort)(shuffled)).toEqual(array);
|
|
92
|
+
});
|
|
93
|
+
it("should handle arrays with all identical elements", function () {
|
|
94
|
+
var array = new Array(100).fill(1);
|
|
95
|
+
expect((0, _timSort.timSort)(array)).toEqual(array);
|
|
96
|
+
});
|
|
97
|
+
it("should handle strings and numbers separately", function () {
|
|
98
|
+
var strings = ["b", "a", "d", "c"];
|
|
99
|
+
var numbers = [3, 1, 4, 2];
|
|
100
|
+
expect((0, _timSort.timSort)(strings)).toEqual(["a", "b", "c", "d"]);
|
|
101
|
+
expect((0, _timSort.timSort)(numbers)).toEqual([1, 2, 3, 4]);
|
|
102
|
+
});
|
|
103
|
+
it("should handle booleans", function () {
|
|
104
|
+
var array = [true, false, true, false];
|
|
105
|
+
expect((0, _timSort.timSort)(array)).toEqual([false, false, true, true]);
|
|
106
|
+
});
|
|
107
|
+
it("should handle null and undefined", function () {
|
|
108
|
+
var array = [null, undefined, null, undefined];
|
|
109
|
+
var compareFunction = function compareFunction(a, b) {
|
|
110
|
+
if (a === b) return 0;
|
|
111
|
+
if (a === null) return -1;
|
|
112
|
+
if (b === null) return 1;
|
|
113
|
+
if (a === undefined) return -1;
|
|
114
|
+
if (b === undefined) return 1;
|
|
115
|
+
return 0;
|
|
116
|
+
};
|
|
117
|
+
expect((0, _timSort.timSort)(array, compareFunction)).toEqual([null, null, undefined, undefined]);
|
|
118
|
+
});
|
|
119
|
+
it("should handle custom comparison for mixed types", function () {
|
|
120
|
+
var array = ["b", 2, "a", 1];
|
|
121
|
+
var compareFunction = function compareFunction(a, b) {
|
|
122
|
+
var aStr = String(a);
|
|
123
|
+
var bStr = String(b);
|
|
124
|
+
return aStr.localeCompare(bStr);
|
|
125
|
+
};
|
|
126
|
+
expect((0, _timSort.timSort)(array, compareFunction)).toEqual([1, 2, "a", "b"]);
|
|
127
|
+
});
|
|
48
128
|
});
|
|
@@ -1,30 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _zip = require("@/Array/zip");
|
|
4
|
-
describe("zip
|
|
5
|
-
it("
|
|
4
|
+
describe("zip function", function () {
|
|
5
|
+
it("should combine multiple arrays", function () {
|
|
6
6
|
var array1 = [1, 2, 3];
|
|
7
7
|
var array2 = ["one", "two", "three"];
|
|
8
8
|
var array3 = [true, false, true];
|
|
9
9
|
var result = (0, _zip.zip)(array1, array2, array3);
|
|
10
10
|
expect(result).toEqual([[1, "one", true], [2, "two", false], [3, "three", true]]);
|
|
11
11
|
});
|
|
12
|
-
it("
|
|
12
|
+
it("should combine arrays of different lengths", function () {
|
|
13
13
|
var array1 = [1, 2];
|
|
14
14
|
var array2 = ["one", "two", "three"];
|
|
15
15
|
var result = (0, _zip.zip)(array1, array2);
|
|
16
16
|
expect(result).toEqual([[1, "one"], [2, "two"]]);
|
|
17
17
|
});
|
|
18
|
-
it("
|
|
18
|
+
it("should handle empty arrays correctly", function () {
|
|
19
19
|
var array1 = [1, 2, 3];
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
var result = (0, _zip.zip)(array1, array2);
|
|
20
|
+
var emptyArray = [];
|
|
21
|
+
var result = (0, _zip.zip)(array1, emptyArray);
|
|
24
22
|
expect(result).toEqual([]);
|
|
25
23
|
});
|
|
26
|
-
it("
|
|
24
|
+
it("should return an empty array when no arguments are provided", function () {
|
|
27
25
|
var result = (0, _zip.zip)();
|
|
28
26
|
expect(result).toEqual([]);
|
|
29
27
|
});
|
|
28
|
+
it("should handle arrays with null and undefined values", function () {
|
|
29
|
+
var array1 = [1, null, 3];
|
|
30
|
+
var array2 = ["a", undefined, "c"];
|
|
31
|
+
var result = (0, _zip.zip)(array1, array2);
|
|
32
|
+
expect(result).toEqual([[1, "a"], [null, undefined], [3, "c"]]);
|
|
33
|
+
});
|
|
34
|
+
it("should handle nested arrays", function () {
|
|
35
|
+
var array1 = [[1], [2], [3]];
|
|
36
|
+
var array2 = [["a"], ["b"], ["c"]];
|
|
37
|
+
var result = (0, _zip.zip)(array1, array2);
|
|
38
|
+
expect(result).toEqual([[[1], ["a"]], [[2], ["b"]], [[3], ["c"]]]);
|
|
39
|
+
});
|
|
40
|
+
it("should handle arrays of objects", function () {
|
|
41
|
+
var array1 = [{
|
|
42
|
+
id: 1
|
|
43
|
+
}, {
|
|
44
|
+
id: 2
|
|
45
|
+
}];
|
|
46
|
+
var array2 = [{
|
|
47
|
+
name: "a"
|
|
48
|
+
}, {
|
|
49
|
+
name: "b"
|
|
50
|
+
}];
|
|
51
|
+
var result = (0, _zip.zip)(array1, array2);
|
|
52
|
+
expect(result).toEqual([[{
|
|
53
|
+
id: 1
|
|
54
|
+
}, {
|
|
55
|
+
name: "a"
|
|
56
|
+
}], [{
|
|
57
|
+
id: 2
|
|
58
|
+
}, {
|
|
59
|
+
name: "b"
|
|
60
|
+
}]]);
|
|
61
|
+
});
|
|
62
|
+
it("should handle mixed type arrays without type errors", function () {
|
|
63
|
+
var numbers = [1, 2];
|
|
64
|
+
var strings = ["a", "b"];
|
|
65
|
+
var booleans = [true, false];
|
|
66
|
+
var result = (0, _zip.zip)(numbers, strings, booleans);
|
|
67
|
+
expect(result).toEqual([[1, "a", true], [2, "b", false]]);
|
|
68
|
+
});
|
|
30
69
|
});
|
|
@@ -1,31 +1,74 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _zipLongest = require("@/Array/zipLongest");
|
|
4
|
-
describe("zipLongest
|
|
5
|
-
it("
|
|
4
|
+
describe("zipLongest function", function () {
|
|
5
|
+
it("should combine arrays of different lengths with undefined padding", function () {
|
|
6
6
|
var array1 = [1, 2];
|
|
7
7
|
var array2 = ["one", "two", "three"];
|
|
8
8
|
var array3 = [true, false, true, false];
|
|
9
9
|
var result = (0, _zipLongest.zipLongest)(array1, array2, array3);
|
|
10
10
|
expect(result).toEqual([[1, "one", true], [2, "two", false], [undefined, "three", true], [undefined, undefined, false]]);
|
|
11
11
|
});
|
|
12
|
-
it("
|
|
12
|
+
it("should combine arrays of equal length", function () {
|
|
13
13
|
var array1 = [1, 2, 3];
|
|
14
14
|
var array2 = ["one", "two", "three"];
|
|
15
15
|
var array3 = [true, false, true];
|
|
16
16
|
var result = (0, _zipLongest.zipLongest)(array1, array2, array3);
|
|
17
17
|
expect(result).toEqual([[1, "one", true], [2, "two", false], [3, "three", true]]);
|
|
18
18
|
});
|
|
19
|
-
it("
|
|
19
|
+
it("should handle empty arrays correctly", function () {
|
|
20
20
|
var array1 = [1, 2, 3];
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
var result = (0, _zipLongest.zipLongest)(array1, array2);
|
|
21
|
+
var emptyArray = [];
|
|
22
|
+
var result = (0, _zipLongest.zipLongest)(array1, emptyArray);
|
|
25
23
|
expect(result).toEqual([[1, undefined], [2, undefined], [3, undefined]]);
|
|
26
24
|
});
|
|
27
|
-
it("
|
|
25
|
+
it("should return an empty array when no arguments are provided", function () {
|
|
28
26
|
var result = (0, _zipLongest.zipLongest)();
|
|
29
27
|
expect(result).toEqual([]);
|
|
30
28
|
});
|
|
29
|
+
it("should handle arrays with null and undefined values", function () {
|
|
30
|
+
var array1 = [1, null, 3];
|
|
31
|
+
var array2 = ["a", undefined, "c", "d"];
|
|
32
|
+
var result = (0, _zipLongest.zipLongest)(array1, array2);
|
|
33
|
+
expect(result).toEqual([[1, "a"], [null, undefined], [3, "c"], [undefined, "d"]]);
|
|
34
|
+
});
|
|
35
|
+
it("should handle nested arrays", function () {
|
|
36
|
+
var array1 = [[1], [2]];
|
|
37
|
+
var array2 = [["a"], ["b"], ["c"]];
|
|
38
|
+
var result = (0, _zipLongest.zipLongest)(array1, array2);
|
|
39
|
+
expect(result).toEqual([[[1], ["a"]], [[2], ["b"]], [undefined, ["c"]]]);
|
|
40
|
+
});
|
|
41
|
+
it("should handle arrays of objects", function () {
|
|
42
|
+
var array1 = [{
|
|
43
|
+
id: 1
|
|
44
|
+
}, {
|
|
45
|
+
id: 2
|
|
46
|
+
}];
|
|
47
|
+
var array2 = [{
|
|
48
|
+
name: "a"
|
|
49
|
+
}, {
|
|
50
|
+
name: "b"
|
|
51
|
+
}, {
|
|
52
|
+
name: "c"
|
|
53
|
+
}];
|
|
54
|
+
var result = (0, _zipLongest.zipLongest)(array1, array2);
|
|
55
|
+
expect(result).toEqual([[{
|
|
56
|
+
id: 1
|
|
57
|
+
}, {
|
|
58
|
+
name: "a"
|
|
59
|
+
}], [{
|
|
60
|
+
id: 2
|
|
61
|
+
}, {
|
|
62
|
+
name: "b"
|
|
63
|
+
}], [undefined, {
|
|
64
|
+
name: "c"
|
|
65
|
+
}]]);
|
|
66
|
+
});
|
|
67
|
+
it("should handle mixed type arrays with type safety", function () {
|
|
68
|
+
var numbers = [1, 2];
|
|
69
|
+
var strings = ["a", "b", "c"];
|
|
70
|
+
var booleans = [true];
|
|
71
|
+
var result = (0, _zipLongest.zipLongest)(numbers, strings, booleans);
|
|
72
|
+
expect(result).toEqual([[1, "a", true], [2, "b", undefined], [undefined, "c", undefined]]);
|
|
73
|
+
});
|
|
31
74
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _cmykToRgba = require("@/Color/cmykToRgba");
|
|
4
|
-
describe("cmykToRgba
|
|
4
|
+
describe("cmykToRgba function", function () {
|
|
5
5
|
it.each([[100, 100, 0, 60.78, 1, {
|
|
6
6
|
r: 0,
|
|
7
7
|
g: 0,
|
|
@@ -32,10 +32,10 @@ describe("cmykToRgba関数のテスト", function () {
|
|
|
32
32
|
g: 64,
|
|
33
33
|
b: 64,
|
|
34
34
|
a: 1
|
|
35
|
-
}]])("CMYK(%i, %i, %i, %i, %i)
|
|
35
|
+
}]])("should convert CMYK(%i, %i, %i, %i, %i) to RGBA", function (c, m, y, k, a, expected) {
|
|
36
36
|
expect((0, _cmykToRgba.cmykToRgba)(c, m, y, k, a)).toEqual(expected);
|
|
37
37
|
});
|
|
38
|
-
it("
|
|
38
|
+
it("should handle invalid values", function () {
|
|
39
39
|
expect((0, _cmykToRgba.cmykToRgba)(-1, 100, 100, 0)).toEqual({
|
|
40
40
|
r: 255,
|
|
41
41
|
g: 0,
|