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
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.toHalfWidth = void 0;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {string} str -
|
|
10
|
-
* @returns {string} -
|
|
8
|
+
* Convert full-width characters to half-width characters
|
|
9
|
+
* @param {string} str - String to convert
|
|
10
|
+
* @returns {string} - Converted string
|
|
11
11
|
*/
|
|
12
12
|
var toHalfWidth = exports.toHalfWidth = function toHalfWidth(string_) {
|
|
13
13
|
return string_.replaceAll(/[0-9A-Za-z]/g, function (s) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Removes specified characters from both ends of a string.
|
|
3
3
|
*
|
|
4
|
-
* @param {string} string_ -
|
|
5
|
-
* @param {string} chars -
|
|
6
|
-
* @returns {string}
|
|
4
|
+
* @param {string} string_ - The string to trim.
|
|
5
|
+
* @param {string} chars - The set of characters to remove.
|
|
6
|
+
* @returns {string} A new string with specified characters removed from both ends.
|
|
7
7
|
*/
|
|
8
8
|
export declare const trimCharacters: (string_: string, chars: string) => string;
|
|
@@ -7,11 +7,11 @@ exports.trimCharacters = void 0;
|
|
|
7
7
|
var _trimEndCharacters = require("./trimEndCharacters");
|
|
8
8
|
var _trimStartCharacters = require("./trimStartCharacters");
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Removes specified characters from both ends of a string.
|
|
11
11
|
*
|
|
12
|
-
* @param {string} string_ -
|
|
13
|
-
* @param {string} chars -
|
|
14
|
-
* @returns {string}
|
|
12
|
+
* @param {string} string_ - The string to trim.
|
|
13
|
+
* @param {string} chars - The set of characters to remove.
|
|
14
|
+
* @returns {string} A new string with specified characters removed from both ends.
|
|
15
15
|
*/
|
|
16
16
|
var trimCharacters = exports.trimCharacters = function trimCharacters(string_, chars) {
|
|
17
17
|
return (0, _trimEndCharacters.trimEndCharacters)((0, _trimStartCharacters.trimStartCharacters)(string_, chars), chars);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Removes specified characters from the end of a string
|
|
3
3
|
*
|
|
4
|
-
* @param {string} string_ -
|
|
5
|
-
* @param {string} chars -
|
|
6
|
-
* @returns {string}
|
|
4
|
+
* @param {string} string_ - The input string to trim
|
|
5
|
+
* @param {string} chars - Characters to remove from the end
|
|
6
|
+
* @returns {string} A new string with specified characters removed from the end
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* trimEndCharacters("hello!!!", "!"); // Returns: "hello"
|
|
10
|
+
* trimEndCharacters("123---", "-"); // Returns: "123"
|
|
11
|
+
* trimEndCharacters("abc123", "xyz"); // Returns: "abc123"
|
|
12
|
+
* ```
|
|
7
13
|
*/
|
|
8
14
|
export declare const trimEndCharacters: (string_: string, chars: string) => string;
|
|
@@ -5,11 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.trimEndCharacters = void 0;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Removes specified characters from the end of a string
|
|
9
9
|
*
|
|
10
|
-
* @param {string} string_ -
|
|
11
|
-
* @param {string} chars -
|
|
12
|
-
* @returns {string}
|
|
10
|
+
* @param {string} string_ - The input string to trim
|
|
11
|
+
* @param {string} chars - Characters to remove from the end
|
|
12
|
+
* @returns {string} A new string with specified characters removed from the end
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* trimEndCharacters("hello!!!", "!"); // Returns: "hello"
|
|
16
|
+
* trimEndCharacters("123---", "-"); // Returns: "123"
|
|
17
|
+
* trimEndCharacters("abc123", "xyz"); // Returns: "abc123"
|
|
18
|
+
* ```
|
|
13
19
|
*/
|
|
14
20
|
var trimEndCharacters = exports.trimEndCharacters = function trimEndCharacters(string_, chars) {
|
|
15
21
|
var endIndex = string_.length - 1;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Removes specified characters from the start of a string
|
|
3
3
|
*
|
|
4
|
-
* @param {string} string_ -
|
|
5
|
-
* @param {string} chars -
|
|
6
|
-
* @returns {string}
|
|
4
|
+
* @param {string} string_ - The input string to trim
|
|
5
|
+
* @param {string} chars - Characters to remove from the start
|
|
6
|
+
* @returns {string} A new string with specified characters removed from the start
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* trimStartCharacters("!!!hello", "!"); // Returns: "hello"
|
|
10
|
+
* trimStartCharacters("---123", "-"); // Returns: "123"
|
|
11
|
+
* trimStartCharacters("abc123", "xyz"); // Returns: "abc123"
|
|
12
|
+
* ```
|
|
7
13
|
*/
|
|
8
14
|
export declare const trimStartCharacters: (string_: string, chars: string) => string;
|
|
@@ -5,11 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.trimStartCharacters = void 0;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Removes specified characters from the start of a string
|
|
9
9
|
*
|
|
10
|
-
* @param {string} string_ -
|
|
11
|
-
* @param {string} chars -
|
|
12
|
-
* @returns {string}
|
|
10
|
+
* @param {string} string_ - The input string to trim
|
|
11
|
+
* @param {string} chars - Characters to remove from the start
|
|
12
|
+
* @returns {string} A new string with specified characters removed from the start
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* trimStartCharacters("!!!hello", "!"); // Returns: "hello"
|
|
16
|
+
* trimStartCharacters("---123", "-"); // Returns: "123"
|
|
17
|
+
* trimStartCharacters("abc123", "xyz"); // Returns: "abc123"
|
|
18
|
+
* ```
|
|
13
19
|
*/
|
|
14
20
|
var trimStartCharacters = exports.trimStartCharacters = function trimStartCharacters(string_, chars) {
|
|
15
21
|
var startIndex = 0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { TimeUnit } from "$/time/timeUnit";
|
|
2
2
|
import type { TimeUnitShort } from "$/time/timeUnitShort";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* @param value
|
|
6
|
-
* @param fromUnit
|
|
7
|
-
* @param toUnit
|
|
8
|
-
* @returns
|
|
9
|
-
* @throws {Error}
|
|
4
|
+
* Converts time between different units
|
|
5
|
+
* @param value Value to convert (string or number)
|
|
6
|
+
* @param fromUnit Source time unit
|
|
7
|
+
* @param toUnit Target time unit
|
|
8
|
+
* @returns Converted value (number)
|
|
9
|
+
* @throws {Error} If the input value is invalid
|
|
10
10
|
*/
|
|
11
11
|
export declare const convertTime: (value: string | number, fromUnit: TimeUnit | TimeUnitShort, toUnit: TimeUnit | TimeUnitShort) => number;
|
|
@@ -4,29 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.convertTime = void 0;
|
|
7
|
+
var _Math = require("@/Math");
|
|
7
8
|
var _normalizeTimeUnit = require("@/Time/normalizeTimeUnit");
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* Defines conversion rates between time units
|
|
10
11
|
*/
|
|
11
12
|
var conversionRates = {
|
|
12
13
|
milliseconds: 1,
|
|
13
14
|
seconds: 1000,
|
|
14
|
-
minutes:
|
|
15
|
-
hours:
|
|
15
|
+
minutes: 60000,
|
|
16
|
+
hours: 3600000
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @param value
|
|
21
|
-
* @param fromUnit
|
|
22
|
-
* @param toUnit
|
|
23
|
-
* @returns
|
|
24
|
-
* @throws {Error}
|
|
20
|
+
* Converts time between different units
|
|
21
|
+
* @param value Value to convert (string or number)
|
|
22
|
+
* @param fromUnit Source time unit
|
|
23
|
+
* @param toUnit Target time unit
|
|
24
|
+
* @returns Converted value (number)
|
|
25
|
+
* @throws {Error} If the input value is invalid
|
|
25
26
|
*/
|
|
26
27
|
var convertTime = exports.convertTime = function convertTime(value, fromUnit, toUnit) {
|
|
27
28
|
var numericValue = typeof value === "string" ? Number.parseFloat(value) : value;
|
|
28
29
|
var normalizedFromUnit = (0, _normalizeTimeUnit.normalizeTimeUnit)(fromUnit, "long");
|
|
29
30
|
var normalizedToUnit = (0, _normalizeTimeUnit.normalizeTimeUnit)(toUnit, "long");
|
|
30
|
-
var milliseconds = numericValue
|
|
31
|
-
return milliseconds
|
|
31
|
+
var milliseconds = (0, _Math.multiplication)(numericValue, conversionRates[normalizedFromUnit]);
|
|
32
|
+
return (0, _Math.division)(milliseconds, conversionRates[normalizedToUnit]);
|
|
32
33
|
};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Interface representing a pipeline.
|
|
3
|
+
* When called without arguments, returns the stored value.
|
|
4
|
+
* When called with a function argument, applies the function and generates a new Pipeline instance.
|
|
5
|
+
* @template T The type of value being processed in the pipeline
|
|
5
6
|
*/
|
|
6
7
|
export interface Pipeline<T> {
|
|
7
8
|
(): T;
|
|
8
9
|
<U>(transformer: (input: T) => U): Pipeline<U>;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
|
-
* Pipeline
|
|
12
|
-
* @
|
|
13
|
-
* @
|
|
12
|
+
* Function that creates a Pipeline instance
|
|
13
|
+
* @template T The type of value being processed in the pipeline
|
|
14
|
+
* @param initialValue Initial value to start the pipeline
|
|
15
|
+
* @returns Pipeline instance
|
|
14
16
|
* @example const pipeline = createPipeline(1);
|
|
15
17
|
* pipeline(); // 1
|
|
16
18
|
* pipeline((x) => x + 1)(); // 2
|
|
@@ -5,23 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createPipeline = void 0;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Interface representing a pipeline.
|
|
9
|
+
* When called without arguments, returns the stored value.
|
|
10
|
+
* When called with a function argument, applies the function and generates a new Pipeline instance.
|
|
11
|
+
* @template T The type of value being processed in the pipeline
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* Pipeline
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
15
|
+
* Function that creates a Pipeline instance
|
|
16
|
+
* @template T The type of value being processed in the pipeline
|
|
17
|
+
* @param initialValue Initial value to start the pipeline
|
|
18
|
+
* @returns Pipeline instance
|
|
17
19
|
* @example const pipeline = createPipeline(1);
|
|
18
20
|
* pipeline(); // 1
|
|
19
21
|
* pipeline((x) => x + 1)(); // 2
|
|
20
22
|
*/
|
|
21
23
|
var _createPipeline = exports.createPipeline = function createPipeline(initialValue) {
|
|
22
24
|
return (
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
+
// Accepts a transformer function as an argument and returns a new Pipeline.
|
|
26
|
+
// If no argument is provided, returns the stored value (initialValue).
|
|
25
27
|
function (transformer) {
|
|
26
28
|
return transformer ? _createPipeline(transformer(initialValue)) : initialValue;
|
|
27
29
|
}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a JSON string into a typed JavaScript value
|
|
3
|
+
* @template T The expected type of the parsed value (defaults to unknown)
|
|
4
|
+
* @param json JSON string to parse
|
|
5
|
+
* @returns Parsed value of type T
|
|
6
|
+
* @throws {SyntaxError} If the JSON string is invalid
|
|
7
|
+
*/
|
|
1
8
|
export declare const parseJson: <T = unknown>(json: string) => T;
|
|
@@ -4,6 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.parseJson = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Parses a JSON string into a typed JavaScript value
|
|
9
|
+
* @template T The expected type of the parsed value (defaults to unknown)
|
|
10
|
+
* @param json JSON string to parse
|
|
11
|
+
* @returns Parsed value of type T
|
|
12
|
+
* @throws {SyntaxError} If the JSON string is invalid
|
|
13
|
+
*/
|
|
7
14
|
var parseJson = exports.parseJson = function parseJson(json) {
|
|
8
15
|
return JSON.parse(json);
|
|
9
16
|
};
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import type { SimplifiedUserAgentInfoBrowser } from "$/ua/simplifiedUserAgentInfoBrowser";
|
|
2
|
+
/**
|
|
3
|
+
* Extracts browser information from a User-Agent string
|
|
4
|
+
*
|
|
5
|
+
* @param ua - The User-Agent string to analyze
|
|
6
|
+
* @returns The detected browser type ("edge", "chrome", "firefox", "safari", "ie", or "other")
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const browser = extractBrowserFromUserAgent(navigator.userAgent);
|
|
11
|
+
* // browser: "chrome"
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
2
14
|
export declare const extractBrowserFromUserAgent: (ua: string) => SimplifiedUserAgentInfoBrowser;
|
|
@@ -4,21 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractBrowserFromUserAgent = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Extracts browser information from a User-Agent string
|
|
9
|
+
*
|
|
10
|
+
* @param ua - The User-Agent string to analyze
|
|
11
|
+
* @returns The detected browser type ("edge", "chrome", "firefox", "safari", "ie", or "other")
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const browser = extractBrowserFromUserAgent(navigator.userAgent);
|
|
16
|
+
* // browser: "chrome"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
7
19
|
var extractBrowserFromUserAgent = exports.extractBrowserFromUserAgent = function extractBrowserFromUserAgent(ua) {
|
|
8
20
|
if (/edg(e)?/i.test(ua)) {
|
|
9
21
|
return "edge";
|
|
10
22
|
}
|
|
11
|
-
if (/
|
|
12
|
-
return "
|
|
23
|
+
if (/msie|trident/i.test(ua)) {
|
|
24
|
+
return "ie";
|
|
13
25
|
}
|
|
14
26
|
if (/firefox|fxios/i.test(ua)) {
|
|
15
27
|
return "firefox";
|
|
16
28
|
}
|
|
29
|
+
// Opera uses Chromium, so check for OPR before Chrome
|
|
30
|
+
if (/opr\//i.test(ua)) {
|
|
31
|
+
return "other";
|
|
32
|
+
}
|
|
33
|
+
if (/chrome|crios/i.test(ua)) {
|
|
34
|
+
return "chrome";
|
|
35
|
+
}
|
|
36
|
+
// Safari check should be last as Chrome/Firefox on iOS also include Safari in UA
|
|
17
37
|
if (/safari/i.test(ua)) {
|
|
18
38
|
return "safari";
|
|
19
39
|
}
|
|
20
|
-
if (/msie|trident/i.test(ua)) {
|
|
21
|
-
return "ie";
|
|
22
|
-
}
|
|
23
40
|
return "other";
|
|
24
41
|
};
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import type { SimplifiedUserAgentInfoDevice } from "$/ua/simplifiedUserAgentInfoDevice";
|
|
2
|
+
/**
|
|
3
|
+
* Extracts device type information from a User-Agent string
|
|
4
|
+
*
|
|
5
|
+
* @param ua - The User-Agent string to analyze
|
|
6
|
+
* @returns The detected device type ("bot", "mobile", "tablet", "desktop", or "other")
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const device = extractDeviceFromUserAgent(navigator.userAgent);
|
|
11
|
+
* // device: "desktop"
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
2
14
|
export declare const extractDeviceFromUserAgent: (ua: string) => SimplifiedUserAgentInfoDevice;
|
|
@@ -4,6 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractDeviceFromUserAgent = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Extracts device type information from a User-Agent string
|
|
9
|
+
*
|
|
10
|
+
* @param ua - The User-Agent string to analyze
|
|
11
|
+
* @returns The detected device type ("bot", "mobile", "tablet", "desktop", or "other")
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const device = extractDeviceFromUserAgent(navigator.userAgent);
|
|
16
|
+
* // device: "desktop"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
7
19
|
var extractDeviceFromUserAgent = exports.extractDeviceFromUserAgent = function extractDeviceFromUserAgent(ua) {
|
|
8
20
|
if (/bot|googlebot|crawler|spider|robot|crawling/i.test(ua)) {
|
|
9
21
|
return "bot";
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import type { SimplifiedUserAgentInfoOs } from "$/ua/simplifiedUserAgentInfoOs";
|
|
2
|
+
/**
|
|
3
|
+
* Extracts operating system information from a User-Agent string
|
|
4
|
+
*
|
|
5
|
+
* @param ua - The User-Agent string to analyze
|
|
6
|
+
* @returns The detected operating system ("ios", "android", "macos", "windows", "linux", or "other")
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const os = extractOsFromUserAgent(navigator.userAgent);
|
|
11
|
+
* // os: "macos"
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
2
14
|
export declare const extractOsFromUserAgent: (ua: string) => SimplifiedUserAgentInfoOs;
|
|
@@ -4,6 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractOsFromUserAgent = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Extracts operating system information from a User-Agent string
|
|
9
|
+
*
|
|
10
|
+
* @param ua - The User-Agent string to analyze
|
|
11
|
+
* @returns The detected operating system ("ios", "android", "macos", "windows", "linux", or "other")
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const os = extractOsFromUserAgent(navigator.userAgent);
|
|
16
|
+
* // os: "macos"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
7
19
|
var extractOsFromUserAgent = exports.extractOsFromUserAgent = function extractOsFromUserAgent(ua) {
|
|
8
20
|
if (/iphone|ipad|ipod/i.test(ua)) {
|
|
9
21
|
return "ios";
|
|
@@ -1,2 +1,18 @@
|
|
|
1
1
|
import type { SimplifiedUserAgentInfo } from "$/ua/simplifiedUserAgentInfo";
|
|
2
|
+
/**
|
|
3
|
+
* Parse a User-Agent string to extract browser, device, and OS information
|
|
4
|
+
*
|
|
5
|
+
* @param userAgent - The complete User-Agent string to analyze
|
|
6
|
+
* @returns An object containing the detected browser, device, and operating system
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const info = parseUserAgent(navigator.userAgent);
|
|
11
|
+
* // info: {
|
|
12
|
+
* // browser: "chrome",
|
|
13
|
+
* // device: "desktop",
|
|
14
|
+
* // os: "macos"
|
|
15
|
+
* // }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
2
18
|
export declare const parseUserAgent: (userAgent: string) => SimplifiedUserAgentInfo;
|
|
@@ -7,6 +7,22 @@ exports.parseUserAgent = void 0;
|
|
|
7
7
|
var _extractBrowserFromUserAgent = require("./extractBrowserFromUserAgent");
|
|
8
8
|
var _extractDeviceFromUserAgent = require("./extractDeviceFromUserAgent");
|
|
9
9
|
var _extractOsFromUserAgent = require("./extractOsFromUserAgent");
|
|
10
|
+
/**
|
|
11
|
+
* Parse a User-Agent string to extract browser, device, and OS information
|
|
12
|
+
*
|
|
13
|
+
* @param userAgent - The complete User-Agent string to analyze
|
|
14
|
+
* @returns An object containing the detected browser, device, and operating system
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const info = parseUserAgent(navigator.userAgent);
|
|
19
|
+
* // info: {
|
|
20
|
+
* // browser: "chrome",
|
|
21
|
+
* // device: "desktop",
|
|
22
|
+
* // os: "macos"
|
|
23
|
+
* // }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
10
26
|
var parseUserAgent = exports.parseUserAgent = function parseUserAgent(userAgent) {
|
|
11
27
|
var ua = userAgent.toLowerCase();
|
|
12
28
|
return {
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit converter initialization function
|
|
3
|
+
* Creates a converter function that can convert between different units using base unit ratios
|
|
4
|
+
* @template T Object type containing unit to base unit ratios
|
|
5
|
+
* @template K Key type of the ratios object (string, number, or symbol)
|
|
6
|
+
* @param toBaseUnitRatios Object containing conversion ratios to the base unit
|
|
7
|
+
* @returns A function that converts values between units
|
|
8
|
+
* @example
|
|
9
|
+
* const lengthConverter = unitConverterInitialization({
|
|
10
|
+
* meters: 1, // base unit
|
|
11
|
+
* kilometers: 1000,
|
|
12
|
+
* centimeters: 0.01
|
|
13
|
+
* });
|
|
14
|
+
* lengthConverter(5, "kilometers", "meters"); // returns 5000
|
|
15
|
+
*/
|
|
1
16
|
export declare const unitConverterInitialization: <T extends { [k in K]: number; }, K extends string | number | symbol>(toBaseUnitRatios: T) => (value: number, from: keyof T, to: keyof T) => number;
|
|
@@ -6,6 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.unitConverterInitialization = void 0;
|
|
7
7
|
var _division = require("@/Math/division");
|
|
8
8
|
var _multiplication = require("@/Math/multiplication");
|
|
9
|
+
/**
|
|
10
|
+
* Unit converter initialization function
|
|
11
|
+
* Creates a converter function that can convert between different units using base unit ratios
|
|
12
|
+
* @template T Object type containing unit to base unit ratios
|
|
13
|
+
* @template K Key type of the ratios object (string, number, or symbol)
|
|
14
|
+
* @param toBaseUnitRatios Object containing conversion ratios to the base unit
|
|
15
|
+
* @returns A function that converts values between units
|
|
16
|
+
* @example
|
|
17
|
+
* const lengthConverter = unitConverterInitialization({
|
|
18
|
+
* meters: 1, // base unit
|
|
19
|
+
* kilometers: 1000,
|
|
20
|
+
* centimeters: 0.01
|
|
21
|
+
* });
|
|
22
|
+
* lengthConverter(5, "kilometers", "meters"); // returns 5000
|
|
23
|
+
*/
|
|
9
24
|
var unitConverterInitialization = exports.unitConverterInitialization = function unitConverterInitialization(toBaseUnitRatios) {
|
|
10
25
|
return function (value, from, to) {
|
|
11
26
|
return (0, _multiplication.multiplication)((0, _division.division)(value, toBaseUnitRatios[from]), toBaseUnitRatios[to]);
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Array validation core module
|
|
3
|
+
* Provides functionality to validate arrays with type-specific validation rules
|
|
4
|
+
*/
|
|
1
5
|
import type { Types, ValidateCoreReturnType, ValidateType } from "@/Validate/type";
|
|
6
|
+
/**
|
|
7
|
+
* Creates an array validator with type-specific validation rules
|
|
8
|
+
* @template A - Type of array elements (string | number | boolean)
|
|
9
|
+
* @template O - Object containing validation functions for each type
|
|
10
|
+
* @param {O} option - Validation functions for each type
|
|
11
|
+
* @param {string} [message] - Custom error message for array type validation
|
|
12
|
+
* @returns {Function} - Validator function for arrays
|
|
13
|
+
*/
|
|
2
14
|
export declare const array: <A extends string | number | boolean, O extends { [P in Types<A>]: (value: ValidateType<P>) => ValidateCoreReturnType<ValidateType<P>>; } = { [P in Types<A>]: (value: ValidateType<P>) => ValidateCoreReturnType<ValidateType<P>>; }>(option?: O, message?: string) => (values: A[]) => ValidateCoreReturnType<A[]>;
|
|
@@ -9,7 +9,18 @@ var _isNotEmpty = require("@/Validate/isNotEmpty");
|
|
|
9
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
10
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
11
|
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; } }
|
|
12
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /**
|
|
13
|
+
* Array validation core module
|
|
14
|
+
* Provides functionality to validate arrays with type-specific validation rules
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Creates an array validator with type-specific validation rules
|
|
18
|
+
* @template A - Type of array elements (string | number | boolean)
|
|
19
|
+
* @template O - Object containing validation functions for each type
|
|
20
|
+
* @param {O} option - Validation functions for each type
|
|
21
|
+
* @param {string} [message] - Custom error message for array type validation
|
|
22
|
+
* @returns {Function} - Validator function for arrays
|
|
23
|
+
*/
|
|
13
24
|
var array = exports.array = function array() {
|
|
14
25
|
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15
26
|
var message = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -27,11 +38,11 @@ var array = exports.array = function array() {
|
|
|
27
38
|
try {
|
|
28
39
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
29
40
|
var _value = _step.value;
|
|
30
|
-
var
|
|
31
|
-
if (!(
|
|
41
|
+
var validator = option[_typeof(_value)];
|
|
42
|
+
if (!(validator !== null && validator !== void 0 && validator(_value).validate)) {
|
|
32
43
|
return {
|
|
33
44
|
validate: false,
|
|
34
|
-
message: (
|
|
45
|
+
message: (validator === null || validator === void 0 ? void 0 : validator(_value).message) || "",
|
|
35
46
|
type: values
|
|
36
47
|
};
|
|
37
48
|
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boolean validation core module
|
|
3
|
+
* Provides the base validation functionality for boolean values
|
|
4
|
+
*/
|
|
1
5
|
import type { ValidateCoreReturnType } from "@/Validate/type";
|
|
6
|
+
/**
|
|
7
|
+
* Creates a boolean validator
|
|
8
|
+
* @param {string} [message] - Custom error message for type validation
|
|
9
|
+
* @returns {Function} - Validator function that checks if the value is a boolean
|
|
10
|
+
*/
|
|
2
11
|
export declare const boolean: (message?: string) => (value: boolean) => ValidateCoreReturnType<boolean>;
|
|
@@ -5,6 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["boolean"] = void 0;
|
|
7
7
|
var _core = require("@/Validate/core");
|
|
8
|
+
/**
|
|
9
|
+
* Boolean validation core module
|
|
10
|
+
* Provides the base validation functionality for boolean values
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates a boolean validator
|
|
15
|
+
* @param {string} [message] - Custom error message for type validation
|
|
16
|
+
* @returns {Function} - Validator function that checks if the value is a boolean
|
|
17
|
+
*/
|
|
8
18
|
var _boolean = exports["boolean"] = function _boolean(message) {
|
|
9
19
|
return function (value) {
|
|
10
20
|
return (0, _core.core)("boolean")(value, [], message);
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core validation module
|
|
3
|
+
* Provides the base validation functionality used by all other validation modules
|
|
4
|
+
*/
|
|
1
5
|
import type { Types, ValidateCoreReturnType, ValidateReturnType } from "@/Validate/type";
|
|
6
|
+
/**
|
|
7
|
+
* Creates a validator function that checks type and additional validation rules
|
|
8
|
+
* @template T - The type of value to validate
|
|
9
|
+
* @param {Types<T>} type - The expected type of the value
|
|
10
|
+
* @returns {Function} - A validator function that accepts a value, options, and message
|
|
11
|
+
*/
|
|
2
12
|
export declare const core: <T>(type: Types<T>) => <O extends ValidateReturnType<T>[]>(value: T, option?: O, message?: string) => ValidateCoreReturnType<T>;
|
|
@@ -8,11 +8,23 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
8
8
|
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; } }
|
|
9
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
10
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
/**
|
|
12
|
+
* Core validation module
|
|
13
|
+
* Provides the base validation functionality used by all other validation modules
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Creates a validator function that checks type and additional validation rules
|
|
18
|
+
* @template T - The type of value to validate
|
|
19
|
+
* @param {Types<T>} type - The expected type of the value
|
|
20
|
+
* @returns {Function} - A validator function that accepts a value, options, and message
|
|
21
|
+
*/
|
|
22
|
+
|
|
11
23
|
var core = exports.core = function core(type) {
|
|
12
24
|
return function (value) {
|
|
13
25
|
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
14
26
|
var message = arguments.length > 2 ? arguments[2] : undefined;
|
|
15
|
-
// biome-ignore lint/suspicious/useValidTypeof: <
|
|
27
|
+
// biome-ignore lint/suspicious/useValidTypeof: Type parameter is a string literal type from Types<T>
|
|
16
28
|
if (_typeof(value) !== type) {
|
|
17
29
|
return {
|
|
18
30
|
validate: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param array
|
|
4
|
-
* @returns boolean
|
|
2
|
+
* Determines if the value is an array
|
|
3
|
+
* @param array - Value to check
|
|
4
|
+
* @returns boolean - True if the value is an array, false otherwise
|
|
5
5
|
* @example isArray([1, 2, 3]); // true
|
|
6
6
|
* isArray({}); // false
|
|
7
7
|
*/
|