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.
- package/.eslintrc.js +93 -0
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/lib/constants/DAY_IN_MS.d.ts +6 -0
- package/lib/constants/DAY_IN_MS.js +9 -0
- package/lib/constants/DAY_IN_MS.js.map +1 -0
- package/lib/constants/HOUR_IN_MS.d.ts +6 -0
- package/lib/constants/HOUR_IN_MS.js +9 -0
- package/lib/constants/HOUR_IN_MS.js.map +1 -0
- package/lib/constants/LOG_REVIEW_GET_LOGS_ROUTE.d.ts +6 -0
- package/lib/constants/LOG_REVIEW_GET_LOGS_ROUTE.js +13 -0
- package/lib/constants/LOG_REVIEW_GET_LOGS_ROUTE.js.map +1 -0
- package/lib/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.d.ts +6 -0
- package/lib/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.js +13 -0
- package/lib/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.js.map +1 -0
- package/lib/constants/LOG_REVIEW_STATUS_ROUTE.d.ts +7 -0
- package/lib/constants/LOG_REVIEW_STATUS_ROUTE.js +14 -0
- package/lib/constants/LOG_REVIEW_STATUS_ROUTE.js.map +1 -0
- package/lib/constants/LOG_ROUTE_PATH.d.ts +6 -0
- package/lib/constants/LOG_ROUTE_PATH.js +13 -0
- package/lib/constants/LOG_ROUTE_PATH.js.map +1 -0
- package/lib/constants/MINUTE_IN_MS.d.ts +6 -0
- package/lib/constants/MINUTE_IN_MS.js +9 -0
- package/lib/constants/MINUTE_IN_MS.js.map +1 -0
- package/lib/constants/ROUTE_PATH_PREFIX.d.ts +6 -0
- package/lib/constants/ROUTE_PATH_PREFIX.js +9 -0
- package/lib/constants/ROUTE_PATH_PREFIX.js.map +1 -0
- package/lib/constants/SELECT_ADMIN_CHECK_ROUTE.d.ts +6 -0
- package/lib/constants/SELECT_ADMIN_CHECK_ROUTE.js +9 -0
- package/lib/constants/SELECT_ADMIN_CHECK_ROUTE.js.map +1 -0
- package/lib/errors/ErrorWithCode.d.ts +9 -0
- package/lib/errors/ErrorWithCode.js +33 -0
- package/lib/errors/ErrorWithCode.js.map +1 -0
- package/lib/helpers/abbreviate.d.ts +10 -0
- package/lib/helpers/abbreviate.js +24 -0
- package/lib/helpers/abbreviate.js.map +1 -0
- package/lib/helpers/abbreviate.test.d.ts +5 -0
- package/lib/helpers/abbreviate.test.js +28 -0
- package/lib/helpers/abbreviate.test.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/everyAsync.d.ts +13 -0
- package/lib/helpers/asyncArrayFunctions/everyAsync.js +81 -0
- package/lib/helpers/asyncArrayFunctions/everyAsync.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/everyAsync.test.d.ts +1 -0
- package/lib/helpers/asyncArrayFunctions/everyAsync.test.js +219 -0
- package/lib/helpers/asyncArrayFunctions/everyAsync.test.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/filterAsync.d.ts +13 -0
- package/lib/helpers/asyncArrayFunctions/filterAsync.js +81 -0
- package/lib/helpers/asyncArrayFunctions/filterAsync.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/filterAsync.test.d.ts +1 -0
- package/lib/helpers/asyncArrayFunctions/filterAsync.test.js +244 -0
- package/lib/helpers/asyncArrayFunctions/filterAsync.test.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/forEachAsync.d.ts +10 -0
- package/lib/helpers/asyncArrayFunctions/forEachAsync.js +72 -0
- package/lib/helpers/asyncArrayFunctions/forEachAsync.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/forEachAsync.test.d.ts +1 -0
- package/lib/helpers/asyncArrayFunctions/forEachAsync.test.js +223 -0
- package/lib/helpers/asyncArrayFunctions/forEachAsync.test.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/mapAsync.d.ts +11 -0
- package/lib/helpers/asyncArrayFunctions/mapAsync.js +77 -0
- package/lib/helpers/asyncArrayFunctions/mapAsync.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/mapAsync.test.d.ts +1 -0
- package/lib/helpers/asyncArrayFunctions/mapAsync.test.js +219 -0
- package/lib/helpers/asyncArrayFunctions/mapAsync.test.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/someAsync.d.ts +13 -0
- package/lib/helpers/asyncArrayFunctions/someAsync.js +80 -0
- package/lib/helpers/asyncArrayFunctions/someAsync.js.map +1 -0
- package/lib/helpers/asyncArrayFunctions/someAsync.test.d.ts +1 -0
- package/lib/helpers/asyncArrayFunctions/someAsync.test.js +227 -0
- package/lib/helpers/asyncArrayFunctions/someAsync.test.js.map +1 -0
- package/lib/helpers/avg.d.ts +8 -0
- package/lib/helpers/avg.js +24 -0
- package/lib/helpers/avg.js.map +1 -0
- package/lib/helpers/avg.test.d.ts +5 -0
- package/lib/helpers/avg.test.js +25 -0
- package/lib/helpers/avg.test.js.map +1 -0
- package/lib/helpers/capitalize.d.ts +7 -0
- package/lib/helpers/capitalize.js +20 -0
- package/lib/helpers/capitalize.js.map +1 -0
- package/lib/helpers/ceilToNumDecimals.d.ts +9 -0
- package/lib/helpers/ceilToNumDecimals.js +15 -0
- package/lib/helpers/ceilToNumDecimals.js.map +1 -0
- package/lib/helpers/ceilToNumDecimals.test.d.ts +5 -0
- package/lib/helpers/ceilToNumDecimals.test.js +38 -0
- package/lib/helpers/ceilToNumDecimals.test.js.map +1 -0
- package/lib/helpers/cloneDeep.d.ts +8 -0
- package/lib/helpers/cloneDeep.js +15 -0
- package/lib/helpers/cloneDeep.js.map +1 -0
- package/lib/helpers/compareArraysByProp.d.ts +13 -0
- package/lib/helpers/compareArraysByProp.js +62 -0
- package/lib/helpers/compareArraysByProp.js.map +1 -0
- package/lib/helpers/compareArraysByProp.test.d.ts +5 -0
- package/lib/helpers/compareArraysByProp.test.js +140 -0
- package/lib/helpers/compareArraysByProp.test.js.map +1 -0
- package/lib/helpers/extractProp.d.ts +12 -0
- package/lib/helpers/extractProp.js +19 -0
- package/lib/helpers/extractProp.js.map +1 -0
- package/lib/helpers/extractProp.test.d.ts +5 -0
- package/lib/helpers/extractProp.test.js +36 -0
- package/lib/helpers/extractProp.test.js.map +1 -0
- package/lib/helpers/floorToNumDecimals.d.ts +9 -0
- package/lib/helpers/floorToNumDecimals.js +15 -0
- package/lib/helpers/floorToNumDecimals.js.map +1 -0
- package/lib/helpers/floorToNumDecimals.test.d.ts +5 -0
- package/lib/helpers/floorToNumDecimals.test.js +38 -0
- package/lib/helpers/floorToNumDecimals.test.js.map +1 -0
- package/lib/helpers/forceNumIntoBounds.d.ts +10 -0
- package/lib/helpers/forceNumIntoBounds.js +15 -0
- package/lib/helpers/forceNumIntoBounds.js.map +1 -0
- package/lib/helpers/forceNumIntoBounds.test.d.ts +5 -0
- package/lib/helpers/forceNumIntoBounds.test.js +34 -0
- package/lib/helpers/forceNumIntoBounds.test.js.map +1 -0
- package/lib/helpers/genCSV.d.ts +18 -0
- package/lib/helpers/genCSV.js +69 -0
- package/lib/helpers/genCSV.js.map +1 -0
- package/lib/helpers/genCSV.test.d.ts +5 -0
- package/lib/helpers/genCSV.test.js +75 -0
- package/lib/helpers/genCSV.test.js.map +1 -0
- package/lib/helpers/genCommaList.d.ts +12 -0
- package/lib/helpers/genCommaList.js +20 -0
- package/lib/helpers/genCommaList.js.map +1 -0
- package/lib/helpers/genCommaList.test.d.ts +1 -0
- package/lib/helpers/genCommaList.test.js +94 -0
- package/lib/helpers/genCommaList.test.js.map +1 -0
- package/lib/helpers/getHumanReadableDate.d.ts +8 -0
- package/lib/helpers/getHumanReadableDate.js +32 -0
- package/lib/helpers/getHumanReadableDate.js.map +1 -0
- package/lib/helpers/getHumanReadableDate.test.d.ts +5 -0
- package/lib/helpers/getHumanReadableDate.test.js +31 -0
- package/lib/helpers/getHumanReadableDate.test.js.map +1 -0
- package/lib/helpers/getLocalTimeInfo.d.ts +19 -0
- package/lib/helpers/getLocalTimeInfo.js +51 -0
- package/lib/helpers/getLocalTimeInfo.js.map +1 -0
- package/lib/helpers/getLocalTimeInfo.test.d.ts +6 -0
- package/lib/helpers/getLocalTimeInfo.test.js +50 -0
- package/lib/helpers/getLocalTimeInfo.test.js.map +1 -0
- package/lib/helpers/getMonthName.d.ts +14 -0
- package/lib/helpers/getMonthName.js +31 -0
- package/lib/helpers/getMonthName.js.map +1 -0
- package/lib/helpers/getMonthName.test.d.ts +5 -0
- package/lib/helpers/getMonthName.test.js +70 -0
- package/lib/helpers/getMonthName.test.js.map +1 -0
- package/lib/helpers/getOrdinal.d.ts +8 -0
- package/lib/helpers/getOrdinal.js +16 -0
- package/lib/helpers/getOrdinal.js.map +1 -0
- package/lib/helpers/getOrdinal.test.d.ts +5 -0
- package/lib/helpers/getOrdinal.test.js +74 -0
- package/lib/helpers/getOrdinal.test.js.map +1 -0
- package/lib/helpers/getPartOfDay.d.ts +7 -0
- package/lib/helpers/getPartOfDay.js +24 -0
- package/lib/helpers/getPartOfDay.js.map +1 -0
- package/lib/helpers/getPartOfDay.test.d.ts +5 -0
- package/lib/helpers/getPartOfDay.test.js +49 -0
- package/lib/helpers/getPartOfDay.test.js.map +1 -0
- package/lib/helpers/getTimeInfoInET.d.ts +21 -0
- package/lib/helpers/getTimeInfoInET.js +67 -0
- package/lib/helpers/getTimeInfoInET.js.map +1 -0
- package/lib/helpers/getTimeInfoInET.test.d.ts +5 -0
- package/lib/helpers/getTimeInfoInET.test.js +74 -0
- package/lib/helpers/getTimeInfoInET.test.js.map +1 -0
- package/lib/helpers/getTimestampFromTimeInfoInET.d.ts +20 -0
- package/lib/helpers/getTimestampFromTimeInfoInET.js +136 -0
- package/lib/helpers/getTimestampFromTimeInfoInET.js.map +1 -0
- package/lib/helpers/getWordCount.d.ts +10 -0
- package/lib/helpers/getWordCount.js +24 -0
- package/lib/helpers/getWordCount.js.map +1 -0
- package/lib/helpers/idify.d.ts +9 -0
- package/lib/helpers/idify.js +24 -0
- package/lib/helpers/idify.js.map +1 -0
- package/lib/helpers/onlyKeepLetters.d.ts +8 -0
- package/lib/helpers/onlyKeepLetters.js +13 -0
- package/lib/helpers/onlyKeepLetters.js.map +1 -0
- package/lib/helpers/padDecimalZeros.d.ts +10 -0
- package/lib/helpers/padDecimalZeros.js +30 -0
- package/lib/helpers/padDecimalZeros.js.map +1 -0
- package/lib/helpers/padZerosLeft.d.ts +9 -0
- package/lib/helpers/padZerosLeft.js +21 -0
- package/lib/helpers/padZerosLeft.js.map +1 -0
- package/lib/helpers/parallelLimit.d.ts +12 -0
- package/lib/helpers/parallelLimit.js +104 -0
- package/lib/helpers/parallelLimit.js.map +1 -0
- package/lib/helpers/prefixWithAOrAn.d.ts +10 -0
- package/lib/helpers/prefixWithAOrAn.js +28 -0
- package/lib/helpers/prefixWithAOrAn.js.map +1 -0
- package/lib/helpers/roundToNumDecimals.d.ts +9 -0
- package/lib/helpers/roundToNumDecimals.js +15 -0
- package/lib/helpers/roundToNumDecimals.js.map +1 -0
- package/lib/helpers/shuffleArray.d.ts +8 -0
- package/lib/helpers/shuffleArray.js +29 -0
- package/lib/helpers/shuffleArray.js.map +1 -0
- package/lib/helpers/startMinWait.d.ts +9 -0
- package/lib/helpers/startMinWait.js +79 -0
- package/lib/helpers/startMinWait.js.map +1 -0
- package/lib/helpers/stringsToHumanReadableList.d.ts +10 -0
- package/lib/helpers/stringsToHumanReadableList.js +37 -0
- package/lib/helpers/stringsToHumanReadableList.js.map +1 -0
- package/lib/helpers/sum.d.ts +8 -0
- package/lib/helpers/sum.js +15 -0
- package/lib/helpers/sum.js.map +1 -0
- package/lib/helpers/validators/ChicagoTitleCase.d.ts +9 -0
- package/lib/helpers/validators/ChicagoTitleCase.js +31 -0
- package/lib/helpers/validators/ChicagoTitleCase.js.map +1 -0
- package/lib/helpers/validators/ChicagoTitleCase.test.d.ts +0 -0
- package/lib/helpers/validators/ChicagoTitleCase.test.js +79 -0
- package/lib/helpers/validators/ChicagoTitleCase.test.js.map +1 -0
- package/lib/helpers/validators/findURL.d.ts +0 -0
- package/lib/helpers/validators/findURL.js +39 -0
- package/lib/helpers/validators/findURL.js.map +1 -0
- package/lib/helpers/validators/findURL.test.d.ts +0 -0
- package/lib/helpers/validators/findURL.test.js +77 -0
- package/lib/helpers/validators/findURL.test.js.map +1 -0
- package/lib/helpers/validators/shared/constants/ERROR_MESSAGES.d.ts +10 -0
- package/lib/helpers/validators/shared/constants/ERROR_MESSAGES.js +21 -0
- package/lib/helpers/validators/shared/constants/ERROR_MESSAGES.js.map +1 -0
- package/lib/helpers/validators/shared/helpers/validateRegex.d.ts +19 -0
- package/lib/helpers/validators/shared/helpers/validateRegex.js +34 -0
- package/lib/helpers/validators/shared/helpers/validateRegex.js.map +1 -0
- package/lib/helpers/validators/shared/types/ValidationResult.d.ts +12 -0
- package/lib/helpers/validators/shared/types/ValidationResult.js +3 -0
- package/lib/helpers/validators/shared/types/ValidationResult.js.map +1 -0
- package/lib/helpers/validators/validURL.d.ts +8 -0
- package/lib/helpers/validators/validURL.js +20 -0
- package/lib/helpers/validators/validURL.js.map +1 -0
- package/lib/helpers/validators/validURL.test.d.ts +0 -0
- package/lib/helpers/validators/validURL.test.js +83 -0
- package/lib/helpers/validators/validURL.test.js.map +1 -0
- package/lib/helpers/validators/validateEmail.d.ts +11 -0
- package/lib/helpers/validators/validateEmail.js +39 -0
- package/lib/helpers/validators/validateEmail.js.map +1 -0
- package/lib/helpers/validators/validateEmail.test.d.ts +1 -0
- package/lib/helpers/validators/validateEmail.test.js +140 -0
- package/lib/helpers/validators/validateEmail.test.js.map +1 -0
- package/lib/helpers/validators/validatePhoneNumber.d.ts +11 -0
- package/lib/helpers/validators/validatePhoneNumber.js +40 -0
- package/lib/helpers/validators/validatePhoneNumber.js.map +1 -0
- package/lib/helpers/validators/validatePhoneNumber.test.d.ts +1 -0
- package/lib/helpers/validators/validatePhoneNumber.test.js +123 -0
- package/lib/helpers/validators/validatePhoneNumber.test.js.map +1 -0
- package/lib/helpers/validators/validateString.d.ts +22 -0
- package/lib/helpers/validators/validateString.js +124 -0
- package/lib/helpers/validators/validateString.js.map +1 -0
- package/lib/helpers/validators/validateString.test.d.ts +1 -0
- package/lib/helpers/validators/validateString.test.js +163 -0
- package/lib/helpers/validators/validateString.test.js.map +1 -0
- package/lib/helpers/waitMs.d.ts +7 -0
- package/lib/helpers/waitMs.js +68 -0
- package/lib/helpers/waitMs.js.map +1 -0
- package/lib/index.d.ts +63 -0
- package/lib/index.js +124 -0
- package/lib/index.js.map +1 -0
- package/lib/types/CommonKitErrorCode.d.ts +10 -0
- package/lib/types/CommonKitErrorCode.js +15 -0
- package/lib/types/CommonKitErrorCode.js.map +1 -0
- package/lib/types/DayOfWeek.d.ts +14 -0
- package/lib/types/DayOfWeek.js +18 -0
- package/lib/types/DayOfWeek.js.map +1 -0
- package/lib/types/Log/LogMainInfo.d.ts +39 -0
- package/lib/types/Log/LogMainInfo.js +3 -0
- package/lib/types/Log/LogMainInfo.js.map +1 -0
- package/lib/types/Log/LogSourceSpecificInfo.d.ts +13 -0
- package/lib/types/Log/LogSourceSpecificInfo.js +3 -0
- package/lib/types/Log/LogSourceSpecificInfo.js.map +1 -0
- package/lib/types/Log/LogTypeSpecificInfo.d.ts +17 -0
- package/lib/types/Log/LogTypeSpecificInfo.js +3 -0
- package/lib/types/Log/LogTypeSpecificInfo.js.map +1 -0
- package/lib/types/Log/index.d.ts +10 -0
- package/lib/types/Log/index.js +3 -0
- package/lib/types/Log/index.js.map +1 -0
- package/lib/types/LogAction.d.ts +29 -0
- package/lib/types/LogAction.js +55 -0
- package/lib/types/LogAction.js.map +1 -0
- package/lib/types/LogBuiltInMetadata.d.ts +16 -0
- package/lib/types/LogBuiltInMetadata.js +21 -0
- package/lib/types/LogBuiltInMetadata.js.map +1 -0
- package/lib/types/LogFunction.d.ts +24 -0
- package/lib/types/LogFunction.js +3 -0
- package/lib/types/LogFunction.js.map +1 -0
- package/lib/types/LogLevel.d.ts +10 -0
- package/lib/types/LogLevel.js +14 -0
- package/lib/types/LogLevel.js.map +1 -0
- package/lib/types/LogMetadataContextMap.d.ts +11 -0
- package/lib/types/LogMetadataContextMap.js +3 -0
- package/lib/types/LogMetadataContextMap.js.map +1 -0
- package/lib/types/LogMetadataTagMap.d.ts +8 -0
- package/lib/types/LogMetadataTagMap.js +3 -0
- package/lib/types/LogMetadataTagMap.js.map +1 -0
- package/lib/types/LogMetadataTargetMap.d.ts +8 -0
- package/lib/types/LogMetadataTargetMap.js +3 -0
- package/lib/types/LogMetadataTargetMap.js.map +1 -0
- package/lib/types/LogMetadataType.d.ts +13 -0
- package/lib/types/LogMetadataType.js +3 -0
- package/lib/types/LogMetadataType.js.map +1 -0
- package/lib/types/LogSource.d.ts +9 -0
- package/lib/types/LogSource.js +15 -0
- package/lib/types/LogSource.js.map +1 -0
- package/lib/types/LogType.d.ts +9 -0
- package/lib/types/LogType.js +15 -0
- package/lib/types/LogType.js.map +1 -0
- package/lib/types/ParamType.d.ts +17 -0
- package/lib/types/ParamType.js +21 -0
- package/lib/types/ParamType.js.map +1 -0
- package/package.json +47 -0
- package/src/constants/DAY_IN_MS.ts +7 -0
- package/src/constants/HOUR_IN_MS.ts +7 -0
- package/src/constants/LOG_REVIEW_GET_LOGS_ROUTE.ts +9 -0
- package/src/constants/LOG_REVIEW_ROUTE_PATH_PREFIX.ts +9 -0
- package/src/constants/LOG_REVIEW_STATUS_ROUTE.ts +10 -0
- package/src/constants/LOG_ROUTE_PATH.ts +9 -0
- package/src/constants/MINUTE_IN_MS.ts +7 -0
- package/src/constants/ROUTE_PATH_PREFIX.ts +7 -0
- package/src/constants/SELECT_ADMIN_CHECK_ROUTE.ts +7 -0
- package/src/errors/ErrorWithCode.ts +15 -0
- package/src/helpers/abbreviate.test.ts +26 -0
- package/src/helpers/abbreviate.ts +25 -0
- package/src/helpers/asyncArrayFunctions/everyAsync.test.ts +114 -0
- package/src/helpers/asyncArrayFunctions/everyAsync.ts +51 -0
- package/src/helpers/asyncArrayFunctions/filterAsync.test.ts +126 -0
- package/src/helpers/asyncArrayFunctions/filterAsync.ts +50 -0
- package/src/helpers/asyncArrayFunctions/forEachAsync.test.ts +136 -0
- package/src/helpers/asyncArrayFunctions/forEachAsync.ts +40 -0
- package/src/helpers/asyncArrayFunctions/mapAsync.test.ts +125 -0
- package/src/helpers/asyncArrayFunctions/mapAsync.ts +46 -0
- package/src/helpers/asyncArrayFunctions/someAsync.test.ts +92 -0
- package/src/helpers/asyncArrayFunctions/someAsync.ts +49 -0
- package/src/helpers/avg.test.ts +24 -0
- package/src/helpers/avg.ts +22 -0
- package/src/helpers/capitalize.ts +20 -0
- package/src/helpers/ceilToNumDecimals.test.ts +39 -0
- package/src/helpers/ceilToNumDecimals.ts +13 -0
- package/src/helpers/cloneDeep.ts +11 -0
- package/src/helpers/compareArraysByProp.test.ts +147 -0
- package/src/helpers/compareArraysByProp.ts +56 -0
- package/src/helpers/extractProp.test.ts +34 -0
- package/src/helpers/extractProp.ts +17 -0
- package/src/helpers/floorToNumDecimals.test.ts +39 -0
- package/src/helpers/floorToNumDecimals.ts +13 -0
- package/src/helpers/forceNumIntoBounds.test.ts +34 -0
- package/src/helpers/forceNumIntoBounds.ts +19 -0
- package/src/helpers/genCSV.test.ts +77 -0
- package/src/helpers/genCSV.ts +87 -0
- package/src/helpers/genCommaList.test.ts +57 -0
- package/src/helpers/genCommaList.ts +21 -0
- package/src/helpers/getHumanReadableDate.test.ts +29 -0
- package/src/helpers/getHumanReadableDate.ts +36 -0
- package/src/helpers/getLocalTimeInfo.test.ts +48 -0
- package/src/helpers/getLocalTimeInfo.ts +58 -0
- package/src/helpers/getMonthName.test.ts +79 -0
- package/src/helpers/getMonthName.ts +29 -0
- package/src/helpers/getOrdinal.test.ts +84 -0
- package/src/helpers/getOrdinal.ts +14 -0
- package/src/helpers/getPartOfDay.test.ts +56 -0
- package/src/helpers/getPartOfDay.ts +20 -0
- package/src/helpers/getTimeInfoInET.test.ts +72 -0
- package/src/helpers/getTimeInfoInET.ts +79 -0
- package/src/helpers/getTimestampFromTimeInfoInET.ts +179 -0
- package/src/helpers/getWordCount.ts +26 -0
- package/src/helpers/idify.ts +24 -0
- package/src/helpers/onlyKeepLetters.ts +11 -0
- package/src/helpers/padDecimalZeros.ts +32 -0
- package/src/helpers/padZerosLeft.ts +21 -0
- package/src/helpers/parallelLimit.ts +63 -0
- package/src/helpers/prefixWithAOrAn.ts +29 -0
- package/src/helpers/roundToNumDecimals.ts +13 -0
- package/src/helpers/shuffleArray.ts +19 -0
- package/src/helpers/startMinWait.ts +33 -0
- package/src/helpers/stringsToHumanReadableList.ts +39 -0
- package/src/helpers/sum.ts +16 -0
- package/src/helpers/validators/ChicagoTitleCase.test.ts +85 -0
- package/src/helpers/validators/ChicagoTitleCase.ts +32 -0
- package/src/helpers/validators/findURL.test.ts +83 -0
- package/src/helpers/validators/findURL.ts +43 -0
- package/src/helpers/validators/shared/constants/ERROR_MESSAGES.ts +18 -0
- package/src/helpers/validators/shared/helpers/validateRegex.ts +47 -0
- package/src/helpers/validators/shared/types/ValidationResult.ts +20 -0
- package/src/helpers/validators/validURL.test.ts +90 -0
- package/src/helpers/validators/validURL.ts +18 -0
- package/src/helpers/validators/validateEmail.test.ts +110 -0
- package/src/helpers/validators/validateEmail.ts +47 -0
- package/src/helpers/validators/validatePhoneNumber.test.ts +94 -0
- package/src/helpers/validators/validatePhoneNumber.ts +49 -0
- package/src/helpers/validators/validateString.test.ts +173 -0
- package/src/helpers/validators/validateString.ts +171 -0
- package/src/helpers/waitMs.ts +12 -0
- package/src/index.ts +139 -0
- package/src/types/CommonKitErrorCode.ts +13 -0
- package/src/types/DayOfWeek.ts +15 -0
- package/src/types/Log/LogMainInfo.ts +69 -0
- package/src/types/Log/LogSourceSpecificInfo.ts +25 -0
- package/src/types/Log/LogTypeSpecificInfo.ts +33 -0
- package/src/types/Log/index.ts +17 -0
- package/src/types/LogAction.ts +52 -0
- package/src/types/LogBuiltInMetadata.ts +19 -0
- package/src/types/LogFunction.ts +46 -0
- package/src/types/LogLevel.ts +11 -0
- package/src/types/LogMetadataContextMap.ts +15 -0
- package/src/types/LogMetadataTagMap.ts +9 -0
- package/src/types/LogMetadataTargetMap.ts +9 -0
- package/src/types/LogMetadataType.ts +16 -0
- package/src/types/LogSource.ts +12 -0
- package/src/types/LogType.ts +12 -0
- package/src/types/ParamType.ts +18 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
/**
|
|
40
|
+
* Run tasks in parallel with a limit on how many tasks can execute at once.
|
|
41
|
+
* No guarantees are made about the order of task execution
|
|
42
|
+
* @author Gabe Abrams
|
|
43
|
+
* @param taskFunctions functions that start asynchronous tasks and optionally
|
|
44
|
+
* resolve with values
|
|
45
|
+
* @param [limit=no limit] maximum number of asynchronous tasks to permit to run at
|
|
46
|
+
* once
|
|
47
|
+
* @returns array of resolved values in the same order as the task functions
|
|
48
|
+
*/
|
|
49
|
+
var parallelLimit = function (taskFunctions, limit) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
+
var results;
|
|
51
|
+
return __generator(this, function (_a) {
|
|
52
|
+
switch (_a.label) {
|
|
53
|
+
case 0:
|
|
54
|
+
results = [];
|
|
55
|
+
// Wait until finished with all tasks
|
|
56
|
+
return [4 /*yield*/, new Promise(function (resolve) {
|
|
57
|
+
/* ------------- Helpers ------------ */
|
|
58
|
+
var nextTaskIndex = 0;
|
|
59
|
+
var numFinishedTasks = 0;
|
|
60
|
+
/**
|
|
61
|
+
* Start the next task
|
|
62
|
+
* @author Gabe Abrams
|
|
63
|
+
*/
|
|
64
|
+
var startTask = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
+
var taskIndex, taskFunction, result;
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
taskIndex = nextTaskIndex++;
|
|
70
|
+
taskFunction = taskFunctions[taskIndex];
|
|
71
|
+
if (!taskFunction) {
|
|
72
|
+
return [2 /*return*/];
|
|
73
|
+
}
|
|
74
|
+
return [4 /*yield*/, taskFunction()];
|
|
75
|
+
case 1:
|
|
76
|
+
result = _a.sent();
|
|
77
|
+
// Add results
|
|
78
|
+
results[taskIndex] = result;
|
|
79
|
+
// Tally and finish
|
|
80
|
+
if (++numFinishedTasks === taskFunctions.length) {
|
|
81
|
+
return [2 /*return*/, resolve()];
|
|
82
|
+
}
|
|
83
|
+
// Not finished! Start another task
|
|
84
|
+
startTask();
|
|
85
|
+
return [2 /*return*/];
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}); };
|
|
89
|
+
/* ----------- Start Tasks ---------- */
|
|
90
|
+
// If no limit, start all tasks. At least start 1 task
|
|
91
|
+
var numTasks = Math.max((limit || taskFunctions.length), 1);
|
|
92
|
+
for (var i = 0; i < numTasks; i++) {
|
|
93
|
+
startTask();
|
|
94
|
+
}
|
|
95
|
+
})];
|
|
96
|
+
case 1:
|
|
97
|
+
// Wait until finished with all tasks
|
|
98
|
+
_a.sent();
|
|
99
|
+
return [2 /*return*/, results];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}); };
|
|
103
|
+
exports.default = parallelLimit;
|
|
104
|
+
//# sourceMappingURL=parallelLimit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallelLimit.js","sourceRoot":"","sources":["../../src/helpers/parallelLimit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;GASG;AACH,IAAM,aAAa,GAAG,UACpB,aAAqC,EACrC,KAAc;;;;;gBAER,OAAO,GAAU,EAAE,CAAC;gBAE1B,qCAAqC;gBACrC,qBAAM,IAAI,OAAO,CAAO,UAAC,OAAO;wBAC9B,wCAAwC;wBAExC,IAAI,aAAa,GAAG,CAAC,CAAC;wBACtB,IAAI,gBAAgB,GAAG,CAAC,CAAC;wBACzB;;;2BAGG;wBACH,IAAM,SAAS,GAAG;;;;;wCACV,SAAS,GAAG,aAAa,EAAE,CAAC;wCAG5B,YAAY,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;wCAC9C,IAAI,CAAC,YAAY,EAAE,CAAC;4CAClB,sBAAO;wCACT,CAAC;wCAGc,qBAAM,YAAY,EAAE,EAAA;;wCAA7B,MAAM,GAAG,SAAoB;wCAEnC,cAAc;wCACd,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;wCAE5B,mBAAmB;wCACnB,IAAI,EAAE,gBAAgB,KAAK,aAAa,CAAC,MAAM,EAAE,CAAC;4CAChD,sBAAO,OAAO,EAAE,EAAC;wCACnB,CAAC;wCAED,mCAAmC;wCACnC,SAAS,EAAE,CAAC;;;;6BACb,CAAC;wBAEF,wCAAwC;wBAExC,sDAAsD;wBACtD,IAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;wBAC9D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;4BAClC,SAAS,EAAE,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,EAAA;;gBAzCF,qCAAqC;gBACrC,SAwCE,CAAC;gBAEH,sBAAO,OAAO,EAAC;;;KAChB,CAAC;AAEF,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prefix a word or name with "a" or "an" depending on whether it starts with a
|
|
3
|
+
* vowel or not
|
|
4
|
+
* @author Gabe Abrams
|
|
5
|
+
* @param text the text to prefix
|
|
6
|
+
* @param capitalize whether to capitalize the "A" or "An"
|
|
7
|
+
* @returns the text prefixed with "a" or "an"
|
|
8
|
+
*/
|
|
9
|
+
declare const prefixWithAOrAn: (text: string, capitalize?: boolean) => string;
|
|
10
|
+
export default prefixWithAOrAn;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// Constants
|
|
4
|
+
var VOWELS = ['a', 'e', 'i', 'o', 'u'];
|
|
5
|
+
/**
|
|
6
|
+
* Prefix a word or name with "a" or "an" depending on whether it starts with a
|
|
7
|
+
* vowel or not
|
|
8
|
+
* @author Gabe Abrams
|
|
9
|
+
* @param text the text to prefix
|
|
10
|
+
* @param capitalize whether to capitalize the "A" or "An"
|
|
11
|
+
* @returns the text prefixed with "a" or "an"
|
|
12
|
+
*/
|
|
13
|
+
var prefixWithAOrAn = function (text, capitalize) {
|
|
14
|
+
if (capitalize === void 0) { capitalize = false; }
|
|
15
|
+
// Get the first letter
|
|
16
|
+
var firstLetter = text.charAt(0).toLowerCase();
|
|
17
|
+
// Check if starts with vowel
|
|
18
|
+
var startsWithVowel = VOWELS.includes(firstLetter);
|
|
19
|
+
// Determine prefix
|
|
20
|
+
var prefix = startsWithVowel ? 'an' : 'a';
|
|
21
|
+
if (capitalize) {
|
|
22
|
+
prefix = prefix.charAt(0).toUpperCase() + prefix.substring(1);
|
|
23
|
+
}
|
|
24
|
+
// Return the text prefixed with "a" or "an"
|
|
25
|
+
return "".concat(prefix, " ").concat(text);
|
|
26
|
+
};
|
|
27
|
+
exports.default = prefixWithAOrAn;
|
|
28
|
+
//# sourceMappingURL=prefixWithAOrAn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefixWithAOrAn.js","sourceRoot":"","sources":["../../src/helpers/prefixWithAOrAn.ts"],"names":[],"mappings":";;AAAA,YAAY;AACZ,IAAM,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEzC;;;;;;;GAOG;AACH,IAAM,eAAe,GAAG,UAAC,IAAY,EAAE,UAAkB;IAAlB,2BAAA,EAAA,kBAAkB;IACvD,uBAAuB;IACvB,IAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAEjD,6BAA6B;IAC7B,IAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAErD,mBAAmB;IACnB,IAAI,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1C,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,4CAA4C;IAC5C,OAAO,UAAG,MAAM,cAAI,IAAI,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Round a number to a certain number of decimals
|
|
3
|
+
* @author Gabe Abrams
|
|
4
|
+
* @param num the number to round
|
|
5
|
+
* @param numDecimals the number of decimals to round to
|
|
6
|
+
* @returns rounded number
|
|
7
|
+
*/
|
|
8
|
+
declare const roundToNumDecimals: (num: number, numDecimals: number) => number;
|
|
9
|
+
export default roundToNumDecimals;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Round a number to a certain number of decimals
|
|
5
|
+
* @author Gabe Abrams
|
|
6
|
+
* @param num the number to round
|
|
7
|
+
* @param numDecimals the number of decimals to round to
|
|
8
|
+
* @returns rounded number
|
|
9
|
+
*/
|
|
10
|
+
var roundToNumDecimals = function (num, numDecimals) {
|
|
11
|
+
var rounder = Math.pow(10, numDecimals);
|
|
12
|
+
return (Math.round(num * rounder) / rounder);
|
|
13
|
+
};
|
|
14
|
+
exports.default = roundToNumDecimals;
|
|
15
|
+
//# sourceMappingURL=roundToNumDecimals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roundToNumDecimals.js","sourceRoot":"","sources":["../../src/helpers/roundToNumDecimals.ts"],"names":[],"mappings":";;AAAA;;;;;;GAMG;AACH,IAAM,kBAAkB,GAAG,UAAC,GAAW,EAAE,WAAmB;IAC1D,IAAM,OAAO,GAAG,SAAA,EAAE,EAAI,WAAW,CAAA,CAAC;IAClC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
/**
|
|
13
|
+
* Shuffle a given array
|
|
14
|
+
* @author Austen Money
|
|
15
|
+
* @param arr the array to shuffle
|
|
16
|
+
* @returns the shuffled array
|
|
17
|
+
*/
|
|
18
|
+
var shuffleArray = function (arr) {
|
|
19
|
+
var _a;
|
|
20
|
+
var newArr = __spreadArray([], arr, true);
|
|
21
|
+
// Shuffle using Durstenfeld algorithm
|
|
22
|
+
for (var i = arr.length - 1; i > 0; i--) {
|
|
23
|
+
var j = Math.floor(Math.random() * (i + 1));
|
|
24
|
+
_a = [newArr[j], newArr[i]], newArr[i] = _a[0], newArr[j] = _a[1];
|
|
25
|
+
}
|
|
26
|
+
return newArr;
|
|
27
|
+
};
|
|
28
|
+
exports.default = shuffleArray;
|
|
29
|
+
//# sourceMappingURL=shuffleArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shuffleArray.js","sourceRoot":"","sources":["../../src/helpers/shuffleArray.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;GAKG;AACH,IAAM,YAAY,GAAG,UAAI,GAAQ;;IAC/B,IAAM,MAAM,qBAAO,GAAG,OAAC,CAAC;IAExB,sCAAsC;IACtC,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9C,KAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAA9C,MAAM,CAAC,CAAC,CAAC,QAAA,EAAE,MAAM,CAAC,CAAC,CAAC,QAAA,CAA2B;IAClD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Start a dynamic wait, call the function once the operation has completed and
|
|
3
|
+
* the dynamic wait will continue waiting for the rest of the minimum time
|
|
4
|
+
* @author Gabe Abrams
|
|
5
|
+
* @param minWaitMs the minimum number of ms to wait
|
|
6
|
+
* @returns async function to call to finish the wait
|
|
7
|
+
*/
|
|
8
|
+
declare const startMinWait: (minWaitMs: number) => () => Promise<void>;
|
|
9
|
+
export default startMinWait;
|
|
@@ -0,0 +1,79 @@
|
|
|
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 other helpers
|
|
43
|
+
var waitMs_1 = __importDefault(require("./waitMs"));
|
|
44
|
+
/**
|
|
45
|
+
* Start a dynamic wait, call the function once the operation has completed and
|
|
46
|
+
* the dynamic wait will continue waiting for the rest of the minimum time
|
|
47
|
+
* @author Gabe Abrams
|
|
48
|
+
* @param minWaitMs the minimum number of ms to wait
|
|
49
|
+
* @returns async function to call to finish the wait
|
|
50
|
+
*/
|
|
51
|
+
var startMinWait = function (minWaitMs) {
|
|
52
|
+
var startTimestamp = Date.now();
|
|
53
|
+
/**
|
|
54
|
+
* Finish the remaining time to wait
|
|
55
|
+
* @author Gabe Abrams
|
|
56
|
+
*/
|
|
57
|
+
return function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
+
var endTimestamp, elapsedTimeMs, remainingTimeToWaitMs;
|
|
59
|
+
return __generator(this, function (_a) {
|
|
60
|
+
switch (_a.label) {
|
|
61
|
+
case 0:
|
|
62
|
+
endTimestamp = Date.now();
|
|
63
|
+
elapsedTimeMs = (endTimestamp - startTimestamp);
|
|
64
|
+
remainingTimeToWaitMs = minWaitMs - elapsedTimeMs;
|
|
65
|
+
if (remainingTimeToWaitMs <= 0) {
|
|
66
|
+
return [2 /*return*/];
|
|
67
|
+
}
|
|
68
|
+
// Perform wait
|
|
69
|
+
return [4 /*yield*/, (0, waitMs_1.default)(remainingTimeToWaitMs)];
|
|
70
|
+
case 1:
|
|
71
|
+
// Perform wait
|
|
72
|
+
_a.sent();
|
|
73
|
+
return [2 /*return*/];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}); };
|
|
77
|
+
};
|
|
78
|
+
exports.default = startMinWait;
|
|
79
|
+
//# sourceMappingURL=startMinWait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startMinWait.js","sourceRoot":"","sources":["../../src/helpers/startMinWait.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,oDAA8B;AAE9B;;;;;;GAMG;AACH,IAAM,YAAY,GAAG,UAAC,SAAiB;IACrC,IAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAElC;;;OAGG;IACH,OAAO;;;;;oBACC,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;oBAG1B,aAAa,GAAG,CAAC,YAAY,GAAG,cAAc,CAAC,CAAC;oBAChD,qBAAqB,GAAG,SAAS,GAAG,aAAa,CAAC;oBACxD,IAAI,qBAAqB,IAAI,CAAC,EAAE,CAAC;wBAC/B,sBAAO;oBACT,CAAC;oBAED,eAAe;oBACf,qBAAM,IAAA,gBAAM,EAAC,qBAAqB,CAAC,EAAA;;oBADnC,eAAe;oBACf,SAAmC,CAAC;;;;SACrC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a human readable list from an array of strings.
|
|
3
|
+
* For example, ['apple', 'orange'] becomes "apple and orange"
|
|
4
|
+
* and ['apple', 'orange', 'mango'] becomes "apple, orange, and mango"
|
|
5
|
+
* @author Gabe Abrams
|
|
6
|
+
* @param items list of items in the list
|
|
7
|
+
* @returns human-readable list
|
|
8
|
+
*/
|
|
9
|
+
declare const stringsToHumanReadableList: (items: string[]) => string;
|
|
10
|
+
export default stringsToHumanReadableList;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Create a human readable list from an array of strings.
|
|
5
|
+
* For example, ['apple', 'orange'] becomes "apple and orange"
|
|
6
|
+
* and ['apple', 'orange', 'mango'] becomes "apple, orange, and mango"
|
|
7
|
+
* @author Gabe Abrams
|
|
8
|
+
* @param items list of items in the list
|
|
9
|
+
* @returns human-readable list
|
|
10
|
+
*/
|
|
11
|
+
var stringsToHumanReadableList = function (items) {
|
|
12
|
+
// Handle 0-item case
|
|
13
|
+
if (items.length === 0) {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
// Handle 1-item case
|
|
17
|
+
if (items.length === 1) {
|
|
18
|
+
return items[0];
|
|
19
|
+
}
|
|
20
|
+
// Handle 2-item case
|
|
21
|
+
if (items.length === 2) {
|
|
22
|
+
return "".concat(items[0], " and ").concat(items[1]);
|
|
23
|
+
}
|
|
24
|
+
// Handle 3+ item case
|
|
25
|
+
var list = '';
|
|
26
|
+
items.forEach(function (item, i) {
|
|
27
|
+
if (i === items.length - 1) {
|
|
28
|
+
// Last item
|
|
29
|
+
list += ", and ".concat(item);
|
|
30
|
+
}
|
|
31
|
+
// Previous items
|
|
32
|
+
list += ", ".concat(item);
|
|
33
|
+
});
|
|
34
|
+
return list;
|
|
35
|
+
};
|
|
36
|
+
exports.default = stringsToHumanReadableList;
|
|
37
|
+
//# sourceMappingURL=stringsToHumanReadableList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringsToHumanReadableList.js","sourceRoot":"","sources":["../../src/helpers/stringsToHumanReadableList.ts"],"names":[],"mappings":";;AAAA;;;;;;;GAOG;AACH,IAAM,0BAA0B,GAAG,UAAC,KAAe;IACjD,qBAAqB;IACrB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,qBAAqB;IACrB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,qBAAqB;IACrB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,UAAG,KAAK,CAAC,CAAC,CAAC,kBAAQ,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC;IACvC,CAAC;IAED,sBAAsB;IACtB,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI,EAAE,CAAC;QACpB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,YAAY;YACZ,IAAI,IAAI,gBAAS,IAAI,CAAE,CAAC;QAC1B,CAAC;QAED,iBAAiB;QACjB,IAAI,IAAI,YAAK,IAAI,CAAE,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Sum the numbers in an array
|
|
5
|
+
* @author Gabe Abrams
|
|
6
|
+
* @param nums the numbers to sum
|
|
7
|
+
* @returns the sum of the numbers
|
|
8
|
+
*/
|
|
9
|
+
var sum = function (nums) {
|
|
10
|
+
return nums.reduce(function (a, b) {
|
|
11
|
+
return (a + b);
|
|
12
|
+
}, 0);
|
|
13
|
+
};
|
|
14
|
+
exports.default = sum;
|
|
15
|
+
//# sourceMappingURL=sum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sum.js","sourceRoot":"","sources":["../../src/helpers/sum.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,IAAM,GAAG,GAAG,UAAC,IAAc;IACzB,OAAO,IAAI,CAAC,MAAM,CAChB,UAAC,CAAS,EAAE,CAAS;QACnB,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjB,CAAC,EACD,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function converts a string to title case based on Chicago Title Case
|
|
3
|
+
* Style rules.
|
|
4
|
+
* @author Leisha Bhandari
|
|
5
|
+
* @param input: The input string that needs to be converted to Chicago title
|
|
6
|
+
* case.
|
|
7
|
+
* @returns Input string converted to title case
|
|
8
|
+
*/
|
|
9
|
+
declare const chicagoTitleCase: (input: string) => string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function converts a string to title case based on Chicago Title Case
|
|
3
|
+
* Style rules.
|
|
4
|
+
* @author Leisha Bhandari
|
|
5
|
+
* @param input: The input string that needs to be converted to Chicago title
|
|
6
|
+
* case.
|
|
7
|
+
* @returns Input string converted to title case
|
|
8
|
+
*/
|
|
9
|
+
var chicagoTitleCase = function (input) {
|
|
10
|
+
// List of lowercase words according to Chicago Manual of Style
|
|
11
|
+
var lowerCaseWords = [
|
|
12
|
+
'in', 'nor', 'of', 'on', 'or', 'as', 'at', 'but', 'by',
|
|
13
|
+
'for', 'if', 'so', 'the', 'a', 'an', 'and', 'to', 'up',
|
|
14
|
+
'yet'
|
|
15
|
+
];
|
|
16
|
+
return input
|
|
17
|
+
// Converts given input string to lowercase
|
|
18
|
+
.toLowerCase()
|
|
19
|
+
// Splits the given string into separate words
|
|
20
|
+
.split(' ')
|
|
21
|
+
.map(function (word, index, words) {
|
|
22
|
+
// Capitalize the first word, last word, and the words that aren't
|
|
23
|
+
// in lowerCaseWords
|
|
24
|
+
return index === 0 || !lowerCaseWords.includes(word) || index === words.length - 1
|
|
25
|
+
? "".concat(word.charAt(0).toUpperCase()).concat(word.slice(1)) // Capitalize the first letter
|
|
26
|
+
: word;
|
|
27
|
+
} // Nothing happens to the word
|
|
28
|
+
)
|
|
29
|
+
.join(' '); // Joins the words back
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=ChicagoTitleCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChicagoTitleCase.js","sourceRoot":"","sources":["../../../src/helpers/validators/ChicagoTitleCase.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,IAAM,gBAAgB,GAAG,UAAC,KAAa;IACpC,+DAA+D;IAChE,IAAM,cAAc,GAAa;QAC/B,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;QACtD,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI;QACtD,KAAK;KACN,CAAC;IAEF,OAAO,KAAK;QACV,2CAA2C;SAC1C,WAAW,EAAE;QACd,8CAA8C;SAC7C,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,IAAI,EAAE,KAAK,EAAE,KAAK;QACtB,kEAAkE;QAClE,oBAAoB;QACpB,OAAA,KAAK,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC;YACzE,CAAC,CAAC,UAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,SAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC,8BAA8B;YAClF,CAAC,CAAC,IAAI;IAFR,CAEQ,CAAC,8BAA8B;KACxC;SACA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,wBAAwB;AACxC,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Importing the testing function
|
|
2
|
+
// import chicagoTitleCase from './chicagoTitleCase';
|
|
3
|
+
// // Import constants
|
|
4
|
+
// import { INVALID_STRING_ERRORS, INVALID_REGEX_ERROR } from './shared/constants/ERROR_MESSAGES';
|
|
5
|
+
// /*------------------------------------------------------------------------*/
|
|
6
|
+
// /* ---------------------------- Valid Tests --------------------------- */
|
|
7
|
+
// /*------------------------------------------------------------------------*/
|
|
8
|
+
// const validTests: { input: string, expected: string }[] = [
|
|
9
|
+
// {
|
|
10
|
+
// input: 'this is the american language',
|
|
11
|
+
// expected: 'This the American language',
|
|
12
|
+
// },
|
|
13
|
+
// {
|
|
14
|
+
// input: 'to kill a mockingbird',
|
|
15
|
+
// expected: 'To Kill a Mockingbird',
|
|
16
|
+
// },
|
|
17
|
+
// {
|
|
18
|
+
// input: 'the lord of the rings',
|
|
19
|
+
// expected: 'The Lord of the Rings',
|
|
20
|
+
// },
|
|
21
|
+
// {
|
|
22
|
+
// input: 'pride and prejudice',
|
|
23
|
+
// expected: 'Pride and Prejudice',
|
|
24
|
+
// },
|
|
25
|
+
// {
|
|
26
|
+
// input: 'the road not taken',
|
|
27
|
+
// expected: 'The Road Not Taken',
|
|
28
|
+
// },
|
|
29
|
+
// ];
|
|
30
|
+
// test(
|
|
31
|
+
// 'Converts strings to Chicago title case correctly.',
|
|
32
|
+
// async () => {
|
|
33
|
+
// validTests.forEach(({ input, expected }) => {
|
|
34
|
+
// expect(chicagoTitleCase(input)).toBe(expected);
|
|
35
|
+
// });
|
|
36
|
+
// },
|
|
37
|
+
// );
|
|
38
|
+
// /*------------------------------------------------------------------------*/
|
|
39
|
+
// /* ---------------------------- Edge Cases ---------------------------- */
|
|
40
|
+
// /*------------------------------------------------------------------------*/
|
|
41
|
+
// const edgeCases: { input: string, expected: string }[] = [
|
|
42
|
+
// {
|
|
43
|
+
// input: 'x',
|
|
44
|
+
// expected: 'X',
|
|
45
|
+
// },
|
|
46
|
+
// {
|
|
47
|
+
// input: ' ',
|
|
48
|
+
// expected: ' ',
|
|
49
|
+
// },
|
|
50
|
+
// {
|
|
51
|
+
// input: '',
|
|
52
|
+
// expected: '',
|
|
53
|
+
// },
|
|
54
|
+
// {
|
|
55
|
+
// input: 'the',
|
|
56
|
+
// expected: 'The',
|
|
57
|
+
// },
|
|
58
|
+
// {
|
|
59
|
+
// input: 'THE ROAD NOT TAKEN',
|
|
60
|
+
// expected: 'The Road Not Taken',
|
|
61
|
+
// },
|
|
62
|
+
// {
|
|
63
|
+
// input: 'tO kiLL A mOckingBirD',
|
|
64
|
+
// expected: 'To Kill a Mockingbird',
|
|
65
|
+
// },
|
|
66
|
+
// {
|
|
67
|
+
// input: 'pRiDe And pReduJiCe',
|
|
68
|
+
// expected: 'Pride and Prejudice',
|
|
69
|
+
// },
|
|
70
|
+
// ];
|
|
71
|
+
// test(
|
|
72
|
+
// 'Handles the edge cases for the function that converts a string to Chicago Title Case.',
|
|
73
|
+
// async () => {
|
|
74
|
+
// edgeCases.forEach(({ input, expected }) => {
|
|
75
|
+
// expect(chicagoTitleCase(input)).toBe(expected);
|
|
76
|
+
// });
|
|
77
|
+
// },
|
|
78
|
+
// );
|
|
79
|
+
//# sourceMappingURL=ChicagoTitleCase.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChicagoTitleCase.test.js","sourceRoot":"","sources":["../../../src/helpers/validators/ChicagoTitleCase.test.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,qDAAqD;AAErD,sBAAsB;AACtB,kGAAkG;AAElG,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAE/E,8DAA8D;AAC9D,MAAM;AACN,8CAA8C;AAC9C,8CAA8C;AAC9C,OAAO;AACP,MAAM;AACN,sCAAsC;AACtC,yCAAyC;AACzC,OAAO;AACP,MAAM;AACN,sCAAsC;AACtC,yCAAyC;AACzC,OAAO;AACP,MAAM;AACN,oCAAoC;AACpC,uCAAuC;AACvC,OAAO;AACP,MAAM;AACN,mCAAmC;AACnC,sCAAsC;AACtC,OAAO;AACP,KAAK;AAEL,QAAQ;AACR,yDAAyD;AACzD,kBAAkB;AAClB,oDAAoD;AACpD,wDAAwD;AACxD,UAAU;AACV,OAAO;AACP,KAAK;AAEL,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAE/E,6DAA6D;AAC7D,MAAM;AACN,kBAAkB;AAClB,qBAAqB;AACrB,OAAO;AACP,MAAM;AACN,kBAAkB;AAClB,qBAAqB;AACrB,OAAO;AACP,MAAM;AACN,iBAAiB;AACjB,oBAAoB;AACpB,OAAO;AACP,MAAM;AACN,oBAAoB;AACpB,uBAAuB;AACvB,OAAO;AACP,MAAM;AACN,mCAAmC;AACnC,sCAAsC;AACtC,OAAO;AACP,MAAM;AACN,sCAAsC;AACtC,yCAAyC;AACzC,OAAO;AACP,MAAM;AACN,oCAAoC;AACpC,uCAAuC;AACvC,OAAO;AACP,KAAK;AAEL,QAAQ;AACR,6FAA6F;AAC7F,kBAAkB;AAClB,mDAAmD;AACnD,wDAAwD;AACxD,UAAU;AACV,OAAO;AACP,KAAK"}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// /**
|
|
2
|
+
// * This function finds URLs within a given string and returns an array of
|
|
3
|
+
// * their locations.
|
|
4
|
+
// * @author Leisha Bhandari
|
|
5
|
+
// * @param block: The block of text to search for URLs
|
|
6
|
+
// * @returns Arrays where each of them contain the start and end index of the URL
|
|
7
|
+
// */
|
|
8
|
+
// function findURLs(block: string): { start: number, end: number }[] {
|
|
9
|
+
// // Expression representing the skeleton of a URL to help match and find the
|
|
10
|
+
// // URLs within the block of text (Also takes care of Unicode characters)
|
|
11
|
+
// const urlSkeleton = /(https?:\/\/[^\s\u0000-\u001F.,]+[^\s\u0000-\u001F.,]?(?:\?[^\s\u0000-\u001F]+)?(?:#[^\s\u0000-\u001F]+)?)/g;
|
|
12
|
+
// const found: { start: number, end: number }[] = [];
|
|
13
|
+
// let match: RegExpExecArray | null;
|
|
14
|
+
// // While loop to find the URLs in the given block of texts using the URL
|
|
15
|
+
// // skeleton
|
|
16
|
+
// while ((match === urlSkeleton.exec(block))
|
|
17
|
+
// && match !== null) {
|
|
18
|
+
// // To find the beginning index of the URL
|
|
19
|
+
// let start = match.index;
|
|
20
|
+
// // To find the last index of the URL
|
|
21
|
+
// let end = match.index + match[0].length;
|
|
22
|
+
// // If statements to check whether the URL is followed by some kind of
|
|
23
|
+
// // punctuation mark
|
|
24
|
+
// if (block.charAt(end) === '.' || /[,;:!?"]/.test(block.charAt(end))) {
|
|
25
|
+
// end--;
|
|
26
|
+
// }
|
|
27
|
+
// // While statement to make sure that the URL does not start with a
|
|
28
|
+
// // punctuation mark
|
|
29
|
+
// while (start > 0 && /[.,:;!?]/.test(block.charAt(start - 1))) {
|
|
30
|
+
// start--;
|
|
31
|
+
// }
|
|
32
|
+
// // The object with start and end index of the URL is found and pushed to
|
|
33
|
+
// // the found array
|
|
34
|
+
// found.push({ start, end });
|
|
35
|
+
// }
|
|
36
|
+
// // Returns the array of the found URLs location
|
|
37
|
+
// return found;
|
|
38
|
+
// }
|
|
39
|
+
//# sourceMappingURL=findURL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findURL.js","sourceRoot":"","sources":["../../../src/helpers/validators/findURL.ts"],"names":[],"mappings":"AAAA,MAAM;AACN,6EAA6E;AAC7E,sBAAsB;AACtB,6BAA6B;AAC7B,wDAAwD;AACxD,mFAAmF;AACnF,MAAM;AACN,uEAAuE;AACvE,kFAAkF;AAClF,6EAA6E;AAC7E,uIAAuI;AACvI,wDAAwD;AACxD,uCAAuC;AAEvC,8EAA8E;AAC9E,gBAAgB;AAChB,gDAAgD;AAChD,gCAAgC;AAChC,gDAAgD;AAChD,+BAA+B;AAC/B,2CAA2C;AAC3C,+CAA+C;AAE/C,6EAA6E;AAC7E,0BAA0B;AAC1B,6EAA6E;AAC7E,eAAe;AACf,QAAQ;AAER,0EAA0E;AAC1E,0BAA0B;AAC1B,sEAAsE;AACtE,iBAAiB;AACjB,QAAQ;AAER,gFAAgF;AAChF,yBAAyB;AACzB,kCAAkC;AAClC,MAAM;AAEN,oDAAoD;AACpD,kBAAkB;AAClB,IAAI"}
|
|
File without changes
|