umt 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (931) hide show
  1. package/module/Advance/rangeAdvance.d.ts +10 -6
  2. package/module/Advance/rangeAdvance.js +10 -6
  3. package/module/Advance/rangeAdvance.js.map +1 -1
  4. package/module/Array/arraysJoin.d.ts +4 -4
  5. package/module/Array/arraysJoin.js +4 -4
  6. package/module/Array/binarySearch.d.ts +4 -3
  7. package/module/Array/binarySearch.js +4 -3
  8. package/module/Array/binarySearch.js.map +1 -1
  9. package/module/Array/checkFlagAlignment.d.ts +3 -3
  10. package/module/Array/checkFlagAlignment.js +7 -7
  11. package/module/Array/checkFlagAlignment.js.map +1 -1
  12. package/module/Array/chunk.d.ts +4 -4
  13. package/module/Array/compact.d.ts +8 -0
  14. package/module/Array/compact.js +8 -0
  15. package/module/Array/compact.js.map +1 -1
  16. package/module/Array/compareFunctionDefault.d.ts +13 -0
  17. package/module/Array/compareFunctionDefault.js +13 -0
  18. package/module/Array/compareFunctionDefault.js.map +1 -1
  19. package/module/Array/drop.d.ts +5 -5
  20. package/module/Array/drop.js +5 -5
  21. package/module/Array/dualPivotQuickSort.d.ts +16 -0
  22. package/module/Array/dualPivotQuickSort.js +152 -0
  23. package/module/Array/dualPivotQuickSort.js.map +1 -0
  24. package/module/Array/first.d.ts +3 -3
  25. package/module/Array/first.js +3 -3
  26. package/module/Array/generateNumberArray.d.ts +6 -6
  27. package/module/Array/generateNumberArray.js +6 -6
  28. package/module/Array/getArraysCommon.d.ts +4 -4
  29. package/module/Array/getArraysCommon.js +4 -4
  30. package/module/Array/getArraysDiff.d.ts +4 -4
  31. package/module/Array/getArraysDiff.js +4 -4
  32. package/module/Array/groupBy.d.ts +8 -4
  33. package/module/Array/groupBy.js +8 -4
  34. package/module/Array/groupBy.js.map +1 -1
  35. package/module/Array/index.d.ts +1 -0
  36. package/module/Array/index.js +1 -0
  37. package/module/Array/index.js.map +1 -1
  38. package/module/Array/insertionSort.d.ts +8 -7
  39. package/module/Array/insertionSort.js +6 -6
  40. package/module/Array/insertionSort.js.map +1 -1
  41. package/module/Array/mergeSort.d.ts +6 -5
  42. package/module/Array/mergeSort.js +9 -9
  43. package/module/Array/mergeSort.js.map +1 -1
  44. package/module/Array/quickSort.d.ts +12 -11
  45. package/module/Array/quickSort.js +44 -10
  46. package/module/Array/quickSort.js.map +1 -1
  47. package/module/Array/randomSelect.d.ts +5 -5
  48. package/module/Array/randomSelect.js +5 -5
  49. package/module/Array/range.d.ts +5 -5
  50. package/module/Array/range.js +26 -10
  51. package/module/Array/range.js.map +1 -1
  52. package/module/Array/shuffle.d.ts +3 -3
  53. package/module/Array/shuffle.js +3 -3
  54. package/module/Array/shuffle2DArray.d.ts +4 -4
  55. package/module/Array/shuffle2DArray.js +6 -6
  56. package/module/Array/shuffle2DArray.js.map +1 -1
  57. package/module/Array/sum.d.ts +3 -3
  58. package/module/Array/sum.js +4 -4
  59. package/module/Array/sum.js.map +1 -1
  60. package/module/Array/timSort.d.ts +13 -11
  61. package/module/Array/timSort.js +33 -9
  62. package/module/Array/timSort.js.map +1 -1
  63. package/module/Array/zip.d.ts +6 -3
  64. package/module/Array/zip.js +6 -3
  65. package/module/Array/zip.js.map +1 -1
  66. package/module/Array/zipLongest.d.ts +8 -5
  67. package/module/Array/zipLongest.js +8 -5
  68. package/module/Array/zipLongest.js.map +1 -1
  69. package/module/Color/cmykToRgba.d.ts +7 -7
  70. package/module/Color/cmykToRgba.js +12 -12
  71. package/module/Color/cmykToRgba.js.map +1 -1
  72. package/module/Color/hexaToRgba.d.ts +4 -3
  73. package/module/Color/hexaToRgba.js +18 -7
  74. package/module/Color/hexaToRgba.js.map +1 -1
  75. package/module/Color/hslaToRgba.d.ts +7 -6
  76. package/module/Color/hslaToRgba.js +19 -15
  77. package/module/Color/hslaToRgba.js.map +1 -1
  78. package/module/Color/rgbaToCmyk.d.ts +3 -3
  79. package/module/Color/rgbaToCmyk.js +14 -3
  80. package/module/Color/rgbaToCmyk.js.map +1 -1
  81. package/module/Color/rgbaToHexA.d.ts +4 -4
  82. package/module/Color/rgbaToHexA.js +5 -5
  83. package/module/Color/rgbaToHexA.js.map +1 -1
  84. package/module/Color/rgbaToHsla.d.ts +4 -3
  85. package/module/Color/rgbaToHsla.js +15 -3
  86. package/module/Color/rgbaToHsla.js.map +1 -1
  87. package/module/Consts/clock.d.ts +11 -11
  88. package/module/Consts/clock.js +11 -11
  89. package/module/Consts/httpStatus/httpClientErrorStatus.d.ts +28 -0
  90. package/module/Consts/httpStatus/httpClientErrorStatus.js +28 -0
  91. package/module/Consts/httpStatus/httpClientErrorStatus.js.map +1 -1
  92. package/module/Consts/httpStatus/httpInformationalStatus.d.ts +9 -0
  93. package/module/Consts/httpStatus/httpInformationalStatus.js +9 -0
  94. package/module/Consts/httpStatus/httpInformationalStatus.js.map +1 -1
  95. package/module/Consts/httpStatus/httpRedirectionStatus.d.ts +11 -0
  96. package/module/Consts/httpStatus/httpRedirectionStatus.js +11 -0
  97. package/module/Consts/httpStatus/httpRedirectionStatus.js.map +1 -1
  98. package/module/Consts/httpStatus/httpServerErrorStatus.d.ts +10 -0
  99. package/module/Consts/httpStatus/httpServerErrorStatus.js +10 -0
  100. package/module/Consts/httpStatus/httpServerErrorStatus.js.map +1 -1
  101. package/module/Consts/httpStatus/httpSuccessStatus.d.ts +11 -0
  102. package/module/Consts/httpStatus/httpSuccessStatus.js +11 -0
  103. package/module/Consts/httpStatus/httpSuccessStatus.js.map +1 -1
  104. package/module/Date/birthday.d.ts +7 -6
  105. package/module/Date/birthday.js +7 -6
  106. package/module/Date/birthday.js.map +1 -1
  107. package/module/Date/dateRange.d.ts +7 -4
  108. package/module/Date/dateRange.js +7 -4
  109. package/module/Date/dateRange.js.map +1 -1
  110. package/module/Date/dayOfWeek.d.ts +4 -4
  111. package/module/Date/dayOfWeek.js +4 -4
  112. package/module/Date/format.d.ts +30 -4
  113. package/module/Date/format.js +30 -4
  114. package/module/Date/format.js.map +1 -1
  115. package/module/Date/getDay.d.ts +8 -5
  116. package/module/Date/getDay.js +8 -5
  117. package/module/Date/getDay.js.map +1 -1
  118. package/module/Date/getTimezoneOffsetString.d.ts +3 -3
  119. package/module/Date/getTimezoneOffsetString.js +3 -3
  120. package/module/Date/isLeapYear.d.ts +8 -3
  121. package/module/Date/isLeapYear.js +8 -3
  122. package/module/Date/isLeapYear.js.map +1 -1
  123. package/module/Date/new.d.ts +20 -20
  124. package/module/Date/new.js +21 -21
  125. package/module/Date/new.js.map +1 -1
  126. package/module/Date/now.d.ts +7 -4
  127. package/module/Date/now.js +7 -4
  128. package/module/Date/now.js.map +1 -1
  129. package/module/Error/safeExecute.d.ts +21 -0
  130. package/module/Error/safeExecute.js +20 -0
  131. package/module/Error/safeExecute.js.map +1 -1
  132. package/module/IP/cidrToLong.d.ts +4 -3
  133. package/module/IP/cidrToLong.js +10 -4
  134. package/module/IP/cidrToLong.js.map +1 -1
  135. package/module/IP/cidrToSubnetMask.d.ts +4 -3
  136. package/module/IP/cidrToSubnetMask.js +4 -3
  137. package/module/IP/cidrToSubnetMask.js.map +1 -1
  138. package/module/IP/getIpClass.d.ts +3 -3
  139. package/module/IP/getIpClass.js +30 -18
  140. package/module/IP/getIpClass.js.map +1 -1
  141. package/module/IP/getNetworkAddress.d.ts +5 -4
  142. package/module/IP/getNetworkAddress.js +36 -6
  143. package/module/IP/getNetworkAddress.js.map +1 -1
  144. package/module/IP/ipToBinaryString.d.ts +4 -3
  145. package/module/IP/ipToBinaryString.js +32 -7
  146. package/module/IP/ipToBinaryString.js.map +1 -1
  147. package/module/IP/ipToLong.d.ts +4 -3
  148. package/module/IP/ipToLong.js +4 -3
  149. package/module/IP/ipToLong.js.map +1 -1
  150. package/module/IP/isInRange.d.ts +6 -5
  151. package/module/IP/isInRange.js +33 -7
  152. package/module/IP/isInRange.js.map +1 -1
  153. package/module/IP/isPrivateIp.d.ts +4 -3
  154. package/module/IP/isPrivateIp.js +17 -9
  155. package/module/IP/isPrivateIp.js.map +1 -1
  156. package/module/IP/longToIp.d.ts +4 -3
  157. package/module/IP/longToIp.js +16 -4
  158. package/module/IP/longToIp.js.map +1 -1
  159. package/module/IP/subnetMaskToCidr.d.ts +4 -3
  160. package/module/IP/subnetMaskToCidr.js +28 -12
  161. package/module/IP/subnetMaskToCidr.js.map +1 -1
  162. package/module/Math/addition.d.ts +3 -3
  163. package/module/Math/addition.js +3 -3
  164. package/module/Math/average.d.ts +7 -4
  165. package/module/Math/average.js +7 -4
  166. package/module/Math/average.js.map +1 -1
  167. package/module/Math/bitwise.d.ts +5 -5
  168. package/module/Math/bitwise.js +5 -5
  169. package/module/Math/calculator/calculator.d.ts +9 -7
  170. package/module/Math/calculator/calculator.js +9 -7
  171. package/module/Math/calculator/calculator.js.map +1 -1
  172. package/module/Math/calculator/calculatorInitialization.d.ts +4 -3
  173. package/module/Math/calculator/calculatorInitialization.js +6 -5
  174. package/module/Math/calculator/calculatorInitialization.js.map +1 -1
  175. package/module/Math/calculator/convertCurrency.d.ts +6 -4
  176. package/module/Math/calculator/convertCurrency.js +6 -4
  177. package/module/Math/calculator/convertCurrency.js.map +1 -1
  178. package/module/Math/calculator/core.js +13 -13
  179. package/module/Math/calculator/core.js.map +1 -1
  180. package/module/Math/calculator/literalExpression.d.ts +5 -3
  181. package/module/Math/calculator/literalExpression.js +12 -10
  182. package/module/Math/calculator/literalExpression.js.map +1 -1
  183. package/module/Math/degToRad.d.ts +3 -3
  184. package/module/Math/degToRad.js +3 -3
  185. package/module/Math/deviationValue.d.ts +5 -5
  186. package/module/Math/deviationValue.js +5 -5
  187. package/module/Math/division.d.ts +5 -5
  188. package/module/Math/division.js +31 -21
  189. package/module/Math/division.js.map +1 -1
  190. package/module/Math/factorial.d.ts +3 -3
  191. package/module/Math/factorial.js +3 -3
  192. package/module/Math/factorize.d.ts +3 -3
  193. package/module/Math/factorize.js +3 -3
  194. package/module/Math/flexibleNumberConversion.d.ts +11 -11
  195. package/module/Math/flexibleNumberConversion.js +19 -19
  196. package/module/Math/flexibleNumberConversion.js.map +1 -1
  197. package/module/Math/gcd.d.ts +5 -5
  198. package/module/Math/gcd.js +6 -6
  199. package/module/Math/gcd.js.map +1 -1
  200. package/module/Math/getDecimalLength.d.ts +7 -4
  201. package/module/Math/getDecimalLength.js +9 -5
  202. package/module/Math/getDecimalLength.js.map +1 -1
  203. package/module/Math/lcm.d.ts +4 -4
  204. package/module/Math/lcm.js +5 -5
  205. package/module/Math/lcm.js.map +1 -1
  206. package/module/Math/linearCongruentialGenerator.d.ts +6 -6
  207. package/module/Math/linearCongruentialGenerator.js +6 -6
  208. package/module/Math/mathConverter.d.ts +7 -3
  209. package/module/Math/mathConverter.js +7 -3
  210. package/module/Math/mathConverter.js.map +1 -1
  211. package/module/Math/mathSeparator.d.ts +8 -3
  212. package/module/Math/mathSeparator.js +8 -3
  213. package/module/Math/mathSeparator.js.map +1 -1
  214. package/module/Math/max.d.ts +4 -3
  215. package/module/Math/max.js +4 -3
  216. package/module/Math/max.js.map +1 -1
  217. package/module/Math/median.d.ts +3 -3
  218. package/module/Math/median.js +3 -3
  219. package/module/Math/min.d.ts +4 -3
  220. package/module/Math/min.js +4 -3
  221. package/module/Math/min.js.map +1 -1
  222. package/module/Math/multiples.d.ts +4 -4
  223. package/module/Math/multiples.js +4 -4
  224. package/module/Math/multiplication.d.ts +3 -3
  225. package/module/Math/multiplication.js +3 -3
  226. package/module/Math/nCr.d.ts +7 -4
  227. package/module/Math/nCr.js +7 -4
  228. package/module/Math/nCr.js.map +1 -1
  229. package/module/Math/nHr.d.ts +7 -4
  230. package/module/Math/nHr.js +7 -4
  231. package/module/Math/nHr.js.map +1 -1
  232. package/module/Math/nPr.d.ts +7 -4
  233. package/module/Math/nPr.js +7 -4
  234. package/module/Math/nPr.js.map +1 -1
  235. package/module/Math/primeFactorization.d.ts +6 -3
  236. package/module/Math/primeFactorization.js +11 -8
  237. package/module/Math/primeFactorization.js.map +1 -1
  238. package/module/Math/quotient.d.ts +7 -4
  239. package/module/Math/quotient.js +7 -4
  240. package/module/Math/quotient.js.map +1 -1
  241. package/module/Math/radToDeg.d.ts +5 -3
  242. package/module/Math/radToDeg.js +5 -3
  243. package/module/Math/radToDeg.js.map +1 -1
  244. package/module/Math/random.d.ts +6 -5
  245. package/module/Math/random.js +6 -5
  246. package/module/Math/random.js.map +1 -1
  247. package/module/Math/reduce.d.ts +9 -4
  248. package/module/Math/reduce.js +16 -6
  249. package/module/Math/reduce.js.map +1 -1
  250. package/module/Math/repeatedTrial.d.ts +5 -5
  251. package/module/Math/repeatedTrial.js +5 -5
  252. package/module/Math/roundOf.d.ts +7 -5
  253. package/module/Math/roundOf.js +8 -6
  254. package/module/Math/roundOf.js.map +1 -1
  255. package/module/Math/solveEquation.d.ts +12 -13
  256. package/module/Math/solveEquation.js +32 -37
  257. package/module/Math/solveEquation.js.map +1 -1
  258. package/module/Math/standardDeviation.d.ts +8 -3
  259. package/module/Math/standardDeviation.js +13 -7
  260. package/module/Math/standardDeviation.js.map +1 -1
  261. package/module/Math/subtract.d.ts +10 -4
  262. package/module/Math/subtract.js +12 -6
  263. package/module/Math/subtract.js.map +1 -1
  264. package/module/Math/toBaseN.d.ts +8 -6
  265. package/module/Math/toBaseN.js +9 -7
  266. package/module/Math/toBaseN.js.map +1 -1
  267. package/module/Math/toCelsius.d.ts +5 -3
  268. package/module/Math/toCelsius.js +5 -3
  269. package/module/Math/toCelsius.js.map +1 -1
  270. package/module/Math/toKelvin.d.ts +5 -3
  271. package/module/Math/toKelvin.js +5 -3
  272. package/module/Math/toKelvin.js.map +1 -1
  273. package/module/Math/uuidv7.d.ts +10 -2
  274. package/module/Math/uuidv7.js +10 -2
  275. package/module/Math/uuidv7.js.map +1 -1
  276. package/module/Math/valueSwap.d.ts +5 -4
  277. package/module/Math/valueSwap.js +5 -4
  278. package/module/Math/valueSwap.js.map +1 -1
  279. package/module/Math/xoshiro256.d.ts +8 -3
  280. package/module/Math/xoshiro256.js +8 -3
  281. package/module/Math/xoshiro256.js.map +1 -1
  282. package/module/Object/has.d.ts +4 -4
  283. package/module/Object/has.js +4 -4
  284. package/module/Object/keyBy.d.ts +3 -3
  285. package/module/Object/keyBy.js +4 -4
  286. package/module/Object/pick.d.ts +6 -6
  287. package/module/Object/pick.js +6 -6
  288. package/module/Object/pickDeep.d.ts +7 -7
  289. package/module/Object/pickDeep.js +7 -7
  290. package/module/Simple/Array/quickSortSimple.d.ts +9 -7
  291. package/module/Simple/Array/quickSortSimple.js +7 -6
  292. package/module/Simple/Array/quickSortSimple.js.map +1 -1
  293. package/module/Simple/Date/birthdaySimple.d.ts +4 -4
  294. package/module/Simple/Date/birthdaySimple.js +4 -4
  295. package/module/Simple/Date/dayOfWeekSimple.d.ts +4 -4
  296. package/module/Simple/Date/nowSimple.d.ts +3 -3
  297. package/module/Simple/Date/nowSimple.js +3 -3
  298. package/module/Simple/Math/deviationValueSimple.d.ts +10 -11
  299. package/module/Simple/Math/deviationValueSimple.js +14 -13
  300. package/module/Simple/Math/deviationValueSimple.js.map +1 -1
  301. package/module/String/deleteSpaces.d.ts +8 -4
  302. package/module/String/deleteSpaces.js +8 -4
  303. package/module/String/deleteSpaces.js.map +1 -1
  304. package/module/String/formatString.d.ts +8 -8
  305. package/module/String/formatString.js +7 -7
  306. package/module/String/formatString.js.map +1 -1
  307. package/module/String/fromBase64.d.ts +4 -3
  308. package/module/String/fromBase64.js +15 -9
  309. package/module/String/fromBase64.js.map +1 -1
  310. package/module/String/hasNoLetters.d.ts +9 -3
  311. package/module/String/hasNoLetters.js +12 -6
  312. package/module/String/hasNoLetters.js.map +1 -1
  313. package/module/String/padEnd.d.ts +5 -5
  314. package/module/String/padEnd.js +5 -5
  315. package/module/String/padStart.d.ts +11 -5
  316. package/module/String/padStart.js +17 -5
  317. package/module/String/padStart.js.map +1 -1
  318. package/module/String/randomString.d.ts +4 -4
  319. package/module/String/randomString.js +4 -4
  320. package/module/String/randomStringInitialization.d.ts +3 -3
  321. package/module/String/randomStringInitialization.js +3 -3
  322. package/module/String/reverseString.d.ts +3 -3
  323. package/module/String/reverseString.js +3 -3
  324. package/module/String/toBase64.d.ts +3 -3
  325. package/module/String/toBase64.js +3 -3
  326. package/module/String/toHalfWidth.d.ts +3 -3
  327. package/module/String/toHalfWidth.js +3 -3
  328. package/module/String/trimCharacters.d.ts +4 -4
  329. package/module/String/trimCharacters.js +4 -4
  330. package/module/String/trimEndCharacters.d.ts +10 -4
  331. package/module/String/trimEndCharacters.js +10 -4
  332. package/module/String/trimEndCharacters.js.map +1 -1
  333. package/module/String/trimStartCharacters.d.ts +10 -4
  334. package/module/String/trimStartCharacters.js +10 -4
  335. package/module/String/trimStartCharacters.js.map +1 -1
  336. package/module/Time/convertTime.d.ts +6 -6
  337. package/module/Time/convertTime.js +12 -11
  338. package/module/Time/convertTime.js.map +1 -1
  339. package/module/Tool/createPipeline.d.ts +8 -6
  340. package/module/Tool/createPipeline.js +6 -5
  341. package/module/Tool/createPipeline.js.map +1 -1
  342. package/module/Tool/parseJson.d.ts +7 -0
  343. package/module/Tool/parseJson.js +7 -0
  344. package/module/Tool/parseJson.js.map +1 -1
  345. package/module/UA/extractBrowserFromUserAgent.d.ts +12 -0
  346. package/module/UA/extractBrowserFromUserAgent.js +22 -5
  347. package/module/UA/extractBrowserFromUserAgent.js.map +1 -1
  348. package/module/UA/extractDeviceFromUserAgent.d.ts +12 -0
  349. package/module/UA/extractDeviceFromUserAgent.js +12 -0
  350. package/module/UA/extractDeviceFromUserAgent.js.map +1 -1
  351. package/module/UA/extractOsFromUserAgent.d.ts +12 -0
  352. package/module/UA/extractOsFromUserAgent.js +12 -0
  353. package/module/UA/extractOsFromUserAgent.js.map +1 -1
  354. package/module/UA/parseUserAgent.d.ts +16 -0
  355. package/module/UA/parseUserAgent.js +16 -0
  356. package/module/UA/parseUserAgent.js.map +1 -1
  357. package/module/Unit/index.d.ts +1 -0
  358. package/module/Unit/index.js +2 -0
  359. package/module/Unit/index.js.map +1 -0
  360. package/module/Unit/unitConverterInitialization.d.ts +16 -0
  361. package/module/Unit/unitConverterInitialization.js +19 -0
  362. package/module/Unit/unitConverterInitialization.js.map +1 -0
  363. package/module/Validate/array/core.d.ts +12 -0
  364. package/module/Validate/array/core.js +15 -3
  365. package/module/Validate/array/core.js.map +1 -1
  366. package/module/Validate/boolean/core.d.ts +9 -0
  367. package/module/Validate/boolean/core.js +9 -0
  368. package/module/Validate/boolean/core.js.map +1 -1
  369. package/module/Validate/core/index.d.ts +10 -0
  370. package/module/Validate/core/index.js +11 -1
  371. package/module/Validate/core/index.js.map +1 -1
  372. package/module/Validate/isArray.d.ts +3 -3
  373. package/module/Validate/isArray.js +3 -3
  374. package/module/Validate/isBrowser.d.ts +1 -1
  375. package/module/Validate/isBrowser.js +1 -1
  376. package/module/Validate/isBun.d.ts +1 -1
  377. package/module/Validate/isBun.js +1 -1
  378. package/module/Validate/isDictionaryObject.d.ts +3 -3
  379. package/module/Validate/isDictionaryObject.js +3 -3
  380. package/module/Validate/isDouble.d.ts +4 -4
  381. package/module/Validate/isDouble.js +4 -4
  382. package/module/Validate/isNode.d.ts +1 -1
  383. package/module/Validate/isNode.js +1 -1
  384. package/module/Validate/isNodeWebkit.d.ts +1 -1
  385. package/module/Validate/isNodeWebkit.js +1 -1
  386. package/module/Validate/isNotEmpty.d.ts +3 -3
  387. package/module/Validate/isNotEmpty.js +4 -4
  388. package/module/Validate/isNotEmpty.js.map +1 -1
  389. package/module/Validate/isNumber.d.ts +4 -4
  390. package/module/Validate/isNumber.js +10 -4
  391. package/module/Validate/isNumber.js.map +1 -1
  392. package/module/Validate/isPerfectSquare.d.ts +8 -3
  393. package/module/Validate/isPerfectSquare.js +8 -3
  394. package/module/Validate/isPerfectSquare.js.map +1 -1
  395. package/module/Validate/isPrimeNumber.d.ts +7 -3
  396. package/module/Validate/isPrimeNumber.js +8 -4
  397. package/module/Validate/isPrimeNumber.js.map +1 -1
  398. package/module/Validate/isValueNaN.d.ts +7 -5
  399. package/module/Validate/isValueNaN.js +7 -5
  400. package/module/Validate/isValueNaN.js.map +1 -1
  401. package/module/Validate/number/core.d.ts +11 -0
  402. package/module/Validate/number/core.js +11 -0
  403. package/module/Validate/number/core.js.map +1 -1
  404. package/module/Validate/number/double.d.ts +9 -0
  405. package/module/Validate/number/double.js +9 -0
  406. package/module/Validate/number/double.js.map +1 -1
  407. package/module/Validate/number/even.d.ts +9 -0
  408. package/module/Validate/number/even.js +9 -0
  409. package/module/Validate/number/even.js.map +1 -1
  410. package/module/Validate/number/maxValue.d.ts +10 -0
  411. package/module/Validate/number/maxValue.js +10 -0
  412. package/module/Validate/number/maxValue.js.map +1 -1
  413. package/module/Validate/number/minValue.d.ts +10 -0
  414. package/module/Validate/number/minValue.js +10 -0
  415. package/module/Validate/number/minValue.js.map +1 -1
  416. package/module/Validate/number/prime.d.ts +9 -0
  417. package/module/Validate/number/prime.js +9 -0
  418. package/module/Validate/number/prime.js.map +1 -1
  419. package/module/Validate/object/core.d.ts +11 -0
  420. package/module/Validate/object/core.js +11 -0
  421. package/module/Validate/object/core.js.map +1 -1
  422. package/module/Validate/string/core.d.ts +11 -0
  423. package/module/Validate/string/core.js +11 -0
  424. package/module/Validate/string/core.js.map +1 -1
  425. package/module/Validate/string/email.d.ts +9 -0
  426. package/module/Validate/string/email.js +10 -1
  427. package/module/Validate/string/email.js.map +1 -1
  428. package/module/Validate/string/length.d.ts +11 -0
  429. package/module/Validate/string/length.js +11 -0
  430. package/module/Validate/string/length.js.map +1 -1
  431. package/module/Validate/string/maxLength.d.ts +10 -0
  432. package/module/Validate/string/maxLength.js +10 -0
  433. package/module/Validate/string/maxLength.js.map +1 -1
  434. package/module/Validate/string/minLength.d.ts +10 -0
  435. package/module/Validate/string/minLength.js +10 -0
  436. package/module/Validate/string/minLength.js.map +1 -1
  437. package/module/Validate/string/numberString.d.ts +9 -0
  438. package/module/Validate/string/numberString.js +9 -0
  439. package/module/Validate/string/numberString.js.map +1 -1
  440. package/module/Validate/string/regexMatch.d.ts +10 -0
  441. package/module/Validate/string/regexMatch.js +10 -0
  442. package/module/Validate/string/regexMatch.js.map +1 -1
  443. package/module/Validate/string/uuid.d.ts +8 -3
  444. package/module/Validate/string/uuid.js +9 -4
  445. package/module/Validate/string/uuid.js.map +1 -1
  446. package/module/Validate/type.d.ts +22 -0
  447. package/module/es5/Advance/rangeAdvance.d.ts +10 -6
  448. package/module/es5/Advance/rangeAdvance.js +10 -6
  449. package/module/es5/Array/arraysJoin.d.ts +4 -4
  450. package/module/es5/Array/arraysJoin.js +4 -4
  451. package/module/es5/Array/binarySearch.d.ts +4 -3
  452. package/module/es5/Array/binarySearch.js +4 -3
  453. package/module/es5/Array/checkFlagAlignment.d.ts +3 -3
  454. package/module/es5/Array/checkFlagAlignment.js +7 -7
  455. package/module/es5/Array/chunk.d.ts +4 -4
  456. package/module/es5/Array/chunk.js +4 -4
  457. package/module/es5/Array/compact.d.ts +8 -0
  458. package/module/es5/Array/compact.js +8 -0
  459. package/module/es5/Array/compareFunctionDefault.d.ts +13 -0
  460. package/module/es5/Array/compareFunctionDefault.js +13 -0
  461. package/module/es5/Array/drop.d.ts +5 -5
  462. package/module/es5/Array/drop.js +5 -5
  463. package/module/es5/Array/dualPivotQuickSort.d.ts +16 -0
  464. package/module/es5/Array/dualPivotQuickSort.js +201 -0
  465. package/module/es5/Array/first.d.ts +3 -3
  466. package/module/es5/Array/first.js +3 -3
  467. package/module/es5/Array/generateNumberArray.d.ts +6 -6
  468. package/module/es5/Array/generateNumberArray.js +6 -6
  469. package/module/es5/Array/getArraysCommon.d.ts +4 -4
  470. package/module/es5/Array/getArraysCommon.js +4 -4
  471. package/module/es5/Array/getArraysDiff.d.ts +4 -4
  472. package/module/es5/Array/getArraysDiff.js +4 -4
  473. package/module/es5/Array/groupBy.d.ts +8 -4
  474. package/module/es5/Array/groupBy.js +8 -4
  475. package/module/es5/Array/index.d.ts +1 -0
  476. package/module/es5/Array/index.js +11 -0
  477. package/module/es5/Array/insertionSort.d.ts +8 -7
  478. package/module/es5/Array/insertionSort.js +6 -6
  479. package/module/es5/Array/mergeSort.d.ts +6 -5
  480. package/module/es5/Array/mergeSort.js +9 -9
  481. package/module/es5/Array/quickSort.d.ts +12 -11
  482. package/module/es5/Array/quickSort.js +47 -10
  483. package/module/es5/Array/randomSelect.d.ts +5 -5
  484. package/module/es5/Array/randomSelect.js +5 -5
  485. package/module/es5/Array/range.d.ts +5 -5
  486. package/module/es5/Array/range.js +28 -10
  487. package/module/es5/Array/shuffle.d.ts +3 -3
  488. package/module/es5/Array/shuffle.js +3 -3
  489. package/module/es5/Array/shuffle2DArray.d.ts +4 -4
  490. package/module/es5/Array/shuffle2DArray.js +6 -6
  491. package/module/es5/Array/sum.d.ts +3 -3
  492. package/module/es5/Array/sum.js +4 -4
  493. package/module/es5/Array/timSort.d.ts +13 -11
  494. package/module/es5/Array/timSort.js +36 -9
  495. package/module/es5/Array/zip.d.ts +6 -3
  496. package/module/es5/Array/zip.js +6 -3
  497. package/module/es5/Array/zipLongest.d.ts +8 -5
  498. package/module/es5/Array/zipLongest.js +8 -5
  499. package/module/es5/Color/cmykToRgba.d.ts +7 -7
  500. package/module/es5/Color/cmykToRgba.js +12 -12
  501. package/module/es5/Color/hexaToRgba.d.ts +4 -3
  502. package/module/es5/Color/hexaToRgba.js +18 -6
  503. package/module/es5/Color/hslaToRgba.d.ts +7 -6
  504. package/module/es5/Color/hslaToRgba.js +19 -13
  505. package/module/es5/Color/rgbaToCmyk.d.ts +3 -3
  506. package/module/es5/Color/rgbaToCmyk.js +7 -3
  507. package/module/es5/Color/rgbaToHexA.d.ts +4 -4
  508. package/module/es5/Color/rgbaToHexA.js +5 -5
  509. package/module/es5/Color/rgbaToHsla.d.ts +4 -3
  510. package/module/es5/Color/rgbaToHsla.js +8 -3
  511. package/module/es5/Consts/clock.d.ts +11 -11
  512. package/module/es5/Consts/clock.js +11 -11
  513. package/module/es5/Consts/httpStatus/httpClientErrorStatus.d.ts +28 -0
  514. package/module/es5/Consts/httpStatus/httpClientErrorStatus.js +28 -0
  515. package/module/es5/Consts/httpStatus/httpInformationalStatus.d.ts +9 -0
  516. package/module/es5/Consts/httpStatus/httpInformationalStatus.js +9 -0
  517. package/module/es5/Consts/httpStatus/httpRedirectionStatus.d.ts +11 -0
  518. package/module/es5/Consts/httpStatus/httpRedirectionStatus.js +11 -0
  519. package/module/es5/Consts/httpStatus/httpServerErrorStatus.d.ts +10 -0
  520. package/module/es5/Consts/httpStatus/httpServerErrorStatus.js +10 -0
  521. package/module/es5/Consts/httpStatus/httpSuccessStatus.d.ts +11 -0
  522. package/module/es5/Consts/httpStatus/httpSuccessStatus.js +11 -0
  523. package/module/es5/Date/birthday.d.ts +7 -6
  524. package/module/es5/Date/birthday.js +7 -6
  525. package/module/es5/Date/dateRange.d.ts +7 -4
  526. package/module/es5/Date/dateRange.js +7 -4
  527. package/module/es5/Date/dayOfWeek.d.ts +4 -4
  528. package/module/es5/Date/dayOfWeek.js +4 -4
  529. package/module/es5/Date/format.d.ts +30 -4
  530. package/module/es5/Date/format.js +30 -4
  531. package/module/es5/Date/getDay.d.ts +8 -5
  532. package/module/es5/Date/getDay.js +8 -5
  533. package/module/es5/Date/getTimezoneOffsetString.d.ts +3 -3
  534. package/module/es5/Date/getTimezoneOffsetString.js +3 -3
  535. package/module/es5/Date/isLeapYear.d.ts +8 -3
  536. package/module/es5/Date/isLeapYear.js +8 -3
  537. package/module/es5/Date/new.d.ts +20 -20
  538. package/module/es5/Date/new.js +21 -21
  539. package/module/es5/Date/now.d.ts +7 -4
  540. package/module/es5/Date/now.js +7 -4
  541. package/module/es5/Error/safeExecute.d.ts +21 -0
  542. package/module/es5/Error/safeExecute.js +36 -0
  543. package/module/es5/IP/cidrToLong.d.ts +4 -3
  544. package/module/es5/IP/cidrToLong.js +7 -3
  545. package/module/es5/IP/cidrToSubnetMask.d.ts +4 -3
  546. package/module/es5/IP/cidrToSubnetMask.js +4 -3
  547. package/module/es5/IP/getIpClass.d.ts +3 -3
  548. package/module/es5/IP/getIpClass.js +44 -18
  549. package/module/es5/IP/getNetworkAddress.d.ts +5 -4
  550. package/module/es5/IP/getNetworkAddress.js +35 -6
  551. package/module/es5/IP/ipToBinaryString.d.ts +4 -3
  552. package/module/es5/IP/ipToBinaryString.js +44 -5
  553. package/module/es5/IP/ipToLong.d.ts +4 -3
  554. package/module/es5/IP/ipToLong.js +4 -3
  555. package/module/es5/IP/isInRange.d.ts +6 -5
  556. package/module/es5/IP/isInRange.js +34 -7
  557. package/module/es5/IP/isPrivateIp.d.ts +4 -3
  558. package/module/es5/IP/isPrivateIp.js +30 -17
  559. package/module/es5/IP/longToIp.d.ts +4 -3
  560. package/module/es5/IP/longToIp.js +17 -5
  561. package/module/es5/IP/subnetMaskToCidr.d.ts +4 -3
  562. package/module/es5/IP/subnetMaskToCidr.js +33 -12
  563. package/module/es5/Math/addition.d.ts +3 -3
  564. package/module/es5/Math/addition.js +3 -3
  565. package/module/es5/Math/average.d.ts +7 -4
  566. package/module/es5/Math/average.js +7 -4
  567. package/module/es5/Math/bitwise.d.ts +5 -5
  568. package/module/es5/Math/bitwise.js +5 -5
  569. package/module/es5/Math/calculator/calculator.d.ts +9 -7
  570. package/module/es5/Math/calculator/calculator.js +9 -7
  571. package/module/es5/Math/calculator/calculatorInitialization.d.ts +4 -3
  572. package/module/es5/Math/calculator/calculatorInitialization.js +6 -5
  573. package/module/es5/Math/calculator/convertCurrency.d.ts +6 -4
  574. package/module/es5/Math/calculator/convertCurrency.js +6 -4
  575. package/module/es5/Math/calculator/core.js +13 -13
  576. package/module/es5/Math/calculator/literalExpression.d.ts +5 -3
  577. package/module/es5/Math/calculator/literalExpression.js +12 -10
  578. package/module/es5/Math/degToRad.d.ts +3 -3
  579. package/module/es5/Math/degToRad.js +3 -3
  580. package/module/es5/Math/deviationValue.d.ts +5 -5
  581. package/module/es5/Math/deviationValue.js +5 -5
  582. package/module/es5/Math/division.d.ts +5 -5
  583. package/module/es5/Math/division.js +35 -21
  584. package/module/es5/Math/factorial.d.ts +3 -3
  585. package/module/es5/Math/factorial.js +3 -3
  586. package/module/es5/Math/factorize.d.ts +3 -3
  587. package/module/es5/Math/factorize.js +3 -3
  588. package/module/es5/Math/flexibleNumberConversion.d.ts +11 -11
  589. package/module/es5/Math/flexibleNumberConversion.js +19 -19
  590. package/module/es5/Math/gcd.d.ts +5 -5
  591. package/module/es5/Math/gcd.js +6 -6
  592. package/module/es5/Math/getDecimalLength.d.ts +7 -4
  593. package/module/es5/Math/getDecimalLength.js +9 -5
  594. package/module/es5/Math/lcm.d.ts +4 -4
  595. package/module/es5/Math/lcm.js +5 -5
  596. package/module/es5/Math/linearCongruentialGenerator.d.ts +6 -6
  597. package/module/es5/Math/linearCongruentialGenerator.js +6 -6
  598. package/module/es5/Math/mathConverter.d.ts +7 -3
  599. package/module/es5/Math/mathConverter.js +7 -3
  600. package/module/es5/Math/mathSeparator.d.ts +8 -3
  601. package/module/es5/Math/mathSeparator.js +8 -3
  602. package/module/es5/Math/max.d.ts +4 -3
  603. package/module/es5/Math/max.js +4 -3
  604. package/module/es5/Math/median.d.ts +3 -3
  605. package/module/es5/Math/median.js +3 -3
  606. package/module/es5/Math/min.d.ts +4 -3
  607. package/module/es5/Math/min.js +4 -3
  608. package/module/es5/Math/multiples.d.ts +4 -4
  609. package/module/es5/Math/multiples.js +4 -4
  610. package/module/es5/Math/multiplication.d.ts +3 -3
  611. package/module/es5/Math/multiplication.js +3 -3
  612. package/module/es5/Math/nCr.d.ts +7 -4
  613. package/module/es5/Math/nCr.js +7 -4
  614. package/module/es5/Math/nHr.d.ts +7 -4
  615. package/module/es5/Math/nHr.js +7 -4
  616. package/module/es5/Math/nPr.d.ts +7 -4
  617. package/module/es5/Math/nPr.js +7 -4
  618. package/module/es5/Math/primeFactorization.d.ts +6 -3
  619. package/module/es5/Math/primeFactorization.js +11 -8
  620. package/module/es5/Math/quotient.d.ts +7 -4
  621. package/module/es5/Math/quotient.js +7 -4
  622. package/module/es5/Math/radToDeg.d.ts +5 -3
  623. package/module/es5/Math/radToDeg.js +5 -3
  624. package/module/es5/Math/random.d.ts +6 -5
  625. package/module/es5/Math/random.js +6 -5
  626. package/module/es5/Math/reduce.d.ts +9 -4
  627. package/module/es5/Math/reduce.js +14 -8
  628. package/module/es5/Math/repeatedTrial.d.ts +5 -5
  629. package/module/es5/Math/repeatedTrial.js +5 -5
  630. package/module/es5/Math/roundOf.d.ts +7 -5
  631. package/module/es5/Math/roundOf.js +8 -6
  632. package/module/es5/Math/solveEquation.d.ts +12 -13
  633. package/module/es5/Math/solveEquation.js +34 -38
  634. package/module/es5/Math/standardDeviation.d.ts +8 -3
  635. package/module/es5/Math/standardDeviation.js +16 -7
  636. package/module/es5/Math/subtract.d.ts +10 -4
  637. package/module/es5/Math/subtract.js +12 -6
  638. package/module/es5/Math/toBaseN.d.ts +8 -6
  639. package/module/es5/Math/toBaseN.js +9 -7
  640. package/module/es5/Math/toCelsius.d.ts +5 -3
  641. package/module/es5/Math/toCelsius.js +5 -3
  642. package/module/es5/Math/toKelvin.d.ts +5 -3
  643. package/module/es5/Math/toKelvin.js +5 -3
  644. package/module/es5/Math/uuidv7.d.ts +10 -2
  645. package/module/es5/Math/uuidv7.js +10 -2
  646. package/module/es5/Math/valueSwap.d.ts +5 -4
  647. package/module/es5/Math/valueSwap.js +5 -4
  648. package/module/es5/Math/xoshiro256.d.ts +8 -3
  649. package/module/es5/Math/xoshiro256.js +8 -3
  650. package/module/es5/Object/has.d.ts +4 -4
  651. package/module/es5/Object/has.js +4 -4
  652. package/module/es5/Object/keyBy.d.ts +3 -3
  653. package/module/es5/Object/keyBy.js +4 -4
  654. package/module/es5/Object/pick.d.ts +6 -6
  655. package/module/es5/Object/pick.js +6 -6
  656. package/module/es5/Object/pickDeep.d.ts +7 -7
  657. package/module/es5/Object/pickDeep.js +7 -7
  658. package/module/es5/Simple/Array/quickSortSimple.d.ts +9 -7
  659. package/module/es5/Simple/Array/quickSortSimple.js +7 -6
  660. package/module/es5/Simple/Date/birthdaySimple.d.ts +4 -4
  661. package/module/es5/Simple/Date/birthdaySimple.js +4 -4
  662. package/module/es5/Simple/Date/dayOfWeekSimple.d.ts +4 -4
  663. package/module/es5/Simple/Date/dayOfWeekSimple.js +4 -4
  664. package/module/es5/Simple/Date/nowSimple.d.ts +3 -3
  665. package/module/es5/Simple/Date/nowSimple.js +3 -3
  666. package/module/es5/Simple/Math/deviationValueSimple.d.ts +10 -11
  667. package/module/es5/Simple/Math/deviationValueSimple.js +23 -12
  668. package/module/es5/String/deleteSpaces.d.ts +8 -4
  669. package/module/es5/String/deleteSpaces.js +8 -4
  670. package/module/es5/String/formatString.d.ts +8 -8
  671. package/module/es5/String/formatString.js +7 -7
  672. package/module/es5/String/fromBase64.d.ts +4 -3
  673. package/module/es5/String/fromBase64.js +14 -9
  674. package/module/es5/String/hasNoLetters.d.ts +9 -3
  675. package/module/es5/String/hasNoLetters.js +12 -6
  676. package/module/es5/String/padEnd.d.ts +5 -5
  677. package/module/es5/String/padEnd.js +5 -5
  678. package/module/es5/String/padStart.d.ts +11 -5
  679. package/module/es5/String/padStart.js +20 -5
  680. package/module/es5/String/randomString.d.ts +4 -4
  681. package/module/es5/String/randomString.js +4 -4
  682. package/module/es5/String/randomStringInitialization.d.ts +3 -3
  683. package/module/es5/String/randomStringInitialization.js +3 -3
  684. package/module/es5/String/reverseString.d.ts +3 -3
  685. package/module/es5/String/reverseString.js +3 -3
  686. package/module/es5/String/toBase64.d.ts +3 -3
  687. package/module/es5/String/toBase64.js +3 -3
  688. package/module/es5/String/toHalfWidth.d.ts +3 -3
  689. package/module/es5/String/toHalfWidth.js +3 -3
  690. package/module/es5/String/trimCharacters.d.ts +4 -4
  691. package/module/es5/String/trimCharacters.js +4 -4
  692. package/module/es5/String/trimEndCharacters.d.ts +10 -4
  693. package/module/es5/String/trimEndCharacters.js +10 -4
  694. package/module/es5/String/trimStartCharacters.d.ts +10 -4
  695. package/module/es5/String/trimStartCharacters.js +10 -4
  696. package/module/es5/Time/convertTime.d.ts +6 -6
  697. package/module/es5/Time/convertTime.js +12 -11
  698. package/module/es5/Tool/createPipeline.d.ts +8 -6
  699. package/module/es5/Tool/createPipeline.js +10 -8
  700. package/module/es5/Tool/parseJson.d.ts +7 -0
  701. package/module/es5/Tool/parseJson.js +7 -0
  702. package/module/es5/UA/extractBrowserFromUserAgent.d.ts +12 -0
  703. package/module/es5/UA/extractBrowserFromUserAgent.js +22 -5
  704. package/module/es5/UA/extractDeviceFromUserAgent.d.ts +12 -0
  705. package/module/es5/UA/extractDeviceFromUserAgent.js +12 -0
  706. package/module/es5/UA/extractOsFromUserAgent.d.ts +12 -0
  707. package/module/es5/UA/extractOsFromUserAgent.js +12 -0
  708. package/module/es5/UA/parseUserAgent.d.ts +16 -0
  709. package/module/es5/UA/parseUserAgent.js +16 -0
  710. package/module/es5/Unit/index.d.ts +1 -0
  711. package/module/es5/Unit/index.js +16 -0
  712. package/module/es5/Unit/unitConverterInitialization.d.ts +16 -0
  713. package/module/es5/Unit/unitConverterInitialization.js +28 -0
  714. package/module/es5/Validate/array/core.d.ts +12 -0
  715. package/module/es5/Validate/array/core.js +15 -4
  716. package/module/es5/Validate/boolean/core.d.ts +9 -0
  717. package/module/es5/Validate/boolean/core.js +10 -0
  718. package/module/es5/Validate/core/index.d.ts +10 -0
  719. package/module/es5/Validate/core/index.js +13 -1
  720. package/module/es5/Validate/isArray.d.ts +3 -3
  721. package/module/es5/Validate/isArray.js +3 -3
  722. package/module/es5/Validate/isBrowser.d.ts +1 -1
  723. package/module/es5/Validate/isBrowser.js +1 -1
  724. package/module/es5/Validate/isBun.d.ts +1 -1
  725. package/module/es5/Validate/isBun.js +1 -1
  726. package/module/es5/Validate/isDictionaryObject.d.ts +3 -3
  727. package/module/es5/Validate/isDictionaryObject.js +3 -3
  728. package/module/es5/Validate/isDouble.d.ts +4 -4
  729. package/module/es5/Validate/isDouble.js +4 -4
  730. package/module/es5/Validate/isNode.d.ts +1 -1
  731. package/module/es5/Validate/isNode.js +1 -1
  732. package/module/es5/Validate/isNodeWebkit.d.ts +1 -1
  733. package/module/es5/Validate/isNodeWebkit.js +1 -1
  734. package/module/es5/Validate/isNotEmpty.d.ts +3 -3
  735. package/module/es5/Validate/isNotEmpty.js +4 -4
  736. package/module/es5/Validate/isNumber.d.ts +4 -4
  737. package/module/es5/Validate/isNumber.js +11 -4
  738. package/module/es5/Validate/isPerfectSquare.d.ts +8 -3
  739. package/module/es5/Validate/isPerfectSquare.js +8 -3
  740. package/module/es5/Validate/isPrimeNumber.d.ts +7 -3
  741. package/module/es5/Validate/isPrimeNumber.js +8 -4
  742. package/module/es5/Validate/isValueNaN.d.ts +7 -5
  743. package/module/es5/Validate/isValueNaN.js +7 -5
  744. package/module/es5/Validate/number/core.d.ts +11 -0
  745. package/module/es5/Validate/number/core.js +12 -0
  746. package/module/es5/Validate/number/double.d.ts +9 -0
  747. package/module/es5/Validate/number/double.js +10 -0
  748. package/module/es5/Validate/number/even.d.ts +9 -0
  749. package/module/es5/Validate/number/even.js +10 -0
  750. package/module/es5/Validate/number/maxValue.d.ts +10 -0
  751. package/module/es5/Validate/number/maxValue.js +11 -0
  752. package/module/es5/Validate/number/minValue.d.ts +10 -0
  753. package/module/es5/Validate/number/minValue.js +11 -0
  754. package/module/es5/Validate/number/prime.d.ts +9 -0
  755. package/module/es5/Validate/number/prime.js +10 -0
  756. package/module/es5/Validate/object/core.d.ts +11 -0
  757. package/module/es5/Validate/object/core.js +12 -0
  758. package/module/es5/Validate/string/core.d.ts +11 -0
  759. package/module/es5/Validate/string/core.js +12 -0
  760. package/module/es5/Validate/string/email.d.ts +9 -0
  761. package/module/es5/Validate/string/email.js +11 -1
  762. package/module/es5/Validate/string/length.d.ts +11 -0
  763. package/module/es5/Validate/string/length.js +12 -0
  764. package/module/es5/Validate/string/maxLength.d.ts +10 -0
  765. package/module/es5/Validate/string/maxLength.js +11 -0
  766. package/module/es5/Validate/string/minLength.d.ts +10 -0
  767. package/module/es5/Validate/string/minLength.js +11 -0
  768. package/module/es5/Validate/string/numberString.d.ts +9 -0
  769. package/module/es5/Validate/string/numberString.js +10 -0
  770. package/module/es5/Validate/string/regexMatch.d.ts +10 -0
  771. package/module/es5/Validate/string/regexMatch.js +11 -0
  772. package/module/es5/Validate/string/uuid.d.ts +8 -3
  773. package/module/es5/Validate/string/uuid.js +10 -4
  774. package/module/es5/Validate/type.d.ts +22 -0
  775. package/module/es5/index.d.ts +1 -0
  776. package/module/es5/index.js +11 -0
  777. package/module/es5/tests/integration/Array/drop-and-first.test.js +20 -0
  778. package/module/es5/tests/integration/Tool/parseJson-and-Validate.test.js +68 -14
  779. package/module/es5/tests/unit/Array/arraysJoin.test.js +15 -3
  780. package/module/es5/tests/unit/Array/checkFlagAlignment.test.js +10 -10
  781. package/module/es5/tests/unit/Array/compact.test.js +17 -17
  782. package/module/es5/tests/unit/Array/compareFunctionDefault.test.d.ts +1 -0
  783. package/module/es5/tests/unit/Array/compareFunctionDefault.test.js +29 -0
  784. package/module/es5/tests/unit/Array/drop.test.js +10 -10
  785. package/module/es5/tests/unit/Array/dualPivotQuickSort.test.d.ts +1 -0
  786. package/module/es5/tests/unit/Array/dualPivotQuickSort.test.js +87 -0
  787. package/module/es5/tests/unit/Array/generateNumberArray.test.js +6 -6
  788. package/module/es5/tests/unit/Array/getArraysCommon.test.js +36 -4
  789. package/module/es5/tests/unit/Array/getArraysDiff.test.js +14 -14
  790. package/module/es5/tests/unit/Array/groupBy.test.js +6 -6
  791. package/module/es5/tests/unit/Array/insertionSort.test.js +8 -8
  792. package/module/es5/tests/unit/Array/mergeSort.test.js +34 -5
  793. package/module/es5/tests/unit/Array/quickSort.test.js +76 -11
  794. package/module/es5/tests/unit/Array/randomSelect.test.js +11 -6
  795. package/module/es5/tests/unit/Array/range.test.js +25 -4
  796. package/module/es5/tests/unit/Array/shuffle.test.js +53 -6
  797. package/module/es5/tests/unit/Array/shuffle2DArray.test.js +51 -8
  798. package/module/es5/tests/unit/Array/sum.test.js +40 -2
  799. package/module/es5/tests/unit/Array/timSort.test.js +89 -9
  800. package/module/es5/tests/unit/Array/zip.test.js +48 -9
  801. package/module/es5/tests/unit/Array/zipLongest.test.js +52 -9
  802. package/module/es5/tests/unit/Color/cmykToRgba.test.js +3 -3
  803. package/module/es5/tests/unit/Color/hexaToRgba.test.js +53 -1
  804. package/module/es5/tests/unit/Color/hslaToRgba.test.js +35 -53
  805. package/module/es5/tests/unit/Color/rgbaToCmyk.test.js +67 -1
  806. package/module/es5/tests/unit/Color/rgbaToHsla.test.js +91 -1
  807. package/module/es5/tests/unit/Consts/clock.test.js +51 -18
  808. package/module/es5/tests/unit/Consts/httpStatus.test.js +9 -0
  809. package/module/es5/tests/unit/Date/birthday.test.d.ts +1 -0
  810. package/module/es5/tests/unit/Date/birthday.test.js +31 -0
  811. package/module/es5/tests/unit/Date/dateRange.test.d.ts +1 -0
  812. package/module/es5/tests/unit/Date/dateRange.test.js +40 -0
  813. package/module/es5/tests/unit/Date/dayOfWeek.test.js +5 -5
  814. package/module/es5/tests/unit/Date/format.test.js +22 -0
  815. package/module/es5/tests/unit/Date/getDay.test.d.ts +1 -0
  816. package/module/es5/tests/unit/Date/getDay.test.js +40 -0
  817. package/module/es5/tests/unit/Date/getTimezoneOffsetString.test.js +3 -3
  818. package/module/es5/tests/unit/Date/isLeapYear.test.d.ts +1 -0
  819. package/module/es5/tests/unit/Date/isLeapYear.test.js +30 -0
  820. package/module/es5/tests/unit/Date/new.test.d.ts +1 -0
  821. package/module/es5/tests/unit/Date/new.test.js +39 -0
  822. package/module/es5/tests/unit/Date/now.test.d.ts +1 -0
  823. package/module/es5/tests/unit/Date/now.test.js +42 -0
  824. package/module/es5/tests/unit/Error/safeExecute.test.js +69 -15
  825. package/module/es5/tests/unit/IP/cidrToLong.test.js +27 -5
  826. package/module/es5/tests/unit/IP/cidrToSubnetMask.test.js +29 -10
  827. package/module/es5/tests/unit/IP/getIpClass.test.js +29 -18
  828. package/module/es5/tests/unit/IP/getNetworkAddress.test.js +35 -14
  829. package/module/es5/tests/unit/IP/ipToBinaryString.test.js +38 -9
  830. package/module/es5/tests/unit/IP/ipToLong.test.js +27 -13
  831. package/module/es5/tests/unit/IP/isInRange.test.js +75 -4
  832. package/module/es5/tests/unit/IP/isPrivateIp.test.js +18 -12
  833. package/module/es5/tests/unit/IP/longToIp.test.d.ts +1 -0
  834. package/module/es5/tests/unit/IP/longToIp.test.js +39 -0
  835. package/module/es5/tests/unit/IP/subnetMaskToCidr.test.js +34 -20
  836. package/module/es5/tests/unit/Math/average.test.js +40 -18
  837. package/module/es5/tests/unit/Math/bitwise.test.js +14 -14
  838. package/module/es5/tests/unit/Math/calculator/calculator.test.js +9 -9
  839. package/module/es5/tests/unit/Math/calculator/calculatorInitialization.test.js +16 -5
  840. package/module/es5/tests/unit/Math/calculator/convertCurrency.test.js +12 -12
  841. package/module/es5/tests/unit/Math/calculator/literalExpression.test.js +8 -8
  842. package/module/es5/tests/unit/Math/degToRad.test.js +10 -10
  843. package/module/es5/tests/unit/Math/deviationValue.test.js +12 -12
  844. package/module/es5/tests/unit/Math/division.test.js +72 -25
  845. package/module/es5/tests/unit/Math/factorial.test.js +4 -4
  846. package/module/es5/tests/unit/Math/factorize.test.js +34 -9
  847. package/module/es5/tests/unit/Math/flexibleNumberConversion.test.js +75 -75
  848. package/module/es5/tests/unit/Math/gcd.test.js +5 -5
  849. package/module/es5/tests/unit/Math/getDecimalLength.test.js +40 -4
  850. package/module/es5/tests/unit/Math/lcm.test.js +16 -9
  851. package/module/es5/tests/unit/Math/linearCongruentialGenerator.test.js +4 -4
  852. package/module/es5/tests/unit/Math/mathConverter.test.js +13 -13
  853. package/module/es5/tests/unit/Math/mathSeparator.test.js +23 -5
  854. package/module/es5/tests/unit/Math/max.test.js +18 -3
  855. package/module/es5/tests/unit/Math/median.test.js +4 -4
  856. package/module/es5/tests/unit/Math/min.test.js +18 -3
  857. package/module/es5/tests/unit/Math/multiples.test.js +26 -10
  858. package/module/es5/tests/unit/Math/multiplication.test.js +43 -9
  859. package/module/es5/tests/unit/Math/nCr.test.js +27 -14
  860. package/module/es5/tests/unit/Math/nHr.test.js +28 -15
  861. package/module/es5/tests/unit/Math/nPr.test.js +31 -14
  862. package/module/es5/tests/unit/Math/primeFactorization.test.js +79 -8
  863. package/module/es5/tests/unit/Math/quotient.test.js +32 -10
  864. package/module/es5/tests/unit/Math/radToDeg.test.js +39 -38
  865. package/module/es5/tests/unit/Math/random.test.js +55 -17
  866. package/module/es5/tests/unit/Math/reduce.test.js +87 -8
  867. package/module/es5/tests/unit/Math/repeatedTrial.test.js +35 -5
  868. package/module/es5/tests/unit/Math/roundOf.test.js +36 -11
  869. package/module/es5/tests/unit/Math/solveEquation.test.js +20 -20
  870. package/module/es5/tests/unit/Math/standardDeviation.test.js +19 -2
  871. package/module/es5/tests/unit/Math/subtract.test.js +14 -2
  872. package/module/es5/tests/unit/Math/toBaseN.test.js +36 -19
  873. package/module/es5/tests/unit/Math/toCelsius.test.js +14 -2
  874. package/module/es5/tests/unit/Math/toKelvin.test.js +14 -2
  875. package/module/es5/tests/unit/Math/uuidv7.test.js +6 -6
  876. package/module/es5/tests/unit/Math/valueSwap.test.js +24 -6
  877. package/module/es5/tests/unit/Math/xoshiro256.test.js +22 -11
  878. package/module/es5/tests/unit/Object/keyBy.test.js +6 -6
  879. package/module/es5/tests/unit/Object/pick.test.js +11 -11
  880. package/module/es5/tests/unit/Object/pickDeep.test.js +15 -15
  881. package/module/es5/tests/unit/Simple/Array/quickSortSimple.test.js +4 -4
  882. package/module/es5/tests/unit/Simple/Math/deviationValueSimple.test.js +39 -3
  883. package/module/es5/tests/unit/String/deleteSpaces.test.d.ts +1 -0
  884. package/module/es5/tests/unit/String/deleteSpaces.test.js +22 -0
  885. package/module/es5/tests/unit/String/formatString.test.js +41 -14
  886. package/module/es5/tests/unit/String/fromBase64.test.js +19 -8
  887. package/module/es5/tests/unit/String/hasNoLetters.test.js +20 -24
  888. package/module/es5/tests/unit/String/padEnd.test.js +5 -5
  889. package/module/es5/tests/unit/String/padStart.test.js +32 -19
  890. package/module/es5/tests/unit/String/randomString.test.js +3 -3
  891. package/module/es5/tests/unit/String/randomStringInitialization.test.js +2 -2
  892. package/module/es5/tests/unit/String/reverseString.test.js +10 -12
  893. package/module/es5/tests/unit/String/toBase64.test.js +5 -5
  894. package/module/es5/tests/unit/String/toHalfWidth.test.js +3 -3
  895. package/module/es5/tests/unit/String/trimCharacters.test.js +4 -4
  896. package/module/es5/tests/unit/String/trimEndCharacters.test.js +17 -7
  897. package/module/es5/tests/unit/String/trimStartCharacters.test.js +23 -10
  898. package/module/es5/tests/unit/Time/convertTime.test.js +40 -46
  899. package/module/es5/tests/unit/Tool/createPipeline.test.js +15 -15
  900. package/module/es5/tests/unit/UA/extractBrowserFromUserAgent.test.d.ts +1 -0
  901. package/module/es5/tests/unit/UA/extractBrowserFromUserAgent.test.js +47 -0
  902. package/module/es5/tests/unit/UA/extractDeviceFromUserAgent.test.d.ts +1 -0
  903. package/module/es5/tests/unit/UA/extractDeviceFromUserAgent.test.js +55 -0
  904. package/module/es5/tests/unit/UA/extractOsFromUserAgent.test.d.ts +1 -0
  905. package/module/es5/tests/unit/UA/extractOsFromUserAgent.test.js +57 -0
  906. package/module/es5/tests/unit/Unit/unitConverterInitialization.test.d.ts +1 -0
  907. package/module/es5/tests/unit/Unit/unitConverterInitialization.test.js +40 -0
  908. package/module/es5/tests/unit/Validate/array/core.test.js +39 -10
  909. package/module/es5/tests/unit/Validate/core/core.test.d.ts +1 -0
  910. package/module/es5/tests/unit/Validate/core/core.test.js +87 -0
  911. package/module/es5/tests/unit/Validate/isArray.test.js +11 -0
  912. package/module/es5/tests/unit/Validate/isDictionaryObject.test.js +15 -1
  913. package/module/es5/tests/unit/Validate/isDouble.test.js +21 -4
  914. package/module/es5/tests/unit/Validate/isNotEmpty.test.js +3 -3
  915. package/module/es5/tests/unit/Validate/isNumber.test.js +67 -29
  916. package/module/es5/tests/unit/Validate/isPerfectSquare.test.js +5 -0
  917. package/module/es5/tests/unit/Validate/isPrimeNumber.test.js +14 -4
  918. package/module/es5/tests/unit/Validate/isValueNaN.test.js +50 -11
  919. package/module/es5/tests/unit/Validate/string/uuid.test.js +13 -13
  920. package/module/es5/tsconfig.tsbuildinfo +1 -1
  921. package/module/es5/types/array/compareFunction.d.ts +2 -0
  922. package/module/es5/types/array/compareFunction.js +5 -0
  923. package/module/es5/types/time/timeUnit.d.ts +1 -1
  924. package/module/index.d.ts +1 -0
  925. package/module/index.js +1 -0
  926. package/module/index.js.map +1 -1
  927. package/module/types/array/compareFunction.d.ts +2 -0
  928. package/module/types/array/compareFunction.js +2 -0
  929. package/module/types/array/compareFunction.js.map +1 -0
  930. package/module/types/time/timeUnit.d.ts +1 -1
  931. package/package.json +14 -14
@@ -3,8 +3,8 @@
3
3
  var _drop = require("@/Array/drop");
4
4
  var _lodash = _interopRequireDefault(require("lodash"));
5
5
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
6
- describe("drop関数のテスト", function () {
7
- it("配列の先頭からn個の要素を除外する", function () {
6
+ describe("drop function", function () {
7
+ it("should exclude n elements from the start of the array", function () {
8
8
  // umt
9
9
  expect((0, _drop.drop)([1, 2, 3, 4, 5], 2)).toEqual([3, 4, 5]);
10
10
  expect((0, _drop.drop)([1, 2, 3, 4, 5])).toEqual([2, 3, 4, 5]);
@@ -13,26 +13,26 @@ describe("drop関数のテスト", function () {
13
13
  expect(_lodash["default"].drop([1, 2, 3, 4, 5], 2)).toEqual([3, 4, 5]);
14
14
  expect(_lodash["default"].drop([1, 2, 3, 4, 5])).toEqual([2, 3, 4, 5]);
15
15
  });
16
- it("direction'left'の場合、配列の先頭からn個の要素を除外する", function () {
16
+ it("should exclude n elements from the start when direction is 'left'", function () {
17
17
  // umt
18
18
  expect((0, _drop.drop)([1, 2, 3, 4, 5], 2, "left")).toEqual([3, 4, 5]);
19
19
 
20
20
  // lodash
21
21
  expect(_lodash["default"].drop([1, 2, 3, 4, 5], 2)).toEqual([3, 4, 5]);
22
22
  });
23
- it("direction'right'の場合、配列の末尾からn個の要素を除外する", function () {
23
+ it("should exclude n elements from the end when direction is 'right'", function () {
24
24
  // umt
25
25
  expect((0, _drop.drop)([1, 2, 3, 4, 5], 2, "right")).toEqual([1, 2, 3]);
26
26
 
27
27
  // lodash
28
28
  expect(_lodash["default"].dropRight([1, 2, 3, 4, 5], 2)).toEqual([1, 2, 3]);
29
29
  });
30
- it("direction'between'の場合、配列の中央からn個の要素を除外する", function () {
30
+ it("should exclude n elements from the middle when direction is 'between'", function () {
31
31
  // umt
32
32
  expect((0, _drop.drop)([1, 2, 3, 4, 5], 1, "between")).toEqual([1, 2, 4, 5]);
33
33
  expect((0, _drop.drop)([1, 2, 3, 4, 5, 6], 2, "between")).toEqual([1, 2, 5, 6]);
34
34
  });
35
- it("nが配列の長さ以上の場合、空の配列を返す", function () {
35
+ it("should return an empty array when n is greater than or equal to array length", function () {
36
36
  // umt
37
37
  expect((0, _drop.drop)([1, 2, 3], 4)).toEqual([]);
38
38
  expect((0, _drop.drop)([1, 2, 3], 3)).toEqual([]);
@@ -41,7 +41,7 @@ describe("drop関数のテスト", function () {
41
41
  expect(_lodash["default"].drop([1, 2, 3], 4)).toEqual([]);
42
42
  expect(_lodash["default"].drop([1, 2, 3], 3)).toEqual([]);
43
43
  });
44
- it("n0の場合、元の配列をそのまま返す", function () {
44
+ it("should return the original array when n is 0", function () {
45
45
  // umt
46
46
  expect((0, _drop.drop)([1, 2, 3], 0)).toEqual([1, 2, 3]);
47
47
  expect((0, _drop.drop)([1, 2, 3], 0, "left")).toEqual([1, 2, 3]);
@@ -53,7 +53,7 @@ describe("drop関数のテスト", function () {
53
53
  expect(_lodash["default"].drop([1, 2, 3], 0)).toEqual([1, 2, 3]);
54
54
  expect(_lodash["default"].dropRight([1, 2, 3], 0)).toEqual([1, 2, 3]);
55
55
  });
56
- it("nが負の値の場合、元の配列をそのまま返す", function () {
56
+ it("should return the original array when n is negative", function () {
57
57
  // umt
58
58
  expect((0, _drop.drop)([1, 2, 3], -1)).toEqual([1, 2, 3]);
59
59
  expect((0, _drop.drop)([1, 2, 3], -2, "left")).toEqual([1, 2, 3]);
@@ -65,7 +65,7 @@ describe("drop関数のテスト", function () {
65
65
  expect(_lodash["default"].drop([1, 2, 3], -2)).toEqual([1, 2, 3]);
66
66
  expect(_lodash["default"].dropRight([1, 2, 3], -3)).toEqual([1, 2, 3]);
67
67
  });
68
- it("空の配列が渡された場合、空の配列を返す", function () {
68
+ it("should return an empty array when an empty array is passed", function () {
69
69
  // umt
70
70
  expect((0, _drop.drop)([], 1)).toEqual([]);
71
71
  expect((0, _drop.drop)([], 2, "left")).toEqual([]);
@@ -77,7 +77,7 @@ describe("drop関数のテスト", function () {
77
77
  expect(_lodash["default"].drop([], 2)).toEqual([]);
78
78
  expect(_lodash["default"].dropRight([], 3)).toEqual([]);
79
79
  });
80
- it("directionに無効な値が渡された場合、leftとして扱う", function () {
80
+ it("should treat as 'left' when an invalid direction is passed", function () {
81
81
  // @ts-ignore
82
82
  expect((0, _drop.drop)([1, 2, 3], 1, "invalid")).toEqual([2, 3]);
83
83
  });
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ var _dualPivotQuickSort = require("../../../Array/dualPivotQuickSort");
4
+ describe("dualPivotQuickSort", function () {
5
+ test("should sort an array of numbers in ascending order", function () {
6
+ var array = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3];
7
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array))).toEqual([1, 1, 2, 3, 3, 4, 5, 5, 6, 9]);
8
+ });
9
+ test("should sort an array of strings lexicographically", function () {
10
+ var array = ["banana", "apple", "orange", "grape"];
11
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array))).toEqual(["apple", "banana", "grape", "orange"]);
12
+ });
13
+ test("should sort in descending order when custom comparison function is provided", function () {
14
+ var array = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3];
15
+ var compareFunction = function compareFunction(a, b) {
16
+ return b - a;
17
+ };
18
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array), compareFunction)).toEqual([9, 6, 5, 5, 4, 3, 3, 2, 1, 1]);
19
+ });
20
+ test("should handle empty array", function () {
21
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([])).toEqual([]);
22
+ });
23
+ test("should handle array with single element", function () {
24
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([1])).toEqual([1]);
25
+ });
26
+ test("should handle array with all identical elements", function () {
27
+ var array = [2, 2, 2, 2, 2];
28
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array))).toEqual([2, 2, 2, 2, 2]);
29
+ });
30
+ test("should handle already sorted array", function () {
31
+ var array = [1, 2, 3, 4, 5];
32
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array))).toEqual([1, 2, 3, 4, 5]);
33
+ });
34
+ test("should handle reverse sorted array", function () {
35
+ var array = [5, 4, 3, 2, 1];
36
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array))).toEqual([1, 2, 3, 4, 5]);
37
+ });
38
+ test("should handle array with negative numbers", function () {
39
+ var array = [-3, 1, -4, 1, 5, -9, 2, 6, 5, 3];
40
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array))).toEqual([-9, -4, -3, 1, 1, 2, 3, 5, 5, 6]);
41
+ });
42
+ test("should sort only specified range of array", function () {
43
+ var array = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3];
44
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array), undefined, 2, 6)).toEqual([3, 1, 1, 2, 4, 5, 9, 6, 5, 3]);
45
+ });
46
+ test("should handle large arrays efficiently", function () {
47
+ var size = 1000;
48
+ var array = Array.from({
49
+ length: size
50
+ }, function () {
51
+ return Math.floor(Math.random() * size);
52
+ });
53
+ var sorted = (0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array));
54
+ for (var i = 1; i < sorted.length; i++) {
55
+ expect(sorted[i]).toBeGreaterThanOrEqual(sorted[i - 1]);
56
+ }
57
+ });
58
+ test("should use insertion sort for small arrays when threshold is adjusted", function () {
59
+ var array = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3];
60
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array), undefined, 0, array.length - 1, 5)).toEqual([1, 1, 2, 3, 3, 4, 5, 5, 6, 9]);
61
+ });
62
+ test("should sort array of objects using custom comparison", function () {
63
+ var array = [{
64
+ id: 3,
65
+ value: "c"
66
+ }, {
67
+ id: 1,
68
+ value: "a"
69
+ }, {
70
+ id: 2,
71
+ value: "b"
72
+ }];
73
+ var compareFunction = function compareFunction(a, b) {
74
+ return a.id - b.id;
75
+ };
76
+ expect((0, _dualPivotQuickSort.dualPivotQuickSort)([].concat(array), compareFunction)).toEqual([{
77
+ id: 1,
78
+ value: "a"
79
+ }, {
80
+ id: 2,
81
+ value: "b"
82
+ }, {
83
+ id: 3,
84
+ value: "c"
85
+ }]);
86
+ });
87
+ });
@@ -2,28 +2,28 @@
2
2
 
3
3
  var _generateNumberArray = require("@/Array/generateNumberArray");
4
4
  describe("generateNumberArray", function () {
5
- it("指定された長さの配列を生成する", function () {
5
+ it("should generate an array with the specified length", function () {
6
6
  var result = (0, _generateNumberArray.generateNumberArray)(5);
7
7
  expect(result).toEqual([0, 1, 2, 3, 4]);
8
8
  });
9
- it("最小値と最大値を指定して配列を生成する", function () {
9
+ it("should generate an array with specified min and max values", function () {
10
10
  var result = (0, _generateNumberArray.generateNumberArray)(5, 10, 14);
11
11
  expect(result).toEqual([10, 11, 12, 13, 14]);
12
12
  });
13
- it("長さが0の場合、空の配列を返す", function () {
13
+ it("should return an empty array when length is 0", function () {
14
14
  var result = (0, _generateNumberArray.generateNumberArray)(0);
15
15
  expect(result).toEqual([]);
16
16
  });
17
- it("最小値が最大値より大きい場合、エラーを投げる", function () {
17
+ it("should throw an error when min is greater than max", function () {
18
18
  expect(function () {
19
19
  return (0, _generateNumberArray.generateNumberArray)(5, 10, 5);
20
20
  }).toThrow("min should be less than or equal to max");
21
21
  });
22
- it("長さが1の場合、最小値を返す", function () {
22
+ it("should return min value when length is 1", function () {
23
23
  var result = (0, _generateNumberArray.generateNumberArray)(1, 10, 20);
24
24
  expect(result).toEqual([10]);
25
25
  });
26
- it("ランダムな値で配列を生成する", function () {
26
+ it("should generate an array with random values", function () {
27
27
  var result = (0, _generateNumberArray.generateNumberArray)(5, 10, 14, true);
28
28
  expect(result).toHaveLength(5);
29
29
  result.forEach(function (item) {
@@ -1,8 +1,40 @@
1
1
  "use strict";
2
2
 
3
3
  var _getArraysCommon = require("@/Array/getArraysCommon");
4
- test("{getArraysCommon}", function () {
5
- expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [2, 3, 4])).toEqual([2, 3]);
6
- expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [2, 3, 9], [3, 4, 5])).toEqual([3]);
7
- expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [2, 3, 9], [3, 4, 5], [3, 4, 5])).toEqual([3]);
4
+ describe("getArraysCommon", function () {
5
+ it("should find common elements between arrays", function () {
6
+ // Test with two arrays
7
+ expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [2, 3, 4])).toEqual([2, 3]);
8
+
9
+ // Test with three arrays
10
+ expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [2, 3, 9], [3, 4, 5])).toEqual([3]);
11
+
12
+ // Test with four arrays (including duplicates)
13
+ expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [2, 3, 9], [3, 4, 5], [3, 4, 5])).toEqual([3]);
14
+ });
15
+ it("should handle empty arrays", function () {
16
+ expect((0, _getArraysCommon.getArraysCommon)([], [])).toEqual([]);
17
+ expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [])).toEqual([]);
18
+ expect((0, _getArraysCommon.getArraysCommon)([], [1, 2, 3])).toEqual([]);
19
+ });
20
+ it("should handle arrays with no common elements", function () {
21
+ expect((0, _getArraysCommon.getArraysCommon)([1, 2, 3], [4, 5, 6])).toEqual([]);
22
+ expect((0, _getArraysCommon.getArraysCommon)([1, 2], [3, 4], [5, 6])).toEqual([]);
23
+ });
24
+ it("should handle arrays of strings", function () {
25
+ expect((0, _getArraysCommon.getArraysCommon)(["a", "b", "c"], ["b", "c", "d"])).toEqual(["b", "c"]);
26
+ expect((0, _getArraysCommon.getArraysCommon)(["a", "b", "c"], ["b", "c", "d"], ["c", "d", "e"])).toEqual(["c"]);
27
+ });
28
+ it("should handle arrays of objects", function () {
29
+ var obj1 = {
30
+ id: 1
31
+ };
32
+ var obj2 = {
33
+ id: 2
34
+ };
35
+ var obj3 = {
36
+ id: 3
37
+ };
38
+ expect((0, _getArraysCommon.getArraysCommon)([obj1, obj2, obj3], [obj2, obj3], [obj3])).toEqual([obj3]);
39
+ });
8
40
  });
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  var _getArraysDiff = require("@/Array/getArraysDiff");
4
- describe("getArraysDiff関数のテスト", function () {
5
- // 通常のケース
6
- test("通常の配列", function () {
4
+ describe("getArraysDiff function", function () {
5
+ // Normal cases
6
+ test("should handle standard arrays", function () {
7
7
  expect((0, _getArraysDiff.getArraysDiff)([1, 2, 3], [2, 3, 4], [3, 4, 5])).toEqual([1, 5]);
8
8
  expect((0, _getArraysDiff.getArraysDiff)([-1, 0, 1], [0, 1, 2], [1, 2, 3])).toEqual([-1, 3]);
9
9
  expect((0, _getArraysDiff.getArraysDiff)([0.1, 0.2, 0.3], [0.2, 0.3, 0.4], [0.3, 0.4, 0.5])).toEqual([0.1, 0.5]);
@@ -13,8 +13,8 @@ describe("getArraysDiff関数のテスト", function () {
13
13
  expect((0, _getArraysDiff.getArraysDiff)([1, "a", true], [2, "b", false], [3, "c", true])).toEqual([1, "a", 2, "b", false, 3, "c"]);
14
14
  });
15
15
 
16
- // 空の配列があるケース
17
- test("空の配列", function () {
16
+ // Cases with empty arrays
17
+ test("should handle empty arrays", function () {
18
18
  expect((0, _getArraysDiff.getArraysDiff)([], [1, 2], [2, 3])).toEqual([1, 3]);
19
19
  expect((0, _getArraysDiff.getArraysDiff)([1, 2], [], [2, 3])).toEqual([1, 3]);
20
20
  expect((0, _getArraysDiff.getArraysDiff)([1, 2], [2, 3], [])).toEqual([1, 3]);
@@ -35,8 +35,8 @@ describe("getArraysDiff関数のテスト", function () {
35
35
  expect((0, _getArraysDiff.getArraysDiff)([], [], [])).toEqual([]);
36
36
  });
37
37
 
38
- // 重複要素がないケース
39
- test("重複なし", function () {
38
+ // Cases with no duplicate elements
39
+ test("should handle arrays with no duplicates", function () {
40
40
  expect((0, _getArraysDiff.getArraysDiff)([1, 2], [3, 4], [5, 6])).toEqual([1, 2, 3, 4, 5, 6]);
41
41
  expect((0, _getArraysDiff.getArraysDiff)(["a", "b"], ["c", "d"], ["e", "f"])).toEqual(["a", "b", "c", "d", "e", "f"]);
42
42
  expect((0, _getArraysDiff.getArraysDiff)([true], [false], [null])).toEqual([true, false, null]);
@@ -60,8 +60,8 @@ describe("getArraysDiff関数のテスト", function () {
60
60
  expect((0, _getArraysDiff.getArraysDiff)([/a/], [/b/], [/c/])).toEqual([/a/, /b/, /c/]);
61
61
  });
62
62
 
63
- // 全ての配列が同じ要素を持つケース
64
- test("全配列で重複", function () {
63
+ // Cases where all arrays have the same elements
64
+ test("should handle arrays with identical elements", function () {
65
65
  expect((0, _getArraysDiff.getArraysDiff)([1, 2, 3], [1, 2, 3], [1, 2, 3])).toEqual([]);
66
66
  expect((0, _getArraysDiff.getArraysDiff)(["a", "b", "c"], ["a", "b", "c"], ["a", "b", "c"])).toEqual([]);
67
67
  expect((0, _getArraysDiff.getArraysDiff)([true, false], [true, false], [true, false])).toEqual([]);
@@ -69,8 +69,8 @@ describe("getArraysDiff関数のテスト", function () {
69
69
  expect((0, _getArraysDiff.getArraysDiff)([0.1, 0.2], [0.1, 0.2], [0.1, 0.2])).toEqual([]);
70
70
  });
71
71
 
72
- // 全ての配列が同じ要素を持っているが、順序が異なるケース
73
- test("全配列で重複(順序異なる)", function () {
72
+ // Cases where all arrays have the same elements but in different order
73
+ test("should handle arrays with identical elements in different order", function () {
74
74
  expect((0, _getArraysDiff.getArraysDiff)([1, 2, 3], [3, 1, 2], [2, 3, 1])).toEqual([]);
75
75
  expect((0, _getArraysDiff.getArraysDiff)(["a", "b", "c"], ["c", "a", "b"], ["b", "c", "a"])).toEqual([]);
76
76
  expect((0, _getArraysDiff.getArraysDiff)([true, false, null], [null, true, false], [false, null, true])).toEqual([]);
@@ -78,8 +78,8 @@ describe("getArraysDiff関数のテスト", function () {
78
78
  expect((0, _getArraysDiff.getArraysDiff)([0.1, 0.2, 0.3], [0.3, 0.1, 0.2], [0.2, 0.3, 0.1])).toEqual([]);
79
79
  });
80
80
 
81
- // 型が異なるケース
82
- test("型が異なる", function () {
81
+ // Cases with different types
82
+ test("should handle arrays with different types", function () {
83
83
  expect((0, _getArraysDiff.getArraysDiff)([1, "a", true], [true, "a"], [1, 2])).toEqual([2]);
84
84
  expect((0, _getArraysDiff.getArraysDiff)([{
85
85
  x: 1
@@ -91,7 +91,7 @@ describe("getArraysDiff関数のテスト", function () {
91
91
  y: 2
92
92
  }]);
93
93
  expect((0, _getArraysDiff.getArraysDiff)([1, "2", true], ["1", 2, false], [true, "1", 2])).toEqual([1, "2", false]);
94
- expect((0, _getArraysDiff.getArraysDiff)([0, ""], [false, null], [undefined, NaN])).toEqual([0, "", false, null, undefined, NaN]);
94
+ expect((0, _getArraysDiff.getArraysDiff)([0, ""], [false, null], [undefined, Number.NaN])).toEqual([0, "", false, null, undefined, Number.NaN]);
95
95
  expect((0, _getArraysDiff.getArraysDiff)([1n, 2n], [BigInt(1), BigInt(2)], [1, 2])).toEqual([1, 2]);
96
96
  expect((0, _getArraysDiff.getArraysDiff)([new Map()], [new Set()], [new WeakMap()])).toEqual([new Map(), new Set(), new WeakMap()]);
97
97
  expect((0, _getArraysDiff.getArraysDiff)([Symbol.iterator], [Symbol.asyncIterator], [Symbol.toStringTag])).toEqual([Symbol.iterator, Symbol.asyncIterator, Symbol.toStringTag]);
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _groupBy = require("@/Array/groupBy");
4
4
  describe("groupBy", function () {
5
- it("数値に基づいて奇数と偶数にグループ化する", function () {
5
+ it("should group numbers into odd and even", function () {
6
6
  var array = [1, 2, 3, 4, 5];
7
7
  var result = (0, _groupBy.groupBy)(array, function (num) {
8
8
  return num % 2 === 0 ? "even" : "odd";
@@ -12,7 +12,7 @@ describe("groupBy", function () {
12
12
  even: [2, 4]
13
13
  });
14
14
  });
15
- it("文字列の長さに基づいてグループ化する", function () {
15
+ it("should group strings based on their length", function () {
16
16
  var array = ["one", "two", "three", "four", "five"];
17
17
  var result = (0, _groupBy.groupBy)(array, function (str) {
18
18
  return str.length.toString();
@@ -23,7 +23,7 @@ describe("groupBy", function () {
23
23
  "5": ["three"]
24
24
  });
25
25
  });
26
- it("真偽値に基づいてグループ化する", function () {
26
+ it("should group boolean values", function () {
27
27
  var array = [true, false, true, false, true];
28
28
  var result = (0, _groupBy.groupBy)(array, function (bool) {
29
29
  return bool.toString();
@@ -33,7 +33,7 @@ describe("groupBy", function () {
33
33
  "false": [false, false]
34
34
  });
35
35
  });
36
- it("オブジェクトのプロパティに基づいてグループ化する", function () {
36
+ it("should group objects based on their properties", function () {
37
37
  var array = [{
38
38
  type: "fruit",
39
39
  name: "apple"
@@ -67,7 +67,7 @@ describe("groupBy", function () {
67
67
  }]
68
68
  });
69
69
  });
70
- it("undefinedを返す関数を渡した場合、すべての要素がundefinedキーにグループ化される", function () {
70
+ it("should group all elements under undefined key when iterator returns undefined", function () {
71
71
  var array = [1, 2, 3, 4, 5];
72
72
  // @ts-ignore
73
73
  var result = (0, _groupBy.groupBy)(array, function () {
@@ -77,7 +77,7 @@ describe("groupBy", function () {
77
77
  undefined: [1, 2, 3, 4, 5]
78
78
  });
79
79
  });
80
- it("空の配列を渡した場合、空のオブジェクトが返される", function () {
80
+ it("should return an empty object for an empty array", function () {
81
81
  var array = [];
82
82
  var result = (0, _groupBy.groupBy)(array, function (num) {
83
83
  return num % 2 === 0 ? "even" : "odd";
@@ -2,34 +2,34 @@
2
2
 
3
3
  var _insertionSort = require("@/Array/insertionSort");
4
4
  describe("insertionSort", function () {
5
- it("空の配列をソートすると空の配列が返される", function () {
5
+ it("should return an empty array when sorting an empty array", function () {
6
6
  expect((0, _insertionSort.insertionSort)([])).toEqual([]);
7
7
  });
8
- it("既にソートされた配列はそのまま返される", function () {
8
+ it("should return the same array when it's already sorted", function () {
9
9
  expect((0, _insertionSort.insertionSort)([1, 2, 3])).toEqual([1, 2, 3]);
10
10
  });
11
- it("逆順にソートされた配列を正しくソートする", function () {
11
+ it("should correctly sort a reverse-sorted array", function () {
12
12
  expect((0, _insertionSort.insertionSort)([3, 2, 1])).toEqual([1, 2, 3]);
13
13
  });
14
- it("ランダムな配列を正しくソートする", function () {
14
+ it("should correctly sort a random array", function () {
15
15
  var array = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5];
16
16
  var sortedArray = [].concat(array).sort(function (a, b) {
17
17
  return a - b;
18
18
  });
19
19
  expect((0, _insertionSort.insertionSort)(array)).toEqual(sortedArray);
20
20
  });
21
- it("重複した要素を含む配列を正しくソートする", function () {
21
+ it("should correctly sort an array with duplicate elements", function () {
22
22
  expect((0, _insertionSort.insertionSort)([2, 3, 3, 1, 2])).toEqual([1, 2, 2, 3, 3]);
23
23
  });
24
- it("負の数を含む配列を正しくソートする", function () {
24
+ it("should correctly sort an array with negative numbers", function () {
25
25
  expect((0, _insertionSort.insertionSort)([5, -1, 3, 2, 4, -5, 1, -2, 0])).toEqual([-5, -2, -1, 0, 1, 2, 3, 4, 5]);
26
26
  });
27
- it("配列を降順にソートする", function () {
27
+ it("should sort array in descending order", function () {
28
28
  expect((0, _insertionSort.insertionSort)([1, 2, 3], function (a, b) {
29
29
  return b - a;
30
30
  })).toEqual([3, 2, 1]);
31
31
  });
32
- it("部分配列をソートする", function () {
32
+ it("should sort a portion of the array", function () {
33
33
  expect((0, _insertionSort.insertionSort)([1, 3, 2, 5, 4], function (a, b) {
34
34
  return a - b;
35
35
  }, 1, 3)).toEqual([1, 2, 3, 5, 4]);
@@ -2,19 +2,48 @@
2
2
 
3
3
  var _mergeSort = require("@/Array/mergeSort");
4
4
  describe("mergeSort", function () {
5
- it("空の配列を渡した場合、空の配列を返す", function () {
5
+ it("should return an empty array when given an empty array", function () {
6
6
  expect((0, _mergeSort.mergeSort)([])).toEqual([]);
7
7
  });
8
- it("既にソートされた配列を渡した場合、同じ配列を返す", function () {
8
+ it("should return the same array when it's already sorted", function () {
9
9
  expect((0, _mergeSort.mergeSort)([1, 2, 3])).toEqual([1, 2, 3]);
10
10
  });
11
- it("逆順にソートされた配列を渡した場合、正しくソートされた配列を返す", function () {
11
+ it("should correctly sort a reverse-sorted array", function () {
12
12
  expect((0, _mergeSort.mergeSort)([3, 2, 1])).toEqual([1, 2, 3]);
13
13
  });
14
- it("ランダムな順序の配列を渡した場合、正しくソートされた配列を返す", function () {
14
+ it("should correctly sort a randomly ordered array", function () {
15
15
  expect((0, _mergeSort.mergeSort)([2, 3, 1])).toEqual([1, 2, 3]);
16
16
  });
17
- it("重複した要素を含む配列を渡した場合、正しくソートされた配列を返す", function () {
17
+ it("should correctly sort an array with duplicate elements", function () {
18
18
  expect((0, _mergeSort.mergeSort)([2, 3, 3, 1, 2])).toEqual([1, 2, 2, 3, 3]);
19
19
  });
20
+ it("should handle a single-element array", function () {
21
+ expect((0, _mergeSort.mergeSort)([1])).toEqual([1]);
22
+ });
23
+ it("should correctly sort an array with negative numbers", function () {
24
+ expect((0, _mergeSort.mergeSort)([3, -1, 4, -5, 2, -3])).toEqual([-5, -3, -1, 2, 3, 4]);
25
+ });
26
+ it("should sort strings alphabetically", function () {
27
+ expect((0, _mergeSort.mergeSort)(["banana", "apple", "cherry"])).toEqual(["apple", "banana", "cherry"]);
28
+ });
29
+ it("should sort using custom comparison function", function () {
30
+ // Sort in descending order
31
+ var descendingCompare = function descendingCompare(a, b) {
32
+ return b - a;
33
+ };
34
+ expect((0, _mergeSort.mergeSort)([1, 3, 2], descendingCompare)).toEqual([3, 2, 1]);
35
+
36
+ // Sort strings by length
37
+ var lengthCompare = function lengthCompare(a, b) {
38
+ return a.length - b.length;
39
+ };
40
+ expect((0, _mergeSort.mergeSort)(["aaa", "a", "aa"], lengthCompare)).toEqual(["a", "aa", "aaa"]);
41
+ });
42
+ it("should handle arrays with mixed types when using appropriate compare function", function () {
43
+ var array = ["10", "2", "1"];
44
+ var numericCompare = function numericCompare(a, b) {
45
+ return Number(a) - Number(b);
46
+ };
47
+ expect((0, _mergeSort.mergeSort)(array, numericCompare)).toEqual(["1", "2", "10"]);
48
+ });
20
49
  });
@@ -2,22 +2,22 @@
2
2
 
3
3
  var _quickSort = require("@/Array/quickSort");
4
4
  describe("quickSort", function () {
5
- it("空の配列をソートすると空の配列が返される", function () {
5
+ it("should return an empty array when sorting an empty array", function () {
6
6
  expect((0, _quickSort.quickSort)([])).toEqual([]);
7
7
  });
8
- it("既にソートされた配列はそのまま返される", function () {
8
+ it("should return the same array when it's already sorted", function () {
9
9
  expect((0, _quickSort.quickSort)([1, 2, 3, 4, 5])).toEqual([1, 2, 3, 4, 5]);
10
10
  });
11
- it("逆順にソートされた配列を正しくソートする", function () {
11
+ it("should correctly sort a reverse-sorted array", function () {
12
12
  expect((0, _quickSort.quickSort)([5, 4, 3, 2, 1])).toEqual([1, 2, 3, 4, 5]);
13
13
  });
14
- it("ランダムな配列を正しくソートする", function () {
14
+ it("should correctly sort a random array", function () {
15
15
  expect((0, _quickSort.quickSort)([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5])).toEqual([1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9]);
16
16
  });
17
- it("重複した要素を含む配列を正しくソートする", function () {
17
+ it("should correctly sort an array with duplicate elements", function () {
18
18
  expect((0, _quickSort.quickSort)([3, 3, 3, 2, 1, 1, 4, 4, 5])).toEqual([1, 1, 2, 3, 3, 3, 4, 4, 5]);
19
19
  });
20
- it("大量の要素を含む配列を正しくソートする", function () {
20
+ it("should correctly sort an array with large number of elements", function () {
21
21
  var largeArray = Array.from({
22
22
  length: 10000
23
23
  }, function () {
@@ -28,21 +28,21 @@ describe("quickSort", function () {
28
28
  });
29
29
  expect((0, _quickSort.quickSort)(largeArray)).toEqual(sortedArray);
30
30
  });
31
- it("負の数を含む配列を正しくソートする", function () {
31
+ it("should correctly sort an array with negative numbers", function () {
32
32
  expect((0, _quickSort.quickSort)([5, -1, 3, 2, 4, -5, 1, -2, 0])).toEqual([-5, -2, -1, 0, 1, 2, 3, 4, 5]);
33
33
  });
34
- it("配列を降順にソートする", function () {
34
+ it("should sort array in descending order", function () {
35
35
  expect((0, _quickSort.quickSort)([1, 2, 3, 4, 5], function (a, b) {
36
36
  return b - a;
37
37
  })).toEqual([5, 4, 3, 2, 1]);
38
38
  });
39
- it("部分配列をソートする", function () {
39
+ it("should sort a portion of the array", function () {
40
40
  expect((0, _quickSort.quickSort)([3, 1, 4, 1, 5], undefined, 1, 3)).toEqual([3, 1, 1, 4, 5]);
41
41
  });
42
- it("単一要素の配列が変更されずに返される", function () {
42
+ it("should return single-element array unchanged", function () {
43
43
  expect((0, _quickSort.quickSort)([1])).toEqual([1]);
44
44
  });
45
- it("compareFunctionが例外を投げる場合", function () {
45
+ it("should handle compareFunction throwing an error", function () {
46
46
  var throwCompare = function throwCompare() {
47
47
  throw new Error("Error during comparison");
48
48
  };
@@ -50,4 +50,69 @@ describe("quickSort", function () {
50
50
  return (0, _quickSort.quickSort)([3, 1, 4], throwCompare);
51
51
  }).toThrow("Error during comparison");
52
52
  });
53
+ describe("median of three cases", function () {
54
+ it("should handle all elements equal", function () {
55
+ expect((0, _quickSort.quickSort)([5, 5, 5, 5, 5])).toEqual([5, 5, 5, 5, 5]);
56
+ });
57
+ it("should handle three-element arrays in all orders", function () {
58
+ expect((0, _quickSort.quickSort)([1, 2, 3])).toEqual([1, 2, 3]); // a < b < c
59
+ expect((0, _quickSort.quickSort)([1, 3, 2])).toEqual([1, 2, 3]); // a < c < b
60
+ expect((0, _quickSort.quickSort)([2, 1, 3])).toEqual([1, 2, 3]); // b < a < c
61
+ expect((0, _quickSort.quickSort)([2, 3, 1])).toEqual([1, 2, 3]); // b < c < a
62
+ expect((0, _quickSort.quickSort)([3, 1, 2])).toEqual([1, 2, 3]); // c < a < b
63
+ expect((0, _quickSort.quickSort)([3, 2, 1])).toEqual([1, 2, 3]); // c < b < a
64
+ });
65
+ });
66
+ describe("insertion sort threshold cases", function () {
67
+ it("should handle arrays at threshold size", function () {
68
+ var arr = Array.from({
69
+ length: 10
70
+ }, function (_, i) {
71
+ return 10 - i;
72
+ });
73
+ expect((0, _quickSort.quickSort)(arr)).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
74
+ });
75
+ it("should handle arrays below threshold size", function () {
76
+ var arr = Array.from({
77
+ length: 5
78
+ }, function (_, i) {
79
+ return 5 - i;
80
+ });
81
+ expect((0, _quickSort.quickSort)(arr)).toEqual([1, 2, 3, 4, 5]);
82
+ });
83
+ it("should handle custom threshold", function () {
84
+ var arr = Array.from({
85
+ length: 20
86
+ }, function (_, i) {
87
+ return 20 - i;
88
+ });
89
+ expect((0, _quickSort.quickSort)(arr, undefined, 0, arr.length - 1, 5)).toEqual(Array.from({
90
+ length: 20
91
+ }, function (_, i) {
92
+ return i + 1;
93
+ }));
94
+ });
95
+ });
96
+ describe("boundary conditions", function () {
97
+ it("should handle invalid index ranges", function () {
98
+ // Out of bounds indices should be clamped to valid range
99
+ expect((0, _quickSort.quickSort)([3, 1, 4, 1, 5], undefined, -1, 10)).toEqual([1, 1, 3, 4, 5]);
100
+ expect((0, _quickSort.quickSort)([3, 1, 4, 1, 5], undefined, 10, -1)).toEqual([3, 1, 4, 1, 5]);
101
+
102
+ // When startIndex > endIndex, array should remain unchanged
103
+ var arr = [3, 1, 4, 1, 5];
104
+ expect((0, _quickSort.quickSort)([].concat(arr), undefined, 3, 1)).toEqual(arr);
105
+
106
+ // Sorting empty range should not change array
107
+ expect((0, _quickSort.quickSort)([].concat(arr), undefined, 2, 2)).toEqual(arr);
108
+ });
109
+ it("should handle two-element arrays", function () {
110
+ expect((0, _quickSort.quickSort)([2, 1])).toEqual([1, 2]);
111
+ expect((0, _quickSort.quickSort)([1, 2])).toEqual([1, 2]);
112
+ });
113
+ it("should handle arrays with all same value except one", function () {
114
+ expect((0, _quickSort.quickSort)([1, 1, 1, 0, 1])).toEqual([0, 1, 1, 1, 1]);
115
+ expect((0, _quickSort.quickSort)([1, 1, 1, 2, 1])).toEqual([1, 1, 1, 1, 2]);
116
+ });
117
+ });
53
118
  });