dce-commonkit 4.4.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 (401) hide show
  1. package/.eslintrc.js +93 -0
  2. package/LICENSE +21 -0
  3. package/README.md +2 -0
  4. package/lib/constants/DAY_IN_MS.d.ts +6 -0
  5. package/lib/constants/DAY_IN_MS.js +9 -0
  6. package/lib/constants/DAY_IN_MS.js.map +1 -0
  7. package/lib/constants/HOUR_IN_MS.d.ts +6 -0
  8. package/lib/constants/HOUR_IN_MS.js +9 -0
  9. package/lib/constants/HOUR_IN_MS.js.map +1 -0
  10. package/lib/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +6 -0
  11. package/lib/constants/LOG_REVIEW_GET_LOGS_ROUTE.js +13 -0
  12. package/lib/constants/LOG_REVIEW_GET_LOGS_ROUTE.js.map +1 -0
  13. package/lib/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +6 -0
  14. package/lib/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.js +13 -0
  15. package/lib/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.js.map +1 -0
  16. package/lib/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +7 -0
  17. package/lib/constants/LOG_REVIEW_STATUS_ROUTE.js +14 -0
  18. package/lib/constants/LOG_REVIEW_STATUS_ROUTE.js.map +1 -0
  19. package/lib/constants/LOG_ROUTE_PATH.d.ts +6 -0
  20. package/lib/constants/LOG_ROUTE_PATH.js +13 -0
  21. package/lib/constants/LOG_ROUTE_PATH.js.map +1 -0
  22. package/lib/constants/MINUTE_IN_MS.d.ts +6 -0
  23. package/lib/constants/MINUTE_IN_MS.js +9 -0
  24. package/lib/constants/MINUTE_IN_MS.js.map +1 -0
  25. package/lib/constants/ROUTE_PATH_PREFIX.d.ts +6 -0
  26. package/lib/constants/ROUTE_PATH_PREFIX.js +9 -0
  27. package/lib/constants/ROUTE_PATH_PREFIX.js.map +1 -0
  28. package/lib/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +6 -0
  29. package/lib/constants/SELECT_ADMIN_CHECK_ROUTE.js +9 -0
  30. package/lib/constants/SELECT_ADMIN_CHECK_ROUTE.js.map +1 -0
  31. package/lib/errors/ErrorWithCode.d.ts +9 -0
  32. package/lib/errors/ErrorWithCode.js +33 -0
  33. package/lib/errors/ErrorWithCode.js.map +1 -0
  34. package/lib/helpers/abbreviate.d.ts +10 -0
  35. package/lib/helpers/abbreviate.js +24 -0
  36. package/lib/helpers/abbreviate.js.map +1 -0
  37. package/lib/helpers/abbreviate.test.d.ts +5 -0
  38. package/lib/helpers/abbreviate.test.js +28 -0
  39. package/lib/helpers/abbreviate.test.js.map +1 -0
  40. package/lib/helpers/asyncArrayFunctions/everyAsync.d.ts +13 -0
  41. package/lib/helpers/asyncArrayFunctions/everyAsync.js +81 -0
  42. package/lib/helpers/asyncArrayFunctions/everyAsync.js.map +1 -0
  43. package/lib/helpers/asyncArrayFunctions/everyAsync.test.d.ts +1 -0
  44. package/lib/helpers/asyncArrayFunctions/everyAsync.test.js +219 -0
  45. package/lib/helpers/asyncArrayFunctions/everyAsync.test.js.map +1 -0
  46. package/lib/helpers/asyncArrayFunctions/filterAsync.d.ts +13 -0
  47. package/lib/helpers/asyncArrayFunctions/filterAsync.js +81 -0
  48. package/lib/helpers/asyncArrayFunctions/filterAsync.js.map +1 -0
  49. package/lib/helpers/asyncArrayFunctions/filterAsync.test.d.ts +1 -0
  50. package/lib/helpers/asyncArrayFunctions/filterAsync.test.js +244 -0
  51. package/lib/helpers/asyncArrayFunctions/filterAsync.test.js.map +1 -0
  52. package/lib/helpers/asyncArrayFunctions/forEachAsync.d.ts +10 -0
  53. package/lib/helpers/asyncArrayFunctions/forEachAsync.js +72 -0
  54. package/lib/helpers/asyncArrayFunctions/forEachAsync.js.map +1 -0
  55. package/lib/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +1 -0
  56. package/lib/helpers/asyncArrayFunctions/forEachAsync.test.js +223 -0
  57. package/lib/helpers/asyncArrayFunctions/forEachAsync.test.js.map +1 -0
  58. package/lib/helpers/asyncArrayFunctions/mapAsync.d.ts +11 -0
  59. package/lib/helpers/asyncArrayFunctions/mapAsync.js +77 -0
  60. package/lib/helpers/asyncArrayFunctions/mapAsync.js.map +1 -0
  61. package/lib/helpers/asyncArrayFunctions/mapAsync.test.d.ts +1 -0
  62. package/lib/helpers/asyncArrayFunctions/mapAsync.test.js +219 -0
  63. package/lib/helpers/asyncArrayFunctions/mapAsync.test.js.map +1 -0
  64. package/lib/helpers/asyncArrayFunctions/someAsync.d.ts +13 -0
  65. package/lib/helpers/asyncArrayFunctions/someAsync.js +80 -0
  66. package/lib/helpers/asyncArrayFunctions/someAsync.js.map +1 -0
  67. package/lib/helpers/asyncArrayFunctions/someAsync.test.d.ts +1 -0
  68. package/lib/helpers/asyncArrayFunctions/someAsync.test.js +227 -0
  69. package/lib/helpers/asyncArrayFunctions/someAsync.test.js.map +1 -0
  70. package/lib/helpers/avg.d.ts +8 -0
  71. package/lib/helpers/avg.js +24 -0
  72. package/lib/helpers/avg.js.map +1 -0
  73. package/lib/helpers/avg.test.d.ts +5 -0
  74. package/lib/helpers/avg.test.js +25 -0
  75. package/lib/helpers/avg.test.js.map +1 -0
  76. package/lib/helpers/capitalize.d.ts +7 -0
  77. package/lib/helpers/capitalize.js +20 -0
  78. package/lib/helpers/capitalize.js.map +1 -0
  79. package/lib/helpers/ceilToNumDecimals.d.ts +9 -0
  80. package/lib/helpers/ceilToNumDecimals.js +15 -0
  81. package/lib/helpers/ceilToNumDecimals.js.map +1 -0
  82. package/lib/helpers/ceilToNumDecimals.test.d.ts +5 -0
  83. package/lib/helpers/ceilToNumDecimals.test.js +38 -0
  84. package/lib/helpers/ceilToNumDecimals.test.js.map +1 -0
  85. package/lib/helpers/cloneDeep.d.ts +8 -0
  86. package/lib/helpers/cloneDeep.js +15 -0
  87. package/lib/helpers/cloneDeep.js.map +1 -0
  88. package/lib/helpers/compareArraysByProp.d.ts +13 -0
  89. package/lib/helpers/compareArraysByProp.js +62 -0
  90. package/lib/helpers/compareArraysByProp.js.map +1 -0
  91. package/lib/helpers/compareArraysByProp.test.d.ts +5 -0
  92. package/lib/helpers/compareArraysByProp.test.js +140 -0
  93. package/lib/helpers/compareArraysByProp.test.js.map +1 -0
  94. package/lib/helpers/extractProp.d.ts +12 -0
  95. package/lib/helpers/extractProp.js +19 -0
  96. package/lib/helpers/extractProp.js.map +1 -0
  97. package/lib/helpers/extractProp.test.d.ts +5 -0
  98. package/lib/helpers/extractProp.test.js +36 -0
  99. package/lib/helpers/extractProp.test.js.map +1 -0
  100. package/lib/helpers/floorToNumDecimals.d.ts +9 -0
  101. package/lib/helpers/floorToNumDecimals.js +15 -0
  102. package/lib/helpers/floorToNumDecimals.js.map +1 -0
  103. package/lib/helpers/floorToNumDecimals.test.d.ts +5 -0
  104. package/lib/helpers/floorToNumDecimals.test.js +38 -0
  105. package/lib/helpers/floorToNumDecimals.test.js.map +1 -0
  106. package/lib/helpers/forceNumIntoBounds.d.ts +10 -0
  107. package/lib/helpers/forceNumIntoBounds.js +15 -0
  108. package/lib/helpers/forceNumIntoBounds.js.map +1 -0
  109. package/lib/helpers/forceNumIntoBounds.test.d.ts +5 -0
  110. package/lib/helpers/forceNumIntoBounds.test.js +34 -0
  111. package/lib/helpers/forceNumIntoBounds.test.js.map +1 -0
  112. package/lib/helpers/genCSV.d.ts +18 -0
  113. package/lib/helpers/genCSV.js +69 -0
  114. package/lib/helpers/genCSV.js.map +1 -0
  115. package/lib/helpers/genCSV.test.d.ts +5 -0
  116. package/lib/helpers/genCSV.test.js +75 -0
  117. package/lib/helpers/genCSV.test.js.map +1 -0
  118. package/lib/helpers/genCommaList.d.ts +12 -0
  119. package/lib/helpers/genCommaList.js +20 -0
  120. package/lib/helpers/genCommaList.js.map +1 -0
  121. package/lib/helpers/genCommaList.test.d.ts +1 -0
  122. package/lib/helpers/genCommaList.test.js +94 -0
  123. package/lib/helpers/genCommaList.test.js.map +1 -0
  124. package/lib/helpers/getHumanReadableDate.d.ts +8 -0
  125. package/lib/helpers/getHumanReadableDate.js +32 -0
  126. package/lib/helpers/getHumanReadableDate.js.map +1 -0
  127. package/lib/helpers/getHumanReadableDate.test.d.ts +5 -0
  128. package/lib/helpers/getHumanReadableDate.test.js +31 -0
  129. package/lib/helpers/getHumanReadableDate.test.js.map +1 -0
  130. package/lib/helpers/getLocalTimeInfo.d.ts +19 -0
  131. package/lib/helpers/getLocalTimeInfo.js +51 -0
  132. package/lib/helpers/getLocalTimeInfo.js.map +1 -0
  133. package/lib/helpers/getLocalTimeInfo.test.d.ts +6 -0
  134. package/lib/helpers/getLocalTimeInfo.test.js +50 -0
  135. package/lib/helpers/getLocalTimeInfo.test.js.map +1 -0
  136. package/lib/helpers/getMonthName.d.ts +14 -0
  137. package/lib/helpers/getMonthName.js +31 -0
  138. package/lib/helpers/getMonthName.js.map +1 -0
  139. package/lib/helpers/getMonthName.test.d.ts +5 -0
  140. package/lib/helpers/getMonthName.test.js +70 -0
  141. package/lib/helpers/getMonthName.test.js.map +1 -0
  142. package/lib/helpers/getOrdinal.d.ts +8 -0
  143. package/lib/helpers/getOrdinal.js +16 -0
  144. package/lib/helpers/getOrdinal.js.map +1 -0
  145. package/lib/helpers/getOrdinal.test.d.ts +5 -0
  146. package/lib/helpers/getOrdinal.test.js +74 -0
  147. package/lib/helpers/getOrdinal.test.js.map +1 -0
  148. package/lib/helpers/getPartOfDay.d.ts +7 -0
  149. package/lib/helpers/getPartOfDay.js +24 -0
  150. package/lib/helpers/getPartOfDay.js.map +1 -0
  151. package/lib/helpers/getPartOfDay.test.d.ts +5 -0
  152. package/lib/helpers/getPartOfDay.test.js +49 -0
  153. package/lib/helpers/getPartOfDay.test.js.map +1 -0
  154. package/lib/helpers/getTimeInfoInET.d.ts +21 -0
  155. package/lib/helpers/getTimeInfoInET.js +67 -0
  156. package/lib/helpers/getTimeInfoInET.js.map +1 -0
  157. package/lib/helpers/getTimeInfoInET.test.d.ts +5 -0
  158. package/lib/helpers/getTimeInfoInET.test.js +74 -0
  159. package/lib/helpers/getTimeInfoInET.test.js.map +1 -0
  160. package/lib/helpers/getTimestampFromTimeInfoInET.d.ts +20 -0
  161. package/lib/helpers/getTimestampFromTimeInfoInET.js +136 -0
  162. package/lib/helpers/getTimestampFromTimeInfoInET.js.map +1 -0
  163. package/lib/helpers/getWordCount.d.ts +10 -0
  164. package/lib/helpers/getWordCount.js +24 -0
  165. package/lib/helpers/getWordCount.js.map +1 -0
  166. package/lib/helpers/idify.d.ts +9 -0
  167. package/lib/helpers/idify.js +24 -0
  168. package/lib/helpers/idify.js.map +1 -0
  169. package/lib/helpers/onlyKeepLetters.d.ts +8 -0
  170. package/lib/helpers/onlyKeepLetters.js +13 -0
  171. package/lib/helpers/onlyKeepLetters.js.map +1 -0
  172. package/lib/helpers/padDecimalZeros.d.ts +10 -0
  173. package/lib/helpers/padDecimalZeros.js +30 -0
  174. package/lib/helpers/padDecimalZeros.js.map +1 -0
  175. package/lib/helpers/padZerosLeft.d.ts +9 -0
  176. package/lib/helpers/padZerosLeft.js +21 -0
  177. package/lib/helpers/padZerosLeft.js.map +1 -0
  178. package/lib/helpers/parallelLimit.d.ts +12 -0
  179. package/lib/helpers/parallelLimit.js +104 -0
  180. package/lib/helpers/parallelLimit.js.map +1 -0
  181. package/lib/helpers/prefixWithAOrAn.d.ts +10 -0
  182. package/lib/helpers/prefixWithAOrAn.js +28 -0
  183. package/lib/helpers/prefixWithAOrAn.js.map +1 -0
  184. package/lib/helpers/roundToNumDecimals.d.ts +9 -0
  185. package/lib/helpers/roundToNumDecimals.js +15 -0
  186. package/lib/helpers/roundToNumDecimals.js.map +1 -0
  187. package/lib/helpers/shuffleArray.d.ts +8 -0
  188. package/lib/helpers/shuffleArray.js +29 -0
  189. package/lib/helpers/shuffleArray.js.map +1 -0
  190. package/lib/helpers/startMinWait.d.ts +9 -0
  191. package/lib/helpers/startMinWait.js +79 -0
  192. package/lib/helpers/startMinWait.js.map +1 -0
  193. package/lib/helpers/stringsToHumanReadableList.d.ts +10 -0
  194. package/lib/helpers/stringsToHumanReadableList.js +37 -0
  195. package/lib/helpers/stringsToHumanReadableList.js.map +1 -0
  196. package/lib/helpers/sum.d.ts +8 -0
  197. package/lib/helpers/sum.js +15 -0
  198. package/lib/helpers/sum.js.map +1 -0
  199. package/lib/helpers/validators/ChicagoTitleCase.d.ts +9 -0
  200. package/lib/helpers/validators/ChicagoTitleCase.js +31 -0
  201. package/lib/helpers/validators/ChicagoTitleCase.js.map +1 -0
  202. package/lib/helpers/validators/ChicagoTitleCase.test.d.ts +0 -0
  203. package/lib/helpers/validators/ChicagoTitleCase.test.js +79 -0
  204. package/lib/helpers/validators/ChicagoTitleCase.test.js.map +1 -0
  205. package/lib/helpers/validators/findURL.d.ts +0 -0
  206. package/lib/helpers/validators/findURL.js +39 -0
  207. package/lib/helpers/validators/findURL.js.map +1 -0
  208. package/lib/helpers/validators/findURL.test.d.ts +0 -0
  209. package/lib/helpers/validators/findURL.test.js +77 -0
  210. package/lib/helpers/validators/findURL.test.js.map +1 -0
  211. package/lib/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +10 -0
  212. package/lib/helpers/validators/shared/constants/ERROR_MESSAGES.js +21 -0
  213. package/lib/helpers/validators/shared/constants/ERROR_MESSAGES.js.map +1 -0
  214. package/lib/helpers/validators/shared/helpers/validateRegex.d.ts +19 -0
  215. package/lib/helpers/validators/shared/helpers/validateRegex.js +34 -0
  216. package/lib/helpers/validators/shared/helpers/validateRegex.js.map +1 -0
  217. package/lib/helpers/validators/shared/types/ValidationResult.d.ts +12 -0
  218. package/lib/helpers/validators/shared/types/ValidationResult.js +3 -0
  219. package/lib/helpers/validators/shared/types/ValidationResult.js.map +1 -0
  220. package/lib/helpers/validators/validURL.d.ts +8 -0
  221. package/lib/helpers/validators/validURL.js +20 -0
  222. package/lib/helpers/validators/validURL.js.map +1 -0
  223. package/lib/helpers/validators/validURL.test.d.ts +0 -0
  224. package/lib/helpers/validators/validURL.test.js +83 -0
  225. package/lib/helpers/validators/validURL.test.js.map +1 -0
  226. package/lib/helpers/validators/validateEmail.d.ts +11 -0
  227. package/lib/helpers/validators/validateEmail.js +39 -0
  228. package/lib/helpers/validators/validateEmail.js.map +1 -0
  229. package/lib/helpers/validators/validateEmail.test.d.ts +1 -0
  230. package/lib/helpers/validators/validateEmail.test.js +140 -0
  231. package/lib/helpers/validators/validateEmail.test.js.map +1 -0
  232. package/lib/helpers/validators/validatePhoneNumber.d.ts +11 -0
  233. package/lib/helpers/validators/validatePhoneNumber.js +40 -0
  234. package/lib/helpers/validators/validatePhoneNumber.js.map +1 -0
  235. package/lib/helpers/validators/validatePhoneNumber.test.d.ts +1 -0
  236. package/lib/helpers/validators/validatePhoneNumber.test.js +123 -0
  237. package/lib/helpers/validators/validatePhoneNumber.test.js.map +1 -0
  238. package/lib/helpers/validators/validateString.d.ts +22 -0
  239. package/lib/helpers/validators/validateString.js +124 -0
  240. package/lib/helpers/validators/validateString.js.map +1 -0
  241. package/lib/helpers/validators/validateString.test.d.ts +1 -0
  242. package/lib/helpers/validators/validateString.test.js +163 -0
  243. package/lib/helpers/validators/validateString.test.js.map +1 -0
  244. package/lib/helpers/waitMs.d.ts +7 -0
  245. package/lib/helpers/waitMs.js +68 -0
  246. package/lib/helpers/waitMs.js.map +1 -0
  247. package/lib/index.d.ts +63 -0
  248. package/lib/index.js +124 -0
  249. package/lib/index.js.map +1 -0
  250. package/lib/types/CommonKitErrorCode.d.ts +10 -0
  251. package/lib/types/CommonKitErrorCode.js +15 -0
  252. package/lib/types/CommonKitErrorCode.js.map +1 -0
  253. package/lib/types/DayOfWeek.d.ts +14 -0
  254. package/lib/types/DayOfWeek.js +18 -0
  255. package/lib/types/DayOfWeek.js.map +1 -0
  256. package/lib/types/Log/LogMainInfo.d.ts +39 -0
  257. package/lib/types/Log/LogMainInfo.js +3 -0
  258. package/lib/types/Log/LogMainInfo.js.map +1 -0
  259. package/lib/types/Log/LogSourceSpecificInfo.d.ts +13 -0
  260. package/lib/types/Log/LogSourceSpecificInfo.js +3 -0
  261. package/lib/types/Log/LogSourceSpecificInfo.js.map +1 -0
  262. package/lib/types/Log/LogTypeSpecificInfo.d.ts +17 -0
  263. package/lib/types/Log/LogTypeSpecificInfo.js +3 -0
  264. package/lib/types/Log/LogTypeSpecificInfo.js.map +1 -0
  265. package/lib/types/Log/index.d.ts +10 -0
  266. package/lib/types/Log/index.js +3 -0
  267. package/lib/types/Log/index.js.map +1 -0
  268. package/lib/types/LogAction.d.ts +29 -0
  269. package/lib/types/LogAction.js +55 -0
  270. package/lib/types/LogAction.js.map +1 -0
  271. package/lib/types/LogBuiltInMetadata.d.ts +16 -0
  272. package/lib/types/LogBuiltInMetadata.js +21 -0
  273. package/lib/types/LogBuiltInMetadata.js.map +1 -0
  274. package/lib/types/LogFunction.d.ts +24 -0
  275. package/lib/types/LogFunction.js +3 -0
  276. package/lib/types/LogFunction.js.map +1 -0
  277. package/lib/types/LogLevel.d.ts +10 -0
  278. package/lib/types/LogLevel.js +14 -0
  279. package/lib/types/LogLevel.js.map +1 -0
  280. package/lib/types/LogMetadataContextMap.d.ts +11 -0
  281. package/lib/types/LogMetadataContextMap.js +3 -0
  282. package/lib/types/LogMetadataContextMap.js.map +1 -0
  283. package/lib/types/LogMetadataTagMap.d.ts +8 -0
  284. package/lib/types/LogMetadataTagMap.js +3 -0
  285. package/lib/types/LogMetadataTagMap.js.map +1 -0
  286. package/lib/types/LogMetadataTargetMap.d.ts +8 -0
  287. package/lib/types/LogMetadataTargetMap.js +3 -0
  288. package/lib/types/LogMetadataTargetMap.js.map +1 -0
  289. package/lib/types/LogMetadataType.d.ts +13 -0
  290. package/lib/types/LogMetadataType.js +3 -0
  291. package/lib/types/LogMetadataType.js.map +1 -0
  292. package/lib/types/LogSource.d.ts +9 -0
  293. package/lib/types/LogSource.js +15 -0
  294. package/lib/types/LogSource.js.map +1 -0
  295. package/lib/types/LogType.d.ts +9 -0
  296. package/lib/types/LogType.js +15 -0
  297. package/lib/types/LogType.js.map +1 -0
  298. package/lib/types/ParamType.d.ts +17 -0
  299. package/lib/types/ParamType.js +21 -0
  300. package/lib/types/ParamType.js.map +1 -0
  301. package/package.json +47 -0
  302. package/src/constants/DAY_IN_MS.ts +7 -0
  303. package/src/constants/HOUR_IN_MS.ts +7 -0
  304. package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +9 -0
  305. package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +9 -0
  306. package/src/constants/LOG_REVIEW_STATUS_ROUTE.ts +10 -0
  307. package/src/constants/LOG_ROUTE_PATH.ts +9 -0
  308. package/src/constants/MINUTE_IN_MS.ts +7 -0
  309. package/src/constants/ROUTE_PATH_PREFIX.ts +7 -0
  310. package/src/constants/SELECT_ADMIN_CHECK_ROUTE.ts +7 -0
  311. package/src/errors/ErrorWithCode.ts +15 -0
  312. package/src/helpers/abbreviate.test.ts +26 -0
  313. package/src/helpers/abbreviate.ts +25 -0
  314. package/src/helpers/asyncArrayFunctions/everyAsync.test.ts +114 -0
  315. package/src/helpers/asyncArrayFunctions/everyAsync.ts +51 -0
  316. package/src/helpers/asyncArrayFunctions/filterAsync.test.ts +126 -0
  317. package/src/helpers/asyncArrayFunctions/filterAsync.ts +50 -0
  318. package/src/helpers/asyncArrayFunctions/forEachAsync.test.ts +136 -0
  319. package/src/helpers/asyncArrayFunctions/forEachAsync.ts +40 -0
  320. package/src/helpers/asyncArrayFunctions/mapAsync.test.ts +125 -0
  321. package/src/helpers/asyncArrayFunctions/mapAsync.ts +46 -0
  322. package/src/helpers/asyncArrayFunctions/someAsync.test.ts +92 -0
  323. package/src/helpers/asyncArrayFunctions/someAsync.ts +49 -0
  324. package/src/helpers/avg.test.ts +24 -0
  325. package/src/helpers/avg.ts +22 -0
  326. package/src/helpers/capitalize.ts +20 -0
  327. package/src/helpers/ceilToNumDecimals.test.ts +39 -0
  328. package/src/helpers/ceilToNumDecimals.ts +13 -0
  329. package/src/helpers/cloneDeep.ts +11 -0
  330. package/src/helpers/compareArraysByProp.test.ts +147 -0
  331. package/src/helpers/compareArraysByProp.ts +56 -0
  332. package/src/helpers/extractProp.test.ts +34 -0
  333. package/src/helpers/extractProp.ts +17 -0
  334. package/src/helpers/floorToNumDecimals.test.ts +39 -0
  335. package/src/helpers/floorToNumDecimals.ts +13 -0
  336. package/src/helpers/forceNumIntoBounds.test.ts +34 -0
  337. package/src/helpers/forceNumIntoBounds.ts +19 -0
  338. package/src/helpers/genCSV.test.ts +77 -0
  339. package/src/helpers/genCSV.ts +87 -0
  340. package/src/helpers/genCommaList.test.ts +57 -0
  341. package/src/helpers/genCommaList.ts +21 -0
  342. package/src/helpers/getHumanReadableDate.test.ts +29 -0
  343. package/src/helpers/getHumanReadableDate.ts +36 -0
  344. package/src/helpers/getLocalTimeInfo.test.ts +48 -0
  345. package/src/helpers/getLocalTimeInfo.ts +58 -0
  346. package/src/helpers/getMonthName.test.ts +79 -0
  347. package/src/helpers/getMonthName.ts +29 -0
  348. package/src/helpers/getOrdinal.test.ts +84 -0
  349. package/src/helpers/getOrdinal.ts +14 -0
  350. package/src/helpers/getPartOfDay.test.ts +56 -0
  351. package/src/helpers/getPartOfDay.ts +20 -0
  352. package/src/helpers/getTimeInfoInET.test.ts +72 -0
  353. package/src/helpers/getTimeInfoInET.ts +79 -0
  354. package/src/helpers/getTimestampFromTimeInfoInET.ts +179 -0
  355. package/src/helpers/getWordCount.ts +26 -0
  356. package/src/helpers/idify.ts +24 -0
  357. package/src/helpers/onlyKeepLetters.ts +11 -0
  358. package/src/helpers/padDecimalZeros.ts +32 -0
  359. package/src/helpers/padZerosLeft.ts +21 -0
  360. package/src/helpers/parallelLimit.ts +63 -0
  361. package/src/helpers/prefixWithAOrAn.ts +29 -0
  362. package/src/helpers/roundToNumDecimals.ts +13 -0
  363. package/src/helpers/shuffleArray.ts +19 -0
  364. package/src/helpers/startMinWait.ts +33 -0
  365. package/src/helpers/stringsToHumanReadableList.ts +39 -0
  366. package/src/helpers/sum.ts +16 -0
  367. package/src/helpers/validators/ChicagoTitleCase.test.ts +85 -0
  368. package/src/helpers/validators/ChicagoTitleCase.ts +32 -0
  369. package/src/helpers/validators/findURL.test.ts +83 -0
  370. package/src/helpers/validators/findURL.ts +43 -0
  371. package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +18 -0
  372. package/src/helpers/validators/shared/helpers/validateRegex.ts +47 -0
  373. package/src/helpers/validators/shared/types/ValidationResult.ts +20 -0
  374. package/src/helpers/validators/validURL.test.ts +90 -0
  375. package/src/helpers/validators/validURL.ts +18 -0
  376. package/src/helpers/validators/validateEmail.test.ts +110 -0
  377. package/src/helpers/validators/validateEmail.ts +47 -0
  378. package/src/helpers/validators/validatePhoneNumber.test.ts +94 -0
  379. package/src/helpers/validators/validatePhoneNumber.ts +49 -0
  380. package/src/helpers/validators/validateString.test.ts +173 -0
  381. package/src/helpers/validators/validateString.ts +171 -0
  382. package/src/helpers/waitMs.ts +12 -0
  383. package/src/index.ts +139 -0
  384. package/src/types/CommonKitErrorCode.ts +13 -0
  385. package/src/types/DayOfWeek.ts +15 -0
  386. package/src/types/Log/LogMainInfo.ts +69 -0
  387. package/src/types/Log/LogSourceSpecificInfo.ts +25 -0
  388. package/src/types/Log/LogTypeSpecificInfo.ts +33 -0
  389. package/src/types/Log/index.ts +17 -0
  390. package/src/types/LogAction.ts +52 -0
  391. package/src/types/LogBuiltInMetadata.ts +19 -0
  392. package/src/types/LogFunction.ts +46 -0
  393. package/src/types/LogLevel.ts +11 -0
  394. package/src/types/LogMetadataContextMap.ts +15 -0
  395. package/src/types/LogMetadataTagMap.ts +9 -0
  396. package/src/types/LogMetadataTargetMap.ts +9 -0
  397. package/src/types/LogMetadataType.ts +16 -0
  398. package/src/types/LogSource.ts +12 -0
  399. package/src/types/LogType.ts +12 -0
  400. package/src/types/ParamType.ts +18 -0
  401. package/tsconfig.json +19 -0
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ // Import constants
43
+ var ERROR_MESSAGES_1 = require("./shared/constants/ERROR_MESSAGES");
44
+ // Import function
45
+ var validatePhoneNumber_1 = __importDefault(require("./validatePhoneNumber"));
46
+ /*------------------------------------------------------------------------*/
47
+ /* ---------------------------- Valid Tests --------------------------- */
48
+ /*------------------------------------------------------------------------*/
49
+ var cleanedNumber = '1234567890';
50
+ var cleanedNumberExt = '11234567890';
51
+ var validPhoneNumbers = [
52
+ {
53
+ input: '1234567890',
54
+ cleaned: cleanedNumber,
55
+ },
56
+ {
57
+ input: '(123)-456-7890',
58
+ cleaned: cleanedNumber,
59
+ },
60
+ {
61
+ input: '123-456-7890',
62
+ cleaned: cleanedNumber,
63
+ },
64
+ {
65
+ input: '(123)456-7890',
66
+ cleaned: cleanedNumber,
67
+ },
68
+ {
69
+ input: '(123)4567890',
70
+ cleaned: cleanedNumber,
71
+ },
72
+ {
73
+ input: ' 123456-7890 ',
74
+ cleaned: cleanedNumber,
75
+ },
76
+ {
77
+ input: '+1 123 456 7890',
78
+ cleaned: cleanedNumberExt,
79
+ },
80
+ {
81
+ input: '+1123456 7890',
82
+ cleaned: cleanedNumberExt,
83
+ },
84
+ {
85
+ input: '+1(123)456-7890',
86
+ cleaned: cleanedNumberExt,
87
+ },
88
+ ];
89
+ test('Returns true for a given valid phone number and removes any non-digit characters.', function () { return __awaiter(void 0, void 0, void 0, function () {
90
+ return __generator(this, function (_a) {
91
+ validPhoneNumbers.forEach(function (pair) {
92
+ var validResponse = {
93
+ isValid: true,
94
+ cleanedValue: pair.cleaned,
95
+ };
96
+ expect((0, validatePhoneNumber_1.default)(pair.input)).toStrictEqual(validResponse);
97
+ });
98
+ return [2 /*return*/];
99
+ });
100
+ }); });
101
+ /*------------------------------------------------------------------------*/
102
+ /* ---------------------------- Invalid Tests --------------------------- */
103
+ /*------------------------------------------------------------------------*/
104
+ var invalidPhoneNumbers = [
105
+ '123456789',
106
+ '1234567894567890',
107
+ '1234-567-890',
108
+ '123456m78',
109
+ '123 4567 890',
110
+ ];
111
+ var invalidResponse = {
112
+ isValid: false,
113
+ errorMessage: ERROR_MESSAGES_1.INVALID_PHONE_ERROR,
114
+ };
115
+ test('Returns false for a given valid phone number.', function () { return __awaiter(void 0, void 0, void 0, function () {
116
+ return __generator(this, function (_a) {
117
+ invalidPhoneNumbers.forEach(function (phoneNumber) {
118
+ expect((0, validatePhoneNumber_1.default)(phoneNumber)).toStrictEqual(invalidResponse);
119
+ });
120
+ return [2 /*return*/];
121
+ });
122
+ }); });
123
+ //# sourceMappingURL=validatePhoneNumber.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePhoneNumber.test.js","sourceRoot":"","sources":["../../../src/helpers/validators/validatePhoneNumber.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,mBAAmB;AACnB,oEAAwE;AAExE,kBAAkB;AAClB,8EAAwD;AAExD,4EAA4E;AAC5E,0EAA0E;AAC1E,4EAA4E;AAE5E,IAAM,aAAa,GAAG,YAAY,CAAC;AACnC,IAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,IAAM,iBAAiB,GAAyC;IAC9D;QACE,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,aAAa;KACvB;IACD;QACE,KAAK,EAAE,gBAAgB;QACvB,OAAO,EAAE,aAAa;KACvB;IACD;QACE,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE,aAAa;KACvB;IACD;QACE,KAAK,EAAE,eAAe;QACtB,OAAO,EAAE,aAAa;KACvB;IACD;QACE,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE,aAAa;KACvB;IACD;QACE,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE,aAAa;KACvB;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,OAAO,EAAE,gBAAgB;KAC1B;IACD;QACE,KAAK,EAAE,eAAe;QACtB,OAAO,EAAE,gBAAgB;KAC1B;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,OAAO,EAAE,gBAAgB;KAC1B;CACF,CAAC;AAEF,IAAI,CACF,mFAAmF,EACnF;;QACE,iBAAiB,CAAC,OAAO,CAAC,UAAC,IAAI;YAC7B,IAAM,aAAa,GAA6B;gBAC9C,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,IAAI,CAAC,OAAO;aAC3B,CAAC;YAEF,MAAM,CAAC,IAAA,6BAAmB,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;;;KACJ,CACF,CAAC;AAEF,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAE5E,IAAM,mBAAmB,GAAa;IACpC,WAAW;IACX,kBAAkB;IAClB,cAAc;IACd,WAAW;IACX,cAAc;CACf,CAAC;AAEF,IAAM,eAAe,GAA6B;IAChD,OAAO,EAAE,KAAK;IACd,YAAY,EAAE,oCAAmB;CAClC,CAAC;AAEF,IAAI,CACF,+CAA+C,EAC/C;;QACE,mBAAmB,CAAC,OAAO,CAAC,UAAC,WAAW;YACtC,MAAM,CAAC,IAAA,6BAAmB,EAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;;;KACJ,CACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import ValidationResult from './shared/types/ValidationResult';
2
+ /**
3
+ * Determines whether a given input string is considered valid based on
4
+ * the provided requirements.
5
+ * @author Austen Money
6
+ * @param input input string
7
+ * @param opts options for validation
8
+ * @returns whether input is considered valid according to reqs - if
9
+ * valid, returns a cleaned version of input; if invalid, returns
10
+ * a string containing error messages describing which requirements
11
+ * were not met.
12
+ */
13
+ declare const validateString: (input: string, opts: {
14
+ ignoreWhitespace?: boolean;
15
+ minLen?: number;
16
+ maxLen?: number;
17
+ lettersOnly?: boolean;
18
+ numbersOnly?: boolean;
19
+ regexTest?: RegExp;
20
+ regexDescription?: string;
21
+ }) => ValidationResult<string>;
22
+ export default validateString;
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ // Import helpers
7
+ var validateRegex_1 = __importDefault(require("./shared/helpers/validateRegex"));
8
+ var genCommaList_1 = __importDefault(require("../genCommaList"));
9
+ // Import constants
10
+ var ERROR_MESSAGES_1 = require("./shared/constants/ERROR_MESSAGES");
11
+ /*------------------------------------------------------------------------*/
12
+ /* ------------------------------ Constants ----------------------------- */
13
+ /*------------------------------------------------------------------------*/
14
+ // define minimum and maximum range for lowercase ASCII chars
15
+ var LOWERCASE_MIN = 65;
16
+ var LOWERCASE_MAX = 90;
17
+ // define minimum and maximum range for uppercase ASCII chars
18
+ var UPPERCASE_MIN = 97;
19
+ var UPPERCASE_MAX = 122;
20
+ // define minimum and maximum range for ASCII digits
21
+ var DIGIT_MIN = 48;
22
+ var DIGIT_MAX = 57;
23
+ /*------------------------------------------------------------------------*/
24
+ /* ---------------------------- Main Function --------------------------- */
25
+ /*------------------------------------------------------------------------*/
26
+ /**
27
+ * Determines whether a given input string is considered valid based on
28
+ * the provided requirements.
29
+ * @author Austen Money
30
+ * @param input input string
31
+ * @param opts options for validation
32
+ * @returns whether input is considered valid according to reqs - if
33
+ * valid, returns a cleaned version of input; if invalid, returns
34
+ * a string containing error messages describing which requirements
35
+ * were not met.
36
+ */
37
+ var validateString = function (input, opts) {
38
+ // stores all invalid input errors
39
+ var errorMessages = [];
40
+ // contains version of input that will be returned
41
+ var cleanedValue = input;
42
+ // remove whitespace if required
43
+ if (opts.ignoreWhitespace) {
44
+ cleanedValue = input.replace(/\s+/g, '');
45
+ }
46
+ // apply max char requirement
47
+ if (opts.minLen) {
48
+ if (cleanedValue.length < opts.minLen) {
49
+ errorMessages.push(ERROR_MESSAGES_1.INVALID_STRING_ERRORS.MIN_LEN(opts.minLen));
50
+ }
51
+ }
52
+ // apply max char requirement
53
+ if (opts.maxLen) {
54
+ if (cleanedValue.length > opts.maxLen) {
55
+ errorMessages.push(ERROR_MESSAGES_1.INVALID_STRING_ERRORS.MAX_LEN(opts.maxLen));
56
+ }
57
+ }
58
+ // apply alphabetical requirement
59
+ if (opts.lettersOnly) {
60
+ // remove diacritics
61
+ cleanedValue = cleanedValue.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
62
+ var containsNonLetters = (cleanedValue
63
+ // split into characters
64
+ .split('')
65
+ // convert into character codes
66
+ .map(function (curr) {
67
+ return curr.charCodeAt(0);
68
+ })
69
+ // check for non-letters
70
+ .some(function (currCode) {
71
+ return (!(currCode >= LOWERCASE_MIN && currCode <= LOWERCASE_MAX)
72
+ && !(currCode >= UPPERCASE_MIN && currCode <= UPPERCASE_MAX));
73
+ }));
74
+ if (containsNonLetters) {
75
+ errorMessages.push(ERROR_MESSAGES_1.INVALID_STRING_ERRORS.LETTERS_ONLY);
76
+ }
77
+ }
78
+ // apply numerical requirement
79
+ if (opts.numbersOnly) {
80
+ var containsNonNumbers = (cleanedValue
81
+ // split into characters
82
+ .split('')
83
+ // convert into character codes
84
+ .map(function (curr) {
85
+ return curr.charCodeAt(0);
86
+ })
87
+ // check for non-numbers
88
+ .some(function (currCode) {
89
+ return (!(currCode >= DIGIT_MIN && currCode <= DIGIT_MAX));
90
+ }));
91
+ if (containsNonNumbers) {
92
+ errorMessages.push(ERROR_MESSAGES_1.INVALID_STRING_ERRORS.NUMBERS_ONLY);
93
+ }
94
+ }
95
+ // apply regex requirement
96
+ if (opts.regexTest) {
97
+ var regex = opts.regexTest;
98
+ // validate and create customized error message if description is provided
99
+ var result = (0, validateRegex_1.default)({
100
+ input: cleanedValue,
101
+ regex: regex,
102
+ regexDescription: opts.regexDescription,
103
+ });
104
+ // if string did not pass regex validation, add error message
105
+ if (result.isValid === false) {
106
+ errorMessages.push(result.errorMessage);
107
+ }
108
+ }
109
+ // combine all error messages into one string to return
110
+ var errorMessage = "".concat(ERROR_MESSAGES_1.INVALID_STRING_ERRORS.MESSAGE_INTRO).concat((0, genCommaList_1.default)(errorMessages), ".");
111
+ return (
112
+ // if no error messages, string is valid; if not, it is invalid
113
+ errorMessages.length === 0
114
+ ? {
115
+ isValid: true,
116
+ cleanedValue: cleanedValue,
117
+ }
118
+ : {
119
+ isValid: false,
120
+ errorMessage: errorMessage,
121
+ });
122
+ };
123
+ exports.default = validateString;
124
+ //# sourceMappingURL=validateString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateString.js","sourceRoot":"","sources":["../../../src/helpers/validators/validateString.ts"],"names":[],"mappings":";;;;;AAAA,iBAAiB;AACjB,iFAA2D;AAC3D,iEAA2C;AAE3C,mBAAmB;AACnB,oEAA0E;AAK1E,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAE5E,6DAA6D;AAC7D,IAAM,aAAa,GAAG,EAAE,CAAC;AACzB,IAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,6DAA6D;AAC7D,IAAM,aAAa,GAAG,EAAE,CAAC;AACzB,IAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,oDAAoD;AACpD,IAAM,SAAS,GAAG,EAAE,CAAC;AACrB,IAAM,SAAS,GAAG,EAAE,CAAC;AAErB,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAE5E;;;;;;;;;;GAUG;AACH,IAAM,cAAc,GAAG,UACrB,KAAa,EACb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AqB,CAAC,aAAa,SAAG,IAAA,sBAAY,EAAC,aAAa,CAAC,MAAG,CAAC;IAE7F,OAAO;IACL,+DAA+D;IAC/D,aAAa,CAAC,MAAM,KAAK,CAAC;QACxB,CAAC,CAAC;YACA,OAAO,EAAE,IAAI;YACb,YAAY,cAAA;SACb;QACD,CAAC,CAAC;YACA,OAAO,EAAE,KAAK;YACd,YAAY,cAAA;SACb,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ // Import helpers
43
+ var genCommaList_1 = __importDefault(require("../genCommaList"));
44
+ // Import constants
45
+ var ERROR_MESSAGES_1 = require("./shared/constants/ERROR_MESSAGES");
46
+ // Import function
47
+ var validateString_1 = __importDefault(require("./validateString"));
48
+ /*------------------------------------------------------------------------*/
49
+ /* ---------------------------- Valid Tests --------------------------- */
50
+ /*------------------------------------------------------------------------*/
51
+ var validStrings = [
52
+ 'users',
53
+ 'username',
54
+ 'MyValidString',
55
+ 'HereisAnotherValidString',
56
+ 'WoahAnotherValidStringIsHere',
57
+ ];
58
+ var validReqs = [
59
+ {},
60
+ {
61
+ minLen: 5,
62
+ },
63
+ {
64
+ minLen: 5,
65
+ maxLen: 30,
66
+ },
67
+ {
68
+ minLen: 5,
69
+ maxLen: 30,
70
+ lettersOnly: true,
71
+ },
72
+ {
73
+ minLen: 5,
74
+ maxLen: 30,
75
+ lettersOnly: true,
76
+ numbersOnly: false,
77
+ },
78
+ {
79
+ minLen: 5,
80
+ maxLen: 30,
81
+ lettersOnly: true,
82
+ numbersOnly: false,
83
+ ignoreWhitespace: false,
84
+ },
85
+ ];
86
+ test('Returns true for a given valid string.', function () { return __awaiter(void 0, void 0, void 0, function () {
87
+ var validString, validResponse, validOpt;
88
+ return __generator(this, function (_a) {
89
+ validStrings.forEach(function (validString) {
90
+ validReqs.forEach(function (validReq) {
91
+ var validResponse = {
92
+ isValid: true,
93
+ cleanedValue: validString,
94
+ };
95
+ expect((0, validateString_1.default)(validString, validReq)).toStrictEqual(validResponse);
96
+ });
97
+ });
98
+ validString = 'A string with whitespace!';
99
+ validResponse = {
100
+ isValid: true,
101
+ cleanedValue: 'Astringwithwhitespace!',
102
+ };
103
+ validOpt = {
104
+ maxLen: 22,
105
+ ignoreWhitespace: true,
106
+ };
107
+ expect((0, validateString_1.default)(validString, validOpt)).toStrictEqual(validResponse);
108
+ return [2 /*return*/];
109
+ });
110
+ }); });
111
+ /*------------------------------------------------------------------------*/
112
+ /* ---------------------------- Invalid Tests --------------------------- */
113
+ /*------------------------------------------------------------------------*/
114
+ var invalidStrings = [
115
+ {
116
+ input: 'ûšër',
117
+ reqs: {
118
+ minLen: 5,
119
+ lettersOnly: true,
120
+ },
121
+ error: [ERROR_MESSAGES_1.INVALID_STRING_ERRORS.MIN_LEN(5)],
122
+ },
123
+ {
124
+ input: '123456789',
125
+ reqs: {
126
+ minLen: 10,
127
+ maxLen: 5,
128
+ lettersOnly: true,
129
+ },
130
+ error: [ERROR_MESSAGES_1.INVALID_STRING_ERRORS.MIN_LEN(10), ERROR_MESSAGES_1.INVALID_STRING_ERRORS.MAX_LEN(5), ERROR_MESSAGES_1.INVALID_STRING_ERRORS.LETTERS_ONLY],
131
+ },
132
+ {
133
+ input: 'String with non-letters!!',
134
+ reqs: {
135
+ lettersOnly: true,
136
+ numbersOnly: true,
137
+ ignoreWhitespace: true,
138
+ },
139
+ error: [ERROR_MESSAGES_1.INVALID_STRING_ERRORS.LETTERS_ONLY, ERROR_MESSAGES_1.INVALID_STRING_ERRORS.NUMBERS_ONLY],
140
+ },
141
+ {
142
+ input: '12345678',
143
+ reqs: {
144
+ lettersOnly: true,
145
+ regexTest: /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/,
146
+ regexDescription: 'should be a phone number',
147
+ },
148
+ error: [ERROR_MESSAGES_1.INVALID_STRING_ERRORS.LETTERS_ONLY, "".concat(ERROR_MESSAGES_1.INVALID_REGEX_ERROR, ": should be a phone number")],
149
+ },
150
+ ];
151
+ test('Returns false for a given invalid string.', function () { return __awaiter(void 0, void 0, void 0, function () {
152
+ return __generator(this, function (_a) {
153
+ invalidStrings.forEach(function (triple) {
154
+ var invalidResponse = {
155
+ isValid: false,
156
+ errorMessage: "".concat(ERROR_MESSAGES_1.INVALID_STRING_ERRORS.MESSAGE_INTRO).concat((0, genCommaList_1.default)(triple.error), "."),
157
+ };
158
+ expect((0, validateString_1.default)(triple.input, triple.reqs)).toStrictEqual(invalidResponse);
159
+ });
160
+ return [2 /*return*/];
161
+ });
162
+ }); });
163
+ //# sourceMappingURL=validateString.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateString.test.js","sourceRoot":"","sources":["../../../src/helpers/validators/validateString.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAAiB;AACjB,iEAA2C;AAK3C,mBAAmB;AACnB,oEAA+F;AAE/F,kBAAkB;AAClB,oEAA8C;AAE9C,4EAA4E;AAC5E,0EAA0E;AAC1E,4EAA4E;AAE5E,IAAM,YAAY,GAAa;IAC7B,OAAO;IACP,UAAU;IACV,eAAe;IACf,0BAA0B;IAC1B,8BAA8B;CAC/B,CAAC;AAEF,IAAM,SAAS,GAeT;IACJ,EACC;IACD;QACE,MAAM,EAAE,CAAC;KACV;I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certain number of ms
3
+ * @author Gabe Abrams
4
+ * @param ms number of ms to wait
5
+ */
6
+ declare const waitMs: (ms?: number) => Promise<unknown>;
7
+ export default waitMs;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
39
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
40
+ if (ar || !(i in from)) {
41
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
42
+ ar[i] = from[i];
43
+ }
44
+ }
45
+ return to.concat(ar || Array.prototype.slice.call(from));
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ /**
49
+ * Wait for a certain number of ms
50
+ * @author Gabe Abrams
51
+ * @param ms number of ms to wait
52
+ */
53
+ var waitMs = function () {
54
+ var args_1 = [];
55
+ for (var _i = 0; _i < arguments.length; _i++) {
56
+ args_1[_i] = arguments[_i];
57
+ }
58
+ return __awaiter(void 0, __spreadArray([], args_1, true), void 0, function (ms) {
59
+ if (ms === void 0) { ms = 0; }
60
+ return __generator(this, function (_a) {
61
+ return [2 /*return*/, new Promise(function (resolve) {
62
+ setTimeout(resolve, ms);
63
+ })];
64
+ });
65
+ });
66
+ };
67
+ exports.default = waitMs;
68
+ //# sourceMappingURL=waitMs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitMs.js","sourceRoot":"","sources":["../../src/helpers/waitMs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,IAAM,MAAM,GAAG;;;;;gFAAO,EAAM;QAAN,mBAAA,EAAA,MAAM;;YAC1B,sBAAO,IAAI,OAAO,CAAC,UAAC,OAAO;oBACzB,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC1B,CAAC,CAAC,EAAC;;;CACJ,CAAC;AAEF,kBAAe,MAAM,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,63 @@
1
+ import ErrorWithCode from './errors/ErrorWithCode';
2
+ import MINUTE_IN_MS from './constants/MINUTE_IN_MS';
3
+ import HOUR_IN_MS from './constants/HOUR_IN_MS';
4
+ import DAY_IN_MS from './constants/DAY_IN_MS';
5
+ import LOG_REVIEW_ROUTE_PATH_PREFIX from './constants/LOG_REVIEW_ROUTE_PATH_PREFIX';
6
+ import LOG_ROUTE_PATH from './constants/LOG_ROUTE_PATH';
7
+ import LOG_REVIEW_STATUS_ROUTE from './constants/LOG_REVIEW_STATUS_ROUTE';
8
+ import LOG_REVIEW_GET_LOGS_ROUTE from './constants/LOG_REVIEW_GET_LOGS_ROUTE';
9
+ import SELECT_ADMIN_CHECK_ROUTE from './constants/SELECT_ADMIN_CHECK_ROUTE';
10
+ import abbreviate from './helpers/abbreviate';
11
+ import avg from './helpers/avg';
12
+ import ceilToNumDecimals from './helpers/ceilToNumDecimals';
13
+ import floorToNumDecimals from './helpers/floorToNumDecimals';
14
+ import forceNumIntoBounds from './helpers/forceNumIntoBounds';
15
+ import padDecimalZeros from './helpers/padDecimalZeros';
16
+ import padZerosLeft from './helpers/padZerosLeft';
17
+ import roundToNumDecimals from './helpers/roundToNumDecimals';
18
+ import sum from './helpers/sum';
19
+ import waitMs from './helpers/waitMs';
20
+ import getOrdinal from './helpers/getOrdinal';
21
+ import getTimeInfoInET from './helpers/getTimeInfoInET';
22
+ import startMinWait from './helpers/startMinWait';
23
+ import getHumanReadableDate from './helpers/getHumanReadableDate';
24
+ import getPartOfDay from './helpers/getPartOfDay';
25
+ import stringsToHumanReadableList from './helpers/stringsToHumanReadableList';
26
+ import onlyKeepLetters from './helpers/onlyKeepLetters';
27
+ import parallelLimit from './helpers/parallelLimit';
28
+ import getMonthName from './helpers/getMonthName';
29
+ import genCSV from './helpers/genCSV';
30
+ import extractProp from './helpers/extractProp';
31
+ import compareArraysByProp from './helpers/compareArraysByProp';
32
+ import getLocalTimeInfo from './helpers/getLocalTimeInfo';
33
+ import genCommaList from './helpers/genCommaList';
34
+ import validateEmail from './helpers/validators/validateEmail';
35
+ import validatePhoneNumber from './helpers/validators/validatePhoneNumber';
36
+ import validateString from './helpers/validators/validateString';
37
+ import idify from './helpers/idify';
38
+ import prefixWithAOrAn from './helpers/prefixWithAOrAn';
39
+ import everyAsync from './helpers/asyncArrayFunctions/everyAsync';
40
+ import filterAsync from './helpers/asyncArrayFunctions/filterAsync';
41
+ import forEachAsync from './helpers/asyncArrayFunctions/forEachAsync';
42
+ import mapAsync from './helpers/asyncArrayFunctions/mapAsync';
43
+ import someAsync from './helpers/asyncArrayFunctions/someAsync';
44
+ import capitalize from './helpers/capitalize';
45
+ import shuffleArray from './helpers/shuffleArray';
46
+ import getWordCount from './helpers/getWordCount';
47
+ import cloneDeep from './helpers/cloneDeep';
48
+ import getTimestampFromTimeInfoInET from './helpers/getTimestampFromTimeInfoInET';
49
+ import ParamType from './types/ParamType';
50
+ import DayOfWeek from './types/DayOfWeek';
51
+ import Log from './types/Log';
52
+ import LogType from './types/LogType';
53
+ import LogSource from './types/LogSource';
54
+ import LogAction from './types/LogAction';
55
+ import LogBuiltInMetadata from './types/LogBuiltInMetadata';
56
+ import LogMetadataType from './types/LogMetadataType';
57
+ import LogFunction from './types/LogFunction';
58
+ import LogTypeSpecificInfo from './types/Log/LogTypeSpecificInfo';
59
+ import LogMainInfo from './types/Log/LogMainInfo';
60
+ import LogSourceSpecificInfo from './types/Log/LogSourceSpecificInfo';
61
+ import LogLevel from './types/LogLevel';
62
+ import CommonKitErrorCode from './types/CommonKitErrorCode';
63
+ export { ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, LOG_REVIEW_ROUTE_PATH_PREFIX, LOG_ROUTE_PATH, LOG_REVIEW_STATUS_ROUTE, LOG_REVIEW_GET_LOGS_ROUTE, SELECT_ADMIN_CHECK_ROUTE, CommonKitErrorCode, ParamType, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, LogTypeSpecificInfo, LogMainInfo, LogSourceSpecificInfo, LogLevel, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, extractProp, compareArraysByProp, genCommaList, validateEmail, validatePhoneNumber, validateString, getLocalTimeInfo, idify, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, getWordCount, cloneDeep, getTimestampFromTimeInfoInET, };