umt 2.3.0 → 2.5.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/README.md +277 -16
- package/module/Array/chunk.js +5 -3
- package/module/Array/chunk.js.map +1 -1
- package/module/Array/dualPivotQuickSort.d.ts +1 -2
- package/module/Array/dualPivotQuickSort.js +5 -26
- package/module/Array/dualPivotQuickSort.js.map +1 -1
- package/module/Array/groupBy.js +8 -7
- 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/quickSort.js +7 -25
- package/module/Array/quickSort.js.map +1 -1
- package/module/Array/sortingHelpers/applyInsertionSortIfNeeded.d.ts +13 -0
- package/module/Array/sortingHelpers/applyInsertionSortIfNeeded.js +20 -0
- package/module/Array/sortingHelpers/applyInsertionSortIfNeeded.js.map +1 -0
- package/module/Array/sortingHelpers/rangeValidator.d.ts +17 -0
- package/module/Array/sortingHelpers/rangeValidator.js +26 -0
- package/module/Array/sortingHelpers/rangeValidator.js.map +1 -0
- package/module/Array/timSort.js +2 -20
- package/module/Array/timSort.js.map +1 -1
- package/module/Array/ultraNumberSort.d.ts +7 -0
- package/module/Array/ultraNumberSort.js +373 -0
- package/module/Array/ultraNumberSort.js.map +1 -0
- package/module/Tool/pipe.d.ts +1 -1
- package/module/Tool/pipe.js.map +1 -1
- package/module/Validate/object/core.d.ts +2 -6
- package/module/Validate/object/core.js.map +1 -1
- package/module/Validate/type.d.ts +1 -0
- package/module/es5/Array/chunk.js +5 -3
- package/module/es5/Array/dualPivotQuickSort.d.ts +1 -2
- package/module/es5/Array/dualPivotQuickSort.js +8 -28
- package/module/es5/Array/groupBy.js +8 -7
- package/module/es5/Array/index.d.ts +1 -0
- package/module/es5/Array/index.js +11 -0
- package/module/es5/Array/quickSort.js +10 -25
- package/module/es5/Array/sortingHelpers/applyInsertionSortIfNeeded.d.ts +13 -0
- package/module/es5/Array/sortingHelpers/applyInsertionSortIfNeeded.js +25 -0
- package/module/es5/Array/sortingHelpers/rangeValidator.d.ts +17 -0
- package/module/es5/Array/sortingHelpers/rangeValidator.js +35 -0
- package/module/es5/Array/timSort.js +2 -20
- package/module/es5/Array/ultraNumberSort.d.ts +7 -0
- package/module/es5/Array/ultraNumberSort.js +475 -0
- package/module/es5/Tool/pipe.d.ts +1 -1
- package/module/es5/Validate/object/core.d.ts +2 -6
- package/module/es5/Validate/type.d.ts +1 -0
- package/module/es5/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -20
- package/module/es5/tests/integration/Array/drop-and-first.test.d.ts +0 -1
- package/module/es5/tests/integration/Array/drop-and-first.test.js +0 -34
- package/module/es5/tests/integration/Tool/parseJson-and-Validate.test.d.ts +0 -1
- package/module/es5/tests/integration/Tool/parseJson-and-Validate.test.js +0 -80
- package/module/es5/tests/unit/Advance/rangeAdvance.test.d.ts +0 -1
- package/module/es5/tests/unit/Advance/rangeAdvance.test.js +0 -26
- package/module/es5/tests/unit/Array/arraysJoin.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/arraysJoin.test.js +0 -19
- package/module/es5/tests/unit/Array/binarySearch.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/binarySearch.test.js +0 -32
- package/module/es5/tests/unit/Array/checkFlagAlignment.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/checkFlagAlignment.test.js +0 -206
- package/module/es5/tests/unit/Array/chunk.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/chunk.test.js +0 -51
- package/module/es5/tests/unit/Array/compact.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/compact.test.js +0 -53
- package/module/es5/tests/unit/Array/compareFunctionDefault.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/compareFunctionDefault.test.js +0 -29
- package/module/es5/tests/unit/Array/drop.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/drop.test.js +0 -84
- package/module/es5/tests/unit/Array/dualPivotQuickSort.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/dualPivotQuickSort.test.js +0 -87
- package/module/es5/tests/unit/Array/first.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/first.test.js +0 -28
- package/module/es5/tests/unit/Array/generateNumberArray.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/generateNumberArray.test.js +0 -34
- package/module/es5/tests/unit/Array/getArraysCommon.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/getArraysCommon.test.js +0 -40
- package/module/es5/tests/unit/Array/getArraysDiff.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/getArraysDiff.test.js +0 -99
- package/module/es5/tests/unit/Array/groupBy.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/groupBy.test.js +0 -87
- package/module/es5/tests/unit/Array/insertionSort.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/insertionSort.test.js +0 -37
- package/module/es5/tests/unit/Array/mergeSort.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/mergeSort.test.js +0 -49
- package/module/es5/tests/unit/Array/pop.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/pop.test.js +0 -50
- package/module/es5/tests/unit/Array/quickSort.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/quickSort.test.js +0 -118
- package/module/es5/tests/unit/Array/randomSelect.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/randomSelect.test.js +0 -51
- package/module/es5/tests/unit/Array/range.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/range.test.js +0 -42
- package/module/es5/tests/unit/Array/shuffle.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/shuffle.test.js +0 -84
- package/module/es5/tests/unit/Array/shuffle2DArray.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/shuffle2DArray.test.js +0 -90
- package/module/es5/tests/unit/Array/sum.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/sum.test.js +0 -44
- package/module/es5/tests/unit/Array/timSort.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/timSort.test.js +0 -128
- package/module/es5/tests/unit/Array/zip.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/zip.test.js +0 -69
- package/module/es5/tests/unit/Array/zipLongest.test.d.ts +0 -1
- package/module/es5/tests/unit/Array/zipLongest.test.js +0 -74
- package/module/es5/tests/unit/Color/cmykToRgba.test.d.ts +0 -1
- package/module/es5/tests/unit/Color/cmykToRgba.test.js +0 -58
- package/module/es5/tests/unit/Color/hexaToRgba.test.d.ts +0 -1
- package/module/es5/tests/unit/Color/hexaToRgba.test.js +0 -115
- package/module/es5/tests/unit/Color/hslaToRgba.test.d.ts +0 -1
- package/module/es5/tests/unit/Color/hslaToRgba.test.js +0 -141
- package/module/es5/tests/unit/Color/rgbaToCmyk.test.d.ts +0 -1
- package/module/es5/tests/unit/Color/rgbaToCmyk.test.js +0 -139
- package/module/es5/tests/unit/Color/rgbaToHexA.test.d.ts +0 -1
- package/module/es5/tests/unit/Color/rgbaToHexA.test.js +0 -114
- package/module/es5/tests/unit/Color/rgbaToHsla.test.d.ts +0 -1
- package/module/es5/tests/unit/Color/rgbaToHsla.test.js +0 -190
- package/module/es5/tests/unit/Consts/clock.test.d.ts +0 -1
- package/module/es5/tests/unit/Consts/clock.test.js +0 -71
- package/module/es5/tests/unit/Consts/httpClientErrorStatus.test.d.ts +0 -1
- package/module/es5/tests/unit/Consts/httpClientErrorStatus.test.js +0 -33
- package/module/es5/tests/unit/Consts/httpInformationalStatus.test.d.ts +0 -1
- package/module/es5/tests/unit/Consts/httpInformationalStatus.test.js +0 -13
- package/module/es5/tests/unit/Consts/httpRedirectionStatus.test.d.ts +0 -1
- package/module/es5/tests/unit/Consts/httpRedirectionStatus.test.js +0 -16
- package/module/es5/tests/unit/Consts/httpServerErrorStatus.test.d.ts +0 -1
- package/module/es5/tests/unit/Consts/httpServerErrorStatus.test.js +0 -15
- package/module/es5/tests/unit/Consts/httpStatus.test.d.ts +0 -1
- package/module/es5/tests/unit/Consts/httpStatus.test.js +0 -82
- package/module/es5/tests/unit/Consts/httpSuccessStatus.test.d.ts +0 -1
- package/module/es5/tests/unit/Consts/httpSuccessStatus.test.js +0 -16
- package/module/es5/tests/unit/Date/birthday.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/birthday.test.js +0 -31
- package/module/es5/tests/unit/Date/dateRange.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/dateRange.test.js +0 -40
- package/module/es5/tests/unit/Date/dayOfWeek.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/dayOfWeek.test.js +0 -39
- package/module/es5/tests/unit/Date/deleteSpace.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/deleteSpace.test.js +0 -35
- package/module/es5/tests/unit/Date/format.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/format.test.js +0 -50
- package/module/es5/tests/unit/Date/getDay.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/getDay.test.js +0 -40
- package/module/es5/tests/unit/Date/getTimezoneOffsetString.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/getTimezoneOffsetString.test.js +0 -26
- package/module/es5/tests/unit/Date/isLeapYear.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/isLeapYear.test.js +0 -30
- package/module/es5/tests/unit/Date/new.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/new.test.js +0 -39
- package/module/es5/tests/unit/Date/now.test.d.ts +0 -1
- package/module/es5/tests/unit/Date/now.test.js +0 -42
- package/module/es5/tests/unit/Error/safeExecute.test.d.ts +0 -1
- package/module/es5/tests/unit/Error/safeExecute.test.js +0 -75
- package/module/es5/tests/unit/Function/curry.test.d.ts +0 -1
- package/module/es5/tests/unit/Function/curry.test.js +0 -138
- package/module/es5/tests/unit/IP/cidrToLong.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/cidrToLong.test.js +0 -32
- package/module/es5/tests/unit/IP/cidrToSubnetMask.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/cidrToSubnetMask.test.js +0 -36
- package/module/es5/tests/unit/IP/getIpClass.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/getIpClass.test.js +0 -36
- package/module/es5/tests/unit/IP/getNetworkAddress.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/getNetworkAddress.test.js +0 -40
- package/module/es5/tests/unit/IP/ipToBinaryString.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/ipToBinaryString.test.js +0 -46
- package/module/es5/tests/unit/IP/ipToLong.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/ipToLong.test.js +0 -34
- package/module/es5/tests/unit/IP/isInRange.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/isInRange.test.js +0 -82
- package/module/es5/tests/unit/IP/isPrivateIp.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/isPrivateIp.test.js +0 -26
- package/module/es5/tests/unit/IP/longToIp.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/longToIp.test.js +0 -39
- package/module/es5/tests/unit/IP/subnetMaskToCidr.test.d.ts +0 -1
- package/module/es5/tests/unit/IP/subnetMaskToCidr.test.js +0 -41
- package/module/es5/tests/unit/Math/addition.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/addition.test.js +0 -79
- package/module/es5/tests/unit/Math/average.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/average.test.js +0 -48
- package/module/es5/tests/unit/Math/bitwise.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/bitwise.test.js +0 -62
- package/module/es5/tests/unit/Math/calculator/calculator.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/calculator/calculator.test.js +0 -76
- package/module/es5/tests/unit/Math/calculator/calculatorInitialization.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/calculator/calculatorInitialization.test.js +0 -21
- package/module/es5/tests/unit/Math/calculator/convertCurrency.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/calculator/convertCurrency.test.js +0 -40
- package/module/es5/tests/unit/Math/calculator/literalExpression.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/calculator/literalExpression.test.js +0 -51
- package/module/es5/tests/unit/Math/degToRad.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/degToRad.test.js +0 -50
- package/module/es5/tests/unit/Math/deviationValue.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/deviationValue.test.js +0 -30
- package/module/es5/tests/unit/Math/division.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/division.test.js +0 -81
- package/module/es5/tests/unit/Math/factorial.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/factorial.test.js +0 -26
- package/module/es5/tests/unit/Math/factorize.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/factorize.test.js +0 -38
- package/module/es5/tests/unit/Math/flexibleNumberConversion.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/flexibleNumberConversion.test.js +0 -195
- package/module/es5/tests/unit/Math/gcd.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/gcd.test.js +0 -35
- package/module/es5/tests/unit/Math/getDecimalLength.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/getDecimalLength.test.js +0 -44
- package/module/es5/tests/unit/Math/lcm.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/lcm.test.js +0 -43
- package/module/es5/tests/unit/Math/linearCongruentialGenerator.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/linearCongruentialGenerator.test.js +0 -25
- package/module/es5/tests/unit/Math/mathConverter.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/mathConverter.test.js +0 -37
- package/module/es5/tests/unit/Math/mathSeparator.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/mathSeparator.test.js +0 -59
- package/module/es5/tests/unit/Math/max.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/max.test.js +0 -22
- package/module/es5/tests/unit/Math/median.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/median.test.js +0 -17
- package/module/es5/tests/unit/Math/min.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/min.test.js +0 -22
- package/module/es5/tests/unit/Math/multiples.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/multiples.test.js +0 -30
- package/module/es5/tests/unit/Math/multiplication.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/multiplication.test.js +0 -48
- package/module/es5/tests/unit/Math/nCr.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/nCr.test.js +0 -34
- package/module/es5/tests/unit/Math/nHr.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/nHr.test.js +0 -35
- package/module/es5/tests/unit/Math/nPr.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/nPr.test.js +0 -38
- package/module/es5/tests/unit/Math/primeFactorization.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/primeFactorization.test.js +0 -84
- package/module/es5/tests/unit/Math/quotient.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/quotient.test.js +0 -36
- package/module/es5/tests/unit/Math/radToDeg.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/radToDeg.test.js +0 -50
- package/module/es5/tests/unit/Math/random.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/random.test.js +0 -61
- package/module/es5/tests/unit/Math/reduce.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/reduce.test.js +0 -93
- package/module/es5/tests/unit/Math/repeatedTrial.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/repeatedTrial.test.js +0 -39
- package/module/es5/tests/unit/Math/roundOf.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/roundOf.test.js +0 -40
- package/module/es5/tests/unit/Math/solveEquation.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/solveEquation.test.js +0 -24
- package/module/es5/tests/unit/Math/standardDeviation.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/standardDeviation.test.js +0 -23
- package/module/es5/tests/unit/Math/subtract.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/subtract.test.js +0 -46
- package/module/es5/tests/unit/Math/toBaseN.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/toBaseN.test.js +0 -40
- package/module/es5/tests/unit/Math/toCelsius.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/toCelsius.test.js +0 -18
- package/module/es5/tests/unit/Math/toKelvin.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/toKelvin.test.js +0 -18
- package/module/es5/tests/unit/Math/uuidv7.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/uuidv7.test.js +0 -33
- package/module/es5/tests/unit/Math/valueSwap.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/valueSwap.test.js +0 -28
- package/module/es5/tests/unit/Math/xoshiro256.test.d.ts +0 -1
- package/module/es5/tests/unit/Math/xoshiro256.test.js +0 -33
- package/module/es5/tests/unit/Object/has.test.d.ts +0 -1
- package/module/es5/tests/unit/Object/has.test.js +0 -60
- package/module/es5/tests/unit/Object/keyBy.test.d.ts +0 -1
- package/module/es5/tests/unit/Object/keyBy.test.js +0 -120
- package/module/es5/tests/unit/Object/pick.test.d.ts +0 -1
- package/module/es5/tests/unit/Object/pick.test.js +0 -109
- package/module/es5/tests/unit/Object/pickDeep.test.d.ts +0 -1
- package/module/es5/tests/unit/Object/pickDeep.test.js +0 -222
- package/module/es5/tests/unit/Simple/Array/quickSortSimple.test.d.ts +0 -1
- package/module/es5/tests/unit/Simple/Array/quickSortSimple.test.js +0 -18
- package/module/es5/tests/unit/Simple/Date/dayOfWeekSimple.test.d.ts +0 -1
- package/module/es5/tests/unit/Simple/Date/dayOfWeekSimple.test.js +0 -58
- package/module/es5/tests/unit/Simple/Math/deviationValueSimple.test.d.ts +0 -1
- package/module/es5/tests/unit/Simple/Math/deviationValueSimple.test.js +0 -43
- package/module/es5/tests/unit/String/deleteSpaces.test.d.ts +0 -1
- package/module/es5/tests/unit/String/deleteSpaces.test.js +0 -22
- package/module/es5/tests/unit/String/formatString.test.d.ts +0 -1
- package/module/es5/tests/unit/String/formatString.test.js +0 -47
- package/module/es5/tests/unit/String/fromBase64.test.d.ts +0 -1
- package/module/es5/tests/unit/String/fromBase64.test.js +0 -37
- package/module/es5/tests/unit/String/hasNoLetters.test.d.ts +0 -1
- package/module/es5/tests/unit/String/hasNoLetters.test.js +0 -29
- package/module/es5/tests/unit/String/padEnd.test.d.ts +0 -1
- package/module/es5/tests/unit/String/padEnd.test.js +0 -22
- package/module/es5/tests/unit/String/padStart.test.d.ts +0 -1
- package/module/es5/tests/unit/String/padStart.test.js +0 -40
- package/module/es5/tests/unit/String/randomString.test.d.ts +0 -1
- package/module/es5/tests/unit/String/randomString.test.js +0 -21
- package/module/es5/tests/unit/String/randomStringInitialization.test.d.ts +0 -1
- package/module/es5/tests/unit/String/randomStringInitialization.test.js +0 -25
- package/module/es5/tests/unit/String/reverseString.test.d.ts +0 -1
- package/module/es5/tests/unit/String/reverseString.test.js +0 -35
- package/module/es5/tests/unit/String/toBase64.test.d.ts +0 -1
- package/module/es5/tests/unit/String/toBase64.test.js +0 -20
- package/module/es5/tests/unit/String/toHalfWidth.test.d.ts +0 -1
- package/module/es5/tests/unit/String/toHalfWidth.test.js +0 -16
- package/module/es5/tests/unit/String/trimCharacters.test.d.ts +0 -1
- package/module/es5/tests/unit/String/trimCharacters.test.js +0 -17
- package/module/es5/tests/unit/String/trimEndCharacters.test.d.ts +0 -1
- package/module/es5/tests/unit/String/trimEndCharacters.test.js +0 -33
- package/module/es5/tests/unit/String/trimStartCharacters.test.d.ts +0 -1
- package/module/es5/tests/unit/String/trimStartCharacters.test.js +0 -33
- package/module/es5/tests/unit/Time/convertTime.test.d.ts +0 -1
- package/module/es5/tests/unit/Time/convertTime.test.js +0 -135
- package/module/es5/tests/unit/Time/normalizeTimeUnit.test.d.ts +0 -1
- package/module/es5/tests/unit/Time/normalizeTimeUnit.test.js +0 -29
- package/module/es5/tests/unit/Tool/createPipeline.test.d.ts +0 -1
- package/module/es5/tests/unit/Tool/createPipeline.test.js +0 -184
- package/module/es5/tests/unit/Tool/parseJson.test.d.ts +0 -1
- package/module/es5/tests/unit/Tool/parseJson.test.js +0 -46
- package/module/es5/tests/unit/Tool/pipe.test.d.ts +0 -1
- package/module/es5/tests/unit/Tool/pipe.test.js +0 -445
- package/module/es5/tests/unit/UA/extractBrowserFromUserAgent.test.d.ts +0 -1
- package/module/es5/tests/unit/UA/extractBrowserFromUserAgent.test.js +0 -47
- package/module/es5/tests/unit/UA/extractDeviceFromUserAgent.test.d.ts +0 -1
- package/module/es5/tests/unit/UA/extractDeviceFromUserAgent.test.js +0 -55
- package/module/es5/tests/unit/UA/extractOsFromUserAgent.test.d.ts +0 -1
- package/module/es5/tests/unit/UA/extractOsFromUserAgent.test.js +0 -57
- package/module/es5/tests/unit/UA/parseUserAgent.test.d.ts +0 -1
- package/module/es5/tests/unit/UA/parseUserAgent.test.js +0 -95
- package/module/es5/tests/unit/Unit/unitConverterInitialization.test.d.ts +0 -1
- package/module/es5/tests/unit/Unit/unitConverterInitialization.test.js +0 -40
- package/module/es5/tests/unit/Validate/array/core.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/array/core.test.js +0 -86
- package/module/es5/tests/unit/Validate/boolean/core.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/boolean/core.test.js +0 -29
- package/module/es5/tests/unit/Validate/core/core.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/core/core.test.js +0 -87
- package/module/es5/tests/unit/Validate/isArray.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isArray.test.js +0 -36
- package/module/es5/tests/unit/Validate/isDictionaryObject.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isDictionaryObject.test.js +0 -62
- package/module/es5/tests/unit/Validate/isDouble.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isDouble.test.js +0 -47
- package/module/es5/tests/unit/Validate/isEqual.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isEqual.test.js +0 -74
- package/module/es5/tests/unit/Validate/isNotEmpty.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isNotEmpty.test.js +0 -43
- package/module/es5/tests/unit/Validate/isNumber.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isNumber.test.js +0 -77
- package/module/es5/tests/unit/Validate/isPerfectSquare.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isPerfectSquare.test.js +0 -27
- package/module/es5/tests/unit/Validate/isPrimeNumber.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isPrimeNumber.test.js +0 -51
- package/module/es5/tests/unit/Validate/isValueNaN.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/isValueNaN.test.js +0 -54
- package/module/es5/tests/unit/Validate/number/core.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/number/core.test.js +0 -36
- package/module/es5/tests/unit/Validate/number/double.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/number/double.test.js +0 -23
- package/module/es5/tests/unit/Validate/number/even.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/number/even.test.js +0 -23
- package/module/es5/tests/unit/Validate/number/maxValue.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/number/maxValue.test.js +0 -20
- package/module/es5/tests/unit/Validate/number/minValue.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/number/minValue.test.js +0 -20
- package/module/es5/tests/unit/Validate/number/odd.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/number/odd.test.js +0 -23
- package/module/es5/tests/unit/Validate/number/prime.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/number/prime.test.js +0 -25
- package/module/es5/tests/unit/Validate/object/core.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/object/core.test.js +0 -79
- package/module/es5/tests/unit/Validate/string/core.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/core.test.js +0 -27
- package/module/es5/tests/unit/Validate/string/email.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/email.test.js +0 -21
- package/module/es5/tests/unit/Validate/string/length.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/length.test.js +0 -18
- package/module/es5/tests/unit/Validate/string/maxLength.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/maxLength.test.js +0 -18
- package/module/es5/tests/unit/Validate/string/minLength.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/minLength.test.js +0 -18
- package/module/es5/tests/unit/Validate/string/numberString.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/numberString.test.js +0 -22
- package/module/es5/tests/unit/Validate/string/regexMatch.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/regexMatch.test.js +0 -29
- package/module/es5/tests/unit/Validate/string/uuid.test.d.ts +0 -1
- package/module/es5/tests/unit/Validate/string/uuid.test.js +0 -72
- package/module/es5/tests/unit/types/arrayType.test.d.ts +0 -1
- package/module/es5/tests/unit/types/arrayType.test.js +0 -11
- package/module/es5/tests/unit/types/clockType.test.d.ts +0 -1
- package/module/es5/tests/unit/types/clockType.test.js +0 -37
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _rgbaToHsla = require("@/Color/rgbaToHsla");
|
|
4
|
-
describe("rgbaToHsla", function () {
|
|
5
|
-
it("should throw error for invalid rgba values", function () {
|
|
6
|
-
expect(function () {
|
|
7
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
8
|
-
r: -1,
|
|
9
|
-
g: 0,
|
|
10
|
-
b: 0,
|
|
11
|
-
a: 1
|
|
12
|
-
});
|
|
13
|
-
}).toThrow("Invalid rgba value");
|
|
14
|
-
expect(function () {
|
|
15
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
16
|
-
r: 256,
|
|
17
|
-
g: 0,
|
|
18
|
-
b: 0,
|
|
19
|
-
a: 1
|
|
20
|
-
});
|
|
21
|
-
}).toThrow("Invalid rgba value");
|
|
22
|
-
expect(function () {
|
|
23
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
24
|
-
r: 0,
|
|
25
|
-
g: -1,
|
|
26
|
-
b: 0,
|
|
27
|
-
a: 1
|
|
28
|
-
});
|
|
29
|
-
}).toThrow("Invalid rgba value");
|
|
30
|
-
expect(function () {
|
|
31
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
32
|
-
r: 0,
|
|
33
|
-
g: 256,
|
|
34
|
-
b: 0,
|
|
35
|
-
a: 1
|
|
36
|
-
});
|
|
37
|
-
}).toThrow("Invalid rgba value");
|
|
38
|
-
expect(function () {
|
|
39
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
40
|
-
r: 0,
|
|
41
|
-
g: 0,
|
|
42
|
-
b: -1,
|
|
43
|
-
a: 1
|
|
44
|
-
});
|
|
45
|
-
}).toThrow("Invalid rgba value");
|
|
46
|
-
expect(function () {
|
|
47
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
48
|
-
r: 0,
|
|
49
|
-
g: 0,
|
|
50
|
-
b: 256,
|
|
51
|
-
a: 1
|
|
52
|
-
});
|
|
53
|
-
}).toThrow("Invalid rgba value");
|
|
54
|
-
expect(function () {
|
|
55
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
56
|
-
r: 0,
|
|
57
|
-
g: 0,
|
|
58
|
-
b: 0,
|
|
59
|
-
a: -0.1
|
|
60
|
-
});
|
|
61
|
-
}).toThrow("Invalid rgba value");
|
|
62
|
-
expect(function () {
|
|
63
|
-
return (0, _rgbaToHsla.rgbaToHsla)({
|
|
64
|
-
r: 0,
|
|
65
|
-
g: 0,
|
|
66
|
-
b: 0,
|
|
67
|
-
a: 1.1
|
|
68
|
-
});
|
|
69
|
-
}).toThrow("Invalid rgba value");
|
|
70
|
-
});
|
|
71
|
-
it("should handle edge cases correctly", function () {
|
|
72
|
-
// Black
|
|
73
|
-
expect((0, _rgbaToHsla.rgbaToHsla)({
|
|
74
|
-
r: 0,
|
|
75
|
-
g: 0,
|
|
76
|
-
b: 0
|
|
77
|
-
})).toEqual({
|
|
78
|
-
h: 0,
|
|
79
|
-
s: 0,
|
|
80
|
-
l: 0,
|
|
81
|
-
a: 1
|
|
82
|
-
});
|
|
83
|
-
// White
|
|
84
|
-
expect((0, _rgbaToHsla.rgbaToHsla)({
|
|
85
|
-
r: 255,
|
|
86
|
-
g: 255,
|
|
87
|
-
b: 255
|
|
88
|
-
})).toEqual({
|
|
89
|
-
h: 0,
|
|
90
|
-
s: 0,
|
|
91
|
-
l: 100,
|
|
92
|
-
a: 1
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
it.each([[{
|
|
96
|
-
r: 100,
|
|
97
|
-
g: 100,
|
|
98
|
-
b: 100
|
|
99
|
-
}, {
|
|
100
|
-
h: 0,
|
|
101
|
-
s: 0,
|
|
102
|
-
l: 39.22,
|
|
103
|
-
a: 1
|
|
104
|
-
}], [{
|
|
105
|
-
r: 255,
|
|
106
|
-
g: 0,
|
|
107
|
-
b: 0
|
|
108
|
-
}, {
|
|
109
|
-
h: 0,
|
|
110
|
-
s: 100,
|
|
111
|
-
l: 50,
|
|
112
|
-
a: 1
|
|
113
|
-
}], [{
|
|
114
|
-
r: 0,
|
|
115
|
-
g: 255,
|
|
116
|
-
b: 0
|
|
117
|
-
}, {
|
|
118
|
-
h: 120,
|
|
119
|
-
s: 100,
|
|
120
|
-
l: 50,
|
|
121
|
-
a: 1
|
|
122
|
-
}], [{
|
|
123
|
-
r: 0,
|
|
124
|
-
g: 0,
|
|
125
|
-
b: 255
|
|
126
|
-
}, {
|
|
127
|
-
h: 240,
|
|
128
|
-
s: 100,
|
|
129
|
-
l: 50,
|
|
130
|
-
a: 1
|
|
131
|
-
}], [{
|
|
132
|
-
r: 255,
|
|
133
|
-
g: 0,
|
|
134
|
-
b: 0,
|
|
135
|
-
a: 0.5
|
|
136
|
-
}, {
|
|
137
|
-
h: 0,
|
|
138
|
-
s: 100,
|
|
139
|
-
l: 50,
|
|
140
|
-
a: 0.5
|
|
141
|
-
}], [{
|
|
142
|
-
r: 255,
|
|
143
|
-
g: 255,
|
|
144
|
-
b: 0
|
|
145
|
-
}, {
|
|
146
|
-
h: 60,
|
|
147
|
-
s: 100,
|
|
148
|
-
l: 50,
|
|
149
|
-
a: 1
|
|
150
|
-
}], [{
|
|
151
|
-
r: 0,
|
|
152
|
-
g: 0,
|
|
153
|
-
b: 255,
|
|
154
|
-
a: 0.7
|
|
155
|
-
}, {
|
|
156
|
-
h: 240,
|
|
157
|
-
s: 100,
|
|
158
|
-
l: 50,
|
|
159
|
-
a: 0.7
|
|
160
|
-
}], [{
|
|
161
|
-
r: 173,
|
|
162
|
-
g: 216,
|
|
163
|
-
b: 230
|
|
164
|
-
}, {
|
|
165
|
-
h: 194.74,
|
|
166
|
-
s: 53.27,
|
|
167
|
-
l: 79.02,
|
|
168
|
-
a: 1
|
|
169
|
-
}], [{
|
|
170
|
-
r: 255,
|
|
171
|
-
g: 0,
|
|
172
|
-
b: 100
|
|
173
|
-
}, {
|
|
174
|
-
h: 336.47,
|
|
175
|
-
s: 100,
|
|
176
|
-
l: 50,
|
|
177
|
-
a: 1
|
|
178
|
-
}], [{
|
|
179
|
-
r: 100,
|
|
180
|
-
g: 0,
|
|
181
|
-
b: 255
|
|
182
|
-
}, {
|
|
183
|
-
h: 263.53,
|
|
184
|
-
s: 100,
|
|
185
|
-
l: 50,
|
|
186
|
-
a: 1
|
|
187
|
-
}]])("should convert RGB(%o) to HSLA", function (input, expected) {
|
|
188
|
-
expect((0, _rgbaToHsla.rgbaToHsla)(input)).toEqual(expected);
|
|
189
|
-
});
|
|
190
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _clock = require("@/Consts/clock");
|
|
4
|
-
describe("Time constants", function () {
|
|
5
|
-
describe("Basic time unit values", function () {
|
|
6
|
-
it("should define one second as 1000 milliseconds", function () {
|
|
7
|
-
expect(_clock.OneSecondMs).toBe(1000);
|
|
8
|
-
});
|
|
9
|
-
it("should define one minute as 60000 milliseconds", function () {
|
|
10
|
-
expect(_clock.OneMinuteMs).toBe(60000);
|
|
11
|
-
});
|
|
12
|
-
it("should define one hour as 3600000 milliseconds", function () {
|
|
13
|
-
expect(_clock.OneHourMs).toBe(3600000);
|
|
14
|
-
});
|
|
15
|
-
it("should define one day as 86400000 milliseconds", function () {
|
|
16
|
-
expect(_clock.OneDayMs).toBe(86400000);
|
|
17
|
-
});
|
|
18
|
-
it("should define one week as 604800000 milliseconds", function () {
|
|
19
|
-
expect(_clock.OneWeekMs).toBe(604800000);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
describe("Time unit relationships", function () {
|
|
23
|
-
it("should maintain correct relationships between units", function () {
|
|
24
|
-
expect(_clock.OneMinuteMs).toBe(_clock.OneSecondMs * 60);
|
|
25
|
-
expect(_clock.OneHourMs).toBe(_clock.OneMinuteMs * 60);
|
|
26
|
-
expect(_clock.OneDayMs).toBe(_clock.OneHourMs * 24);
|
|
27
|
-
expect(_clock.OneWeekMs).toBe(_clock.OneDayMs * 7);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
describe("Month variations", function () {
|
|
31
|
-
it("should define correct relationships for different month lengths", function () {
|
|
32
|
-
expect(_clock.OneMonthMs28).toBe(_clock.OneDayMs * 28);
|
|
33
|
-
expect(_clock.OneMonthMs29).toBe(_clock.OneDayMs * 29);
|
|
34
|
-
expect(_clock.OneMonthMs).toBe(_clock.OneDayMs * 30);
|
|
35
|
-
expect(_clock.OneMonthMs31).toBe(_clock.OneDayMs * 31);
|
|
36
|
-
});
|
|
37
|
-
it("should maintain correct order of month lengths", function () {
|
|
38
|
-
expect(_clock.OneMonthMs28).toBeLessThan(_clock.OneMonthMs29);
|
|
39
|
-
expect(_clock.OneMonthMs29).toBeLessThan(_clock.OneMonthMs);
|
|
40
|
-
expect(_clock.OneMonthMs).toBeLessThan(_clock.OneMonthMs31);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
describe("Year variations", function () {
|
|
44
|
-
it("should define correct relationships for different year lengths", function () {
|
|
45
|
-
expect(_clock.OneYearMs).toBe(_clock.OneDayMs * 365);
|
|
46
|
-
expect(_clock.OneYearMs366).toBe(_clock.OneDayMs * 366);
|
|
47
|
-
});
|
|
48
|
-
it("should maintain correct relationship between regular and leap years", function () {
|
|
49
|
-
expect(_clock.OneYearMs).toBeLessThan(_clock.OneYearMs366);
|
|
50
|
-
expect(_clock.OneYearMs366 - _clock.OneYearMs).toBe(_clock.OneDayMs);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
it("should define one month (28 days) as 2419200000 milliseconds", function () {
|
|
54
|
-
expect(_clock.OneMonthMs28).toBe(2419200000);
|
|
55
|
-
});
|
|
56
|
-
it("should define one month (29 days) as 2505600000 milliseconds", function () {
|
|
57
|
-
expect(_clock.OneMonthMs29).toBe(2505600000);
|
|
58
|
-
});
|
|
59
|
-
it("should define one month (30 days) as 2592000000 milliseconds", function () {
|
|
60
|
-
expect(_clock.OneMonthMs).toBe(2592000000);
|
|
61
|
-
});
|
|
62
|
-
it("should define one month (31 days) as 2678400000 milliseconds", function () {
|
|
63
|
-
expect(_clock.OneMonthMs31).toBe(2678400000);
|
|
64
|
-
});
|
|
65
|
-
it("should define one year (365 days) as 31536000000 milliseconds", function () {
|
|
66
|
-
expect(_clock.OneYearMs).toBe(31536000000);
|
|
67
|
-
});
|
|
68
|
-
it("should define one year (366 days) as 31622400000 milliseconds", function () {
|
|
69
|
-
expect(_clock.OneYearMs366).toBe(31622400000);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _httpStatus = require("@/Consts/httpStatus");
|
|
4
|
-
describe("HttpClientErrorStatus", function () {
|
|
5
|
-
describe("4xx Client Error", function () {
|
|
6
|
-
it("should have correct client error status codes", function () {
|
|
7
|
-
expect(_httpStatus.HttpClientErrorStatus.BAD_REQUEST).toBe(400);
|
|
8
|
-
expect(_httpStatus.HttpClientErrorStatus.UNAUTHORIZED).toBe(401);
|
|
9
|
-
expect(_httpStatus.HttpClientErrorStatus.PAYMENT_REQUIRED).toBe(402);
|
|
10
|
-
expect(_httpStatus.HttpClientErrorStatus.FORBIDDEN).toBe(403);
|
|
11
|
-
expect(_httpStatus.HttpClientErrorStatus.NOT_FOUND).toBe(404);
|
|
12
|
-
expect(_httpStatus.HttpClientErrorStatus.METHOD_NOT_ALLOWED).toBe(405);
|
|
13
|
-
expect(_httpStatus.HttpClientErrorStatus.NOT_ACCEPTABLE).toBe(406);
|
|
14
|
-
expect(_httpStatus.HttpClientErrorStatus.PROXY_AUTHENTICATION_REQUIRED).toBe(407);
|
|
15
|
-
expect(_httpStatus.HttpClientErrorStatus.REQUEST_TIMEOUT).toBe(408);
|
|
16
|
-
expect(_httpStatus.HttpClientErrorStatus.CONFLICT).toBe(409);
|
|
17
|
-
expect(_httpStatus.HttpClientErrorStatus.GONE).toBe(410);
|
|
18
|
-
expect(_httpStatus.HttpClientErrorStatus.LENGTH_REQUIRED).toBe(411);
|
|
19
|
-
expect(_httpStatus.HttpClientErrorStatus.PRECONDITION_FAILED).toBe(412);
|
|
20
|
-
expect(_httpStatus.HttpClientErrorStatus.PAYLOAD_TOO_LARGE).toBe(413);
|
|
21
|
-
expect(_httpStatus.HttpClientErrorStatus.URI_TOO_LONG).toBe(414);
|
|
22
|
-
expect(_httpStatus.HttpClientErrorStatus.UNSUPPORTED_MEDIA_TYPE).toBe(415);
|
|
23
|
-
expect(_httpStatus.HttpClientErrorStatus.REQUESTED_RANGE_NOT_SATISFIABLE).toBe(416);
|
|
24
|
-
expect(_httpStatus.HttpClientErrorStatus.EXPECTATION_FAILED).toBe(417);
|
|
25
|
-
expect(_httpStatus.HttpClientErrorStatus.I_AM_A_TEAPOT).toBe(418);
|
|
26
|
-
expect(_httpStatus.HttpClientErrorStatus.MISDIRECTED).toBe(421);
|
|
27
|
-
expect(_httpStatus.HttpClientErrorStatus.UNPROCESSABLE_ENTITY).toBe(422);
|
|
28
|
-
expect(_httpStatus.HttpClientErrorStatus.FAILED_DEPENDENCY).toBe(424);
|
|
29
|
-
expect(_httpStatus.HttpClientErrorStatus.PRECONDITION_REQUIRED).toBe(428);
|
|
30
|
-
expect(_httpStatus.HttpClientErrorStatus.TOO_MANY_REQUESTS).toBe(429);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _httpStatus = require("@/Consts/httpStatus");
|
|
4
|
-
describe("HttpInformationalStatus", function () {
|
|
5
|
-
describe("1xx Informational", function () {
|
|
6
|
-
it("should have correct informational status codes", function () {
|
|
7
|
-
expect(_httpStatus.HttpInformationalStatus.CONTINUE).toBe(100);
|
|
8
|
-
expect(_httpStatus.HttpInformationalStatus.SWITCHING_PROTOCOLS).toBe(101);
|
|
9
|
-
expect(_httpStatus.HttpInformationalStatus.PROCESSING).toBe(102);
|
|
10
|
-
expect(_httpStatus.HttpInformationalStatus.EARLYHINTS).toBe(103);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _httpStatus = require("@/Consts/httpStatus");
|
|
4
|
-
describe("HttpRedirectionStatus", function () {
|
|
5
|
-
describe("3xx Redirection", function () {
|
|
6
|
-
it("should have correct redirection status codes", function () {
|
|
7
|
-
expect(_httpStatus.HttpRedirectionStatus.AMBIGUOUS).toBe(300);
|
|
8
|
-
expect(_httpStatus.HttpRedirectionStatus.MOVED_PERMANENTLY).toBe(301);
|
|
9
|
-
expect(_httpStatus.HttpRedirectionStatus.FOUND).toBe(302);
|
|
10
|
-
expect(_httpStatus.HttpRedirectionStatus.SEE_OTHER).toBe(303);
|
|
11
|
-
expect(_httpStatus.HttpRedirectionStatus.NOT_MODIFIED).toBe(304);
|
|
12
|
-
expect(_httpStatus.HttpRedirectionStatus.TEMPORARY_REDIRECT).toBe(307);
|
|
13
|
-
expect(_httpStatus.HttpRedirectionStatus.PERMANENT_REDIRECT).toBe(308);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _httpStatus = require("@/Consts/httpStatus");
|
|
4
|
-
describe("HttpServerErrorStatus", function () {
|
|
5
|
-
describe("5xx Server Error", function () {
|
|
6
|
-
it("should have correct server error status codes", function () {
|
|
7
|
-
expect(_httpStatus.HttpServerErrorStatus.INTERNAL_SERVER_ERROR).toBe(500);
|
|
8
|
-
expect(_httpStatus.HttpServerErrorStatus.NOT_IMPLEMENTED).toBe(501);
|
|
9
|
-
expect(_httpStatus.HttpServerErrorStatus.BAD_GATEWAY).toBe(502);
|
|
10
|
-
expect(_httpStatus.HttpServerErrorStatus.SERVICE_UNAVAILABLE).toBe(503);
|
|
11
|
-
expect(_httpStatus.HttpServerErrorStatus.GATEWAY_TIMEOUT).toBe(504);
|
|
12
|
-
expect(_httpStatus.HttpServerErrorStatus.HTTP_VERSION_NOT_SUPPORTED).toBe(505);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _httpStatus = require("@/Consts/httpStatus");
|
|
4
|
-
describe("HttpStatus", function () {
|
|
5
|
-
describe("Exports", function () {
|
|
6
|
-
it("should export all HTTP status types", function () {
|
|
7
|
-
expect(_httpStatus.HttpClientErrorStatus).toBeDefined();
|
|
8
|
-
expect(_httpStatus.HttpInformationalStatus).toBeDefined();
|
|
9
|
-
expect(_httpStatus.HttpRedirectionStatus).toBeDefined();
|
|
10
|
-
expect(_httpStatus.HttpServerErrorStatus).toBeDefined();
|
|
11
|
-
expect(_httpStatus.HttpSuccessStatus).toBeDefined();
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
describe("1xx Informational", function () {
|
|
15
|
-
it("should have correct informational status codes", function () {
|
|
16
|
-
expect(_httpStatus.HttpStatus.CONTINUE).toBe(100);
|
|
17
|
-
expect(_httpStatus.HttpStatus.SWITCHING_PROTOCOLS).toBe(101);
|
|
18
|
-
expect(_httpStatus.HttpStatus.PROCESSING).toBe(102);
|
|
19
|
-
expect(_httpStatus.HttpStatus.EARLYHINTS).toBe(103);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
describe("2xx Success", function () {
|
|
23
|
-
it("should have correct success status codes", function () {
|
|
24
|
-
expect(_httpStatus.HttpStatus.OK).toBe(200);
|
|
25
|
-
expect(_httpStatus.HttpStatus.CREATED).toBe(201);
|
|
26
|
-
expect(_httpStatus.HttpStatus.ACCEPTED).toBe(202);
|
|
27
|
-
expect(_httpStatus.HttpStatus.NON_AUTHORITATIVE_INFORMATION).toBe(203);
|
|
28
|
-
expect(_httpStatus.HttpStatus.NO_CONTENT).toBe(204);
|
|
29
|
-
expect(_httpStatus.HttpStatus.RESET_CONTENT).toBe(205);
|
|
30
|
-
expect(_httpStatus.HttpStatus.PARTIAL_CONTENT).toBe(206);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
describe("3xx Redirection", function () {
|
|
34
|
-
it("should have correct redirection status codes", function () {
|
|
35
|
-
expect(_httpStatus.HttpStatus.AMBIGUOUS).toBe(300);
|
|
36
|
-
expect(_httpStatus.HttpStatus.MOVED_PERMANENTLY).toBe(301);
|
|
37
|
-
expect(_httpStatus.HttpStatus.FOUND).toBe(302);
|
|
38
|
-
expect(_httpStatus.HttpStatus.SEE_OTHER).toBe(303);
|
|
39
|
-
expect(_httpStatus.HttpStatus.NOT_MODIFIED).toBe(304);
|
|
40
|
-
expect(_httpStatus.HttpStatus.TEMPORARY_REDIRECT).toBe(307);
|
|
41
|
-
expect(_httpStatus.HttpStatus.PERMANENT_REDIRECT).toBe(308);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
describe("4xx Client Error", function () {
|
|
45
|
-
it("should have correct client error status codes", function () {
|
|
46
|
-
expect(_httpStatus.HttpStatus.BAD_REQUEST).toBe(400);
|
|
47
|
-
expect(_httpStatus.HttpStatus.UNAUTHORIZED).toBe(401);
|
|
48
|
-
expect(_httpStatus.HttpStatus.PAYMENT_REQUIRED).toBe(402);
|
|
49
|
-
expect(_httpStatus.HttpStatus.FORBIDDEN).toBe(403);
|
|
50
|
-
expect(_httpStatus.HttpStatus.NOT_FOUND).toBe(404);
|
|
51
|
-
expect(_httpStatus.HttpStatus.METHOD_NOT_ALLOWED).toBe(405);
|
|
52
|
-
expect(_httpStatus.HttpStatus.NOT_ACCEPTABLE).toBe(406);
|
|
53
|
-
expect(_httpStatus.HttpStatus.PROXY_AUTHENTICATION_REQUIRED).toBe(407);
|
|
54
|
-
expect(_httpStatus.HttpStatus.REQUEST_TIMEOUT).toBe(408);
|
|
55
|
-
expect(_httpStatus.HttpStatus.CONFLICT).toBe(409);
|
|
56
|
-
expect(_httpStatus.HttpStatus.GONE).toBe(410);
|
|
57
|
-
expect(_httpStatus.HttpStatus.LENGTH_REQUIRED).toBe(411);
|
|
58
|
-
expect(_httpStatus.HttpStatus.PRECONDITION_FAILED).toBe(412);
|
|
59
|
-
expect(_httpStatus.HttpStatus.PAYLOAD_TOO_LARGE).toBe(413);
|
|
60
|
-
expect(_httpStatus.HttpStatus.URI_TOO_LONG).toBe(414);
|
|
61
|
-
expect(_httpStatus.HttpStatus.UNSUPPORTED_MEDIA_TYPE).toBe(415);
|
|
62
|
-
expect(_httpStatus.HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE).toBe(416);
|
|
63
|
-
expect(_httpStatus.HttpStatus.EXPECTATION_FAILED).toBe(417);
|
|
64
|
-
expect(_httpStatus.HttpStatus.I_AM_A_TEAPOT).toBe(418);
|
|
65
|
-
expect(_httpStatus.HttpStatus.MISDIRECTED).toBe(421);
|
|
66
|
-
expect(_httpStatus.HttpStatus.UNPROCESSABLE_ENTITY).toBe(422);
|
|
67
|
-
expect(_httpStatus.HttpStatus.FAILED_DEPENDENCY).toBe(424);
|
|
68
|
-
expect(_httpStatus.HttpStatus.PRECONDITION_REQUIRED).toBe(428);
|
|
69
|
-
expect(_httpStatus.HttpStatus.TOO_MANY_REQUESTS).toBe(429);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
describe("5xx Server Error", function () {
|
|
73
|
-
it("should have correct server error status codes", function () {
|
|
74
|
-
expect(_httpStatus.HttpStatus.INTERNAL_SERVER_ERROR).toBe(500);
|
|
75
|
-
expect(_httpStatus.HttpStatus.NOT_IMPLEMENTED).toBe(501);
|
|
76
|
-
expect(_httpStatus.HttpStatus.BAD_GATEWAY).toBe(502);
|
|
77
|
-
expect(_httpStatus.HttpStatus.SERVICE_UNAVAILABLE).toBe(503);
|
|
78
|
-
expect(_httpStatus.HttpStatus.GATEWAY_TIMEOUT).toBe(504);
|
|
79
|
-
expect(_httpStatus.HttpStatus.HTTP_VERSION_NOT_SUPPORTED).toBe(505);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _httpStatus = require("@/Consts/httpStatus");
|
|
4
|
-
describe("HttpSuccessStatus", function () {
|
|
5
|
-
describe("2xx Success", function () {
|
|
6
|
-
it("should have correct success status codes", function () {
|
|
7
|
-
expect(_httpStatus.HttpSuccessStatus.OK).toBe(200);
|
|
8
|
-
expect(_httpStatus.HttpSuccessStatus.CREATED).toBe(201);
|
|
9
|
-
expect(_httpStatus.HttpSuccessStatus.ACCEPTED).toBe(202);
|
|
10
|
-
expect(_httpStatus.HttpSuccessStatus.NON_AUTHORITATIVE_INFORMATION).toBe(203);
|
|
11
|
-
expect(_httpStatus.HttpSuccessStatus.NO_CONTENT).toBe(204);
|
|
12
|
-
expect(_httpStatus.HttpSuccessStatus.RESET_CONTENT).toBe(205);
|
|
13
|
-
expect(_httpStatus.HttpSuccessStatus.PARTIAL_CONTENT).toBe(206);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _birthday = require("@/Date/birthday");
|
|
4
|
-
describe("birthday", function () {
|
|
5
|
-
beforeEach(function () {
|
|
6
|
-
// Mock current date to 2025-04-04
|
|
7
|
-
jest.useFakeTimers();
|
|
8
|
-
jest.setSystemTime(new Date("2025-04-04"));
|
|
9
|
-
});
|
|
10
|
-
afterEach(function () {
|
|
11
|
-
jest.useRealTimers();
|
|
12
|
-
});
|
|
13
|
-
it("should calculate age correctly for past birthday this year", function () {
|
|
14
|
-
// Someone born on January 1, 2000 would be 25 on April 4, 2025
|
|
15
|
-
expect((0, _birthday.birthday)(2000, 1, 1)).toBe(25);
|
|
16
|
-
});
|
|
17
|
-
it("should calculate age correctly for future birthday this year", function () {
|
|
18
|
-
// Someone born on December 31, 2000 would still be 24 on April 4, 2025
|
|
19
|
-
expect((0, _birthday.birthday)(2000, 12, 31)).toBe(24);
|
|
20
|
-
});
|
|
21
|
-
it("should handle two-digit years", function () {
|
|
22
|
-
// Year 99 should be treated as year 1999 (26 years before 2025)
|
|
23
|
-
expect((0, _birthday.birthday)(99, 1, 1)).toBe(1926);
|
|
24
|
-
});
|
|
25
|
-
it("should handle timezone offset", function () {
|
|
26
|
-
// Test with default timezone (UTC+9)
|
|
27
|
-
expect((0, _birthday.birthday)(2000, 1, 1)).toBe(25);
|
|
28
|
-
// Test with different timezone (UTC+0)
|
|
29
|
-
expect((0, _birthday.birthday)(2000, 1, 1, 0)).toBe(25);
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _dateRange = require("@/Date/dateRange");
|
|
4
|
-
describe("dateRange", function () {
|
|
5
|
-
it("should generate array of dates between start and end dates", function () {
|
|
6
|
-
var start = new Date("2025-01-01");
|
|
7
|
-
var end = new Date("2025-01-03");
|
|
8
|
-
var dates = (0, _dateRange.dateRange)(start, end);
|
|
9
|
-
expect(dates).toHaveLength(3);
|
|
10
|
-
expect(dates[0]).toEqual(new Date("2025-01-01"));
|
|
11
|
-
expect(dates[1]).toEqual(new Date("2025-01-02"));
|
|
12
|
-
expect(dates[2]).toEqual(new Date("2025-01-03"));
|
|
13
|
-
});
|
|
14
|
-
it("should handle single day range", function () {
|
|
15
|
-
var date = new Date("2025-01-01");
|
|
16
|
-
var dates = (0, _dateRange.dateRange)(date, date);
|
|
17
|
-
expect(dates).toHaveLength(1);
|
|
18
|
-
expect(dates[0]).toEqual(new Date("2025-01-01"));
|
|
19
|
-
});
|
|
20
|
-
it("should create new Date instances", function () {
|
|
21
|
-
var start = new Date("2025-01-01");
|
|
22
|
-
var end = new Date("2025-01-01");
|
|
23
|
-
var dates = (0, _dateRange.dateRange)(start, end);
|
|
24
|
-
|
|
25
|
-
// Modify the original date to ensure we have a new instance
|
|
26
|
-
start.setDate(2);
|
|
27
|
-
expect(dates[0]).not.toBe(start);
|
|
28
|
-
expect(dates[0].getDate()).toBe(1);
|
|
29
|
-
});
|
|
30
|
-
it("should handle month and year transitions", function () {
|
|
31
|
-
var start = new Date("2024-12-30");
|
|
32
|
-
var end = new Date("2025-01-02");
|
|
33
|
-
var dates = (0, _dateRange.dateRange)(start, end);
|
|
34
|
-
expect(dates).toHaveLength(4);
|
|
35
|
-
expect(dates[0]).toEqual(new Date("2024-12-30"));
|
|
36
|
-
expect(dates[1]).toEqual(new Date("2024-12-31"));
|
|
37
|
-
expect(dates[2]).toEqual(new Date("2025-01-01"));
|
|
38
|
-
expect(dates[3]).toEqual(new Date("2025-01-02"));
|
|
39
|
-
});
|
|
40
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Date = require("@/Date");
|
|
4
|
-
var _dayOfWeek = require("@/Date/dayOfWeek");
|
|
5
|
-
describe("dayOfWeek function", function () {
|
|
6
|
-
it("should return correct day of week for a given date", function () {
|
|
7
|
-
expect((0, _dayOfWeek.dayOfWeek)({
|
|
8
|
-
year: 2020,
|
|
9
|
-
mon: 1,
|
|
10
|
-
day: 1
|
|
11
|
-
})).toBe(3);
|
|
12
|
-
expect((0, _dayOfWeek.dayOfWeek)({
|
|
13
|
-
year: 2020,
|
|
14
|
-
mon: 1,
|
|
15
|
-
day: 2
|
|
16
|
-
})).toBe(4);
|
|
17
|
-
});
|
|
18
|
-
it("should use current year when year is not provided", function () {
|
|
19
|
-
var nowDate = (0, _Date.now)();
|
|
20
|
-
nowDate.setMonth(0);
|
|
21
|
-
nowDate.setDate(2);
|
|
22
|
-
expect((0, _dayOfWeek.dayOfWeek)({
|
|
23
|
-
mon: 1,
|
|
24
|
-
day: 2
|
|
25
|
-
})).toBe(nowDate.getDay());
|
|
26
|
-
});
|
|
27
|
-
it("should use current year and month when both are not provided", function () {
|
|
28
|
-
var nowDate = (0, _Date.now)();
|
|
29
|
-
nowDate.setDate(2);
|
|
30
|
-
expect((0, _dayOfWeek.dayOfWeek)({
|
|
31
|
-
day: 2
|
|
32
|
-
})).toBe(nowDate.getDay());
|
|
33
|
-
});
|
|
34
|
-
it("should use current date when no parameters are provided", function () {
|
|
35
|
-
var nowDate = (0, _Date.now)();
|
|
36
|
-
expect((0, _dayOfWeek.dayOfWeek)({})).toBe(nowDate.getDay());
|
|
37
|
-
expect((0, _dayOfWeek.dayOfWeek)()).toBe((0, _Date.now)().getDay());
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _deleteSpaces = require("@/String/deleteSpaces");
|
|
4
|
-
describe("deleteSpace", function () {
|
|
5
|
-
it("should remove all spaces from a string", function () {
|
|
6
|
-
var input = "hello world";
|
|
7
|
-
var expectedOutput = "helloworld";
|
|
8
|
-
var actualOutput = (0, _deleteSpaces.deleteSpaces)(input);
|
|
9
|
-
expect(actualOutput).toEqual(expectedOutput);
|
|
10
|
-
});
|
|
11
|
-
it("should remove all spaces from an empty string", function () {
|
|
12
|
-
var input = "";
|
|
13
|
-
var expectedOutput = "";
|
|
14
|
-
var actualOutput = (0, _deleteSpaces.deleteSpaces)(input);
|
|
15
|
-
expect(actualOutput).toEqual(expectedOutput);
|
|
16
|
-
});
|
|
17
|
-
it("should remove all spaces from a string with leading and trailing spaces", function () {
|
|
18
|
-
var input = " hello world ";
|
|
19
|
-
var expectedOutput = "helloworld";
|
|
20
|
-
var actualOutput = (0, _deleteSpaces.deleteSpaces)(input);
|
|
21
|
-
expect(actualOutput).toEqual(expectedOutput);
|
|
22
|
-
});
|
|
23
|
-
it("should remove all spaces from a string with multiple spaces between words", function () {
|
|
24
|
-
var input = "hello world";
|
|
25
|
-
var expectedOutput = "helloworld";
|
|
26
|
-
var actualOutput = (0, _deleteSpaces.deleteSpaces)(input);
|
|
27
|
-
expect(actualOutput).toEqual(expectedOutput);
|
|
28
|
-
});
|
|
29
|
-
it("should remove all spaces from a string with tabs and newlines", function () {
|
|
30
|
-
var input = "hello\t\nworld";
|
|
31
|
-
var expectedOutput = "helloworld";
|
|
32
|
-
var actualOutput = (0, _deleteSpaces.deleteSpaces)(input);
|
|
33
|
-
expect(actualOutput).toEqual(expectedOutput);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|