@8ms/helpers 1.39.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/deploy_npmjs.yml +29 -14
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.9.2.cjs +942 -0
- package/.yarnrc.yml +2 -0
- package/README.md +12 -0
- package/_class/BaseClass.d.ts +18 -0
- package/_class/BaseClass.js +53 -0
- package/_class/BaseNamespace.d.ts +9 -0
- package/_class/BaseNamespace.js +27 -0
- package/_class/index.d.ts +2 -0
- package/_class/index.js +7 -0
- package/adverity/getJobs.d.ts +15 -0
- package/adverity/getJobs.js +30 -0
- package/adverity/index.d.ts +112 -0
- package/adverity/index.js +61 -0
- package/api/ApiResponseClass.d.ts +35 -0
- package/api/ApiResponseClass.js +97 -0
- package/api/index.d.ts +14 -1
- package/api/index.js +41 -10
- package/array/index.d.ts +8 -0
- package/array/{getArray.js → index.js} +8 -2
- package/atInternet/index.d.ts +16 -0
- package/atInternet/index.js +18 -0
- package/aws/athenaExpress/AwsAthenaNamespace.d.ts +8 -0
- package/aws/athenaExpress/AwsAthenaNamespace.js +82 -0
- package/aws/athenaExpress/index.d.ts +10 -0
- package/aws/athenaExpress/index.js +40 -0
- package/aws/ec2/AwsEc2Namespace.d.ts +10 -0
- package/aws/ec2/AwsEc2Namespace.js +78 -0
- package/aws/ec2/index.d.ts +3 -0
- package/aws/ec2/index.js +16 -0
- package/aws/ecs/AwsEcsNamespace.d.ts +53 -0
- package/aws/ecs/AwsEcsNamespace.js +159 -0
- package/aws/ecs/index.d.ts +3 -0
- package/aws/ecs/index.js +16 -0
- package/aws/glue/AwsGlueNamespace.d.ts +12 -0
- package/aws/glue/AwsGlueNamespace.js +70 -0
- package/aws/glue/index.d.ts +3 -0
- package/aws/glue/index.js +16 -0
- package/aws/index.d.ts +9 -0
- package/aws/index.js +34 -0
- package/aws/isResponse200.d.ts +1 -4
- package/aws/isResponse200.js +5 -11
- package/aws/lambda/AwsLambdaNamespace.d.ts +21 -0
- package/aws/lambda/AwsLambdaNamespace.js +110 -0
- package/aws/lambda/index.d.ts +4 -0
- package/aws/lambda/index.js +21 -0
- package/aws/s3/AwsS3Namespace.d.ts +60 -0
- package/aws/s3/AwsS3Namespace.js +401 -0
- package/aws/s3/index.d.ts +25 -0
- package/aws/s3/index.js +36 -0
- package/aws/s3/payload.d.ts +42 -0
- package/aws/s3/payload.js +46 -0
- package/aws/ses/AwsSesNamespace.d.ts +18 -0
- package/{date/getYesterday.js → aws/ses/AwsSesNamespace.js} +34 -17
- package/aws/ses/SimpleEmail.d.ts +38 -33
- package/aws/ses/SimpleEmail.js +77 -85
- package/aws/ses/index.d.ts +4 -0
- package/aws/ses/index.js +18 -0
- package/aws/sqs/AwsSqsNamespace.d.ts +34 -0
- package/aws/sqs/AwsSqsNamespace.js +96 -0
- package/aws/sqs/index.d.ts +3 -0
- package/aws/sqs/index.js +16 -0
- package/aws/ssm/AwsSsmNamespace.d.ts +11 -0
- package/aws/ssm/AwsSsmNamespace.js +89 -0
- package/aws/ssm/index.d.ts +3 -0
- package/aws/ssm/index.js +16 -0
- package/axios/deleteRequest.d.ts +6 -0
- package/axios/{delete.js → deleteRequest.js} +10 -16
- package/axios/get.d.ts +2 -7
- package/axios/get.js +8 -15
- package/axios/index.d.ts +3 -0
- package/axios/index.js +9 -0
- package/axios/post.d.ts +2 -8
- package/axios/post.js +8 -14
- package/boolean/getBoolean.d.ts +1 -4
- package/boolean/getBoolean.js +10 -3
- package/boolean/index.d.ts +1 -0
- package/boolean/index.js +5 -0
- package/brightData/index.d.ts +15 -0
- package/brightData/index.js +20 -0
- package/brightData/serpApi/buildGoogleSerpUrl.d.ts +2 -2
- package/brightData/serpApi/buildGoogleSerpUrl.js +2 -1
- package/brightData/serpApi/buildGoogleTrendsUrl.d.ts +2 -2
- package/brightData/serpApi/buildGoogleTrendsUrl.js +2 -1
- package/brightData/serpApi/getAsyncRequestId.d.ts +3 -9
- package/brightData/serpApi/getAsyncRequestId.js +14 -28
- package/brightData/serpApi/getAsyncResults.d.ts +3 -8
- package/brightData/serpApi/getAsyncResults.js +14 -28
- package/brightData/serpApi/getRealtime.d.ts +2 -7
- package/brightData/serpApi/getRealtime.js +13 -18
- package/brightData/serpApi/index.d.ts +14 -0
- package/brightData/serpApi/index.js +23 -0
- package/brightData/webScraperIde/getBatch.d.ts +2 -9
- package/brightData/webScraperIde/getBatch.js +12 -18
- package/brightData/webScraperIde/getRealtime.d.ts +2 -8
- package/brightData/webScraperIde/getRealtime.js +18 -33
- package/brightData/webScraperIde/index.d.ts +2 -0
- package/brightData/webScraperIde/index.js +7 -0
- package/cache/index.d.ts +2 -0
- package/cache/index.js +48 -0
- package/cache/test/cache.test.js +10 -0
- package/crud/index.d.ts +1 -1
- package/crud/index.js +8 -8
- package/crypto/getDecrypt.d.ts +1 -6
- package/crypto/getDecrypt.js +37 -3
- package/crypto/getEncrypt.d.ts +1 -6
- package/crypto/getEncrypt.js +37 -3
- package/crypto/getRandom.d.ts +1 -5
- package/crypto/getRandom.js +3 -3
- package/crypto/getSha256.d.ts +1 -4
- package/crypto/getSha256.js +39 -8
- package/crypto/index.d.ts +4 -0
- package/crypto/index.js +11 -0
- package/date/calculation.d.ts +75 -0
- package/date/calculation.js +207 -0
- package/date/financialYear.d.ts +19 -0
- package/date/financialYear.js +85 -0
- package/date/format.d.ts +66 -8
- package/date/format.js +148 -19
- package/date/index.d.ts +28 -48
- package/date/index.js +53 -32
- package/environment/index.d.ts +23 -0
- package/environment/index.js +79 -1
- package/eskimi/getAgeGroup.d.ts +1 -4
- package/eskimi/getAgeGroup.js +6 -8
- package/eskimi/getData.d.ts +1 -5
- package/eskimi/getData.js +9 -15
- package/eskimi/getDevice.d.ts +1 -4
- package/eskimi/getDevice.js +6 -8
- package/eskimi/getGender.d.ts +1 -4
- package/eskimi/getGender.js +6 -8
- package/eskimi/index.d.ts +49 -0
- package/eskimi/index.js +96 -0
- package/file/createDirectory.d.ts +1 -5
- package/file/createDirectory.js +38 -4
- package/file/index.d.ts +1 -0
- package/file/index.js +5 -0
- package/geo/countries.d.ts +12 -0
- package/geo/countries.js +222 -0
- package/geo/index.d.ts +2 -0
- package/geo/index.js +7 -0
- package/geo/languages.d.ts +9 -0
- package/geo/languages.js +58 -0
- package/google/bigQuery/GoogleBigQueryNamespace.d.ts +51 -0
- package/google/bigQuery/GoogleBigQueryNamespace.js +165 -0
- package/google/bigQuery/index.d.ts +5 -0
- package/google/bigQuery/index.js +37 -0
- package/google/bigQuery/loadData.d.ts +6 -5
- package/google/bigQuery/loadData.js +8 -22
- package/google/{getConfig.d.ts → index.d.ts} +13 -6
- package/google/index.js +24 -0
- package/google/sheets/GoogleSheetsNamespace.d.ts +16 -0
- package/google/sheets/GoogleSheetsNamespace.js +81 -0
- package/google/sheets/getAssociatedData.d.ts +5 -11
- package/google/sheets/getAssociatedData.js +13 -23
- package/google/sheets/index.d.ts +8 -0
- package/google/sheets/index.js +37 -0
- package/google/storage/GoogleCloudStorageNamespace.d.ts +20 -0
- package/google/storage/GoogleCloudStorageNamespace.js +108 -0
- package/google/storage/index.d.ts +3 -0
- package/google/storage/index.js +30 -0
- package/googleAds/GoogleAdsNamespace.d.ts +11 -0
- package/googleAds/GoogleAdsNamespace.js +73 -0
- package/googleAds/index.d.ts +11 -0
- package/googleAds/index.js +30 -0
- package/googleAds/keywordPlanner/index.d.ts +36 -234
- package/googleAds/keywordPlanner/index.js +52 -237
- package/googlePageSpeed/GooglePageSpeedNamespace.d.ts +11 -0
- package/googlePageSpeed/GooglePageSpeedNamespace.js +35 -0
- package/googlePageSpeed/index.d.ts +17 -0
- package/googlePageSpeed/index.js +44 -0
- package/googleSearchIncidents/index.d.ts +69 -0
- package/googleSearchIncidents/index.js +46 -0
- package/greenDomain/index.d.ts +21 -0
- package/greenDomain/index.js +41 -0
- package/inngest/index.d.ts +6 -0
- package/inngest/index.js +10 -0
- package/json/getJsonNewline.d.ts +1 -5
- package/json/getJsonNewline.js +5 -9
- package/json/index.d.ts +2 -0
- package/json/index.js +7 -0
- package/json/isJson.d.ts +1 -8
- package/json/isJson.js +18 -12
- package/littleWarden/LittleWardenNamespace.d.ts +11 -0
- package/littleWarden/LittleWardenNamespace.js +38 -0
- package/littleWarden/getUrlStatus.d.ts +1 -6
- package/littleWarden/getUrlStatus.js +8 -13
- package/littleWarden/index.d.ts +25 -1
- package/littleWarden/index.js +72 -7
- package/lumar/api/buildRequest.d.ts +3 -5
- package/lumar/api/buildRequest.js +40 -43
- package/lumar/api/getData.d.ts +2 -3
- package/lumar/api/getData.js +6 -11
- package/lumar/api/index.d.ts +36 -0
- package/lumar/api/index.js +33 -0
- package/lumar/api/initClient.d.ts +1 -8
- package/lumar/api/initClient.js +17 -29
- package/lumar/graphql/columns.d.ts +1 -2
- package/lumar/graphql/columns.js +2 -2
- package/lumar/graphql/getData.d.ts +1 -9
- package/lumar/graphql/getData.js +13 -19
- package/lumar/graphql/index.d.ts +29 -0
- package/lumar/graphql/index.js +39 -0
- package/lumar/graphql/initClient.d.ts +1 -8
- package/lumar/graphql/initClient.js +17 -30
- package/lumar/graphql/queries/getReportDifferences.js +2 -5
- package/lumar/graphql/reportTemplates.d.ts +1 -2
- package/lumar/graphql/reportTemplates.js +2 -2
- package/myTarget/request.d.ts +2 -6
- package/myTarget/request.js +8 -14
- package/nextAuth/index.d.ts +2 -1
- package/nextAuth/index.js +9 -7
- package/nextAuth/isSessionReady.d.ts +1 -4
- package/nextAuth/isSessionReady.js +3 -2
- package/nextJs/getIp.d.ts +1 -2
- package/nextJs/getIp.js +2 -1
- package/nextJs/getUserAgent.d.ts +1 -2
- package/nextJs/getUserAgent.js +2 -1
- package/nextJs/index.d.ts +2 -0
- package/nextJs/index.js +7 -0
- package/number/format.d.ts +4 -3
- package/number/format.js +12 -15
- package/number/{getCurrency.d.ts → formatCurrency.d.ts} +1 -6
- package/number/{getCurrency.js → formatCurrency.js} +7 -6
- package/number/getDecimal.d.ts +1 -6
- package/number/getDecimal.js +6 -10
- package/number/getNumber.d.ts +1 -5
- package/number/getNumber.js +30 -33
- package/number/getPercentIncrease.d.ts +1 -7
- package/number/getPercentIncrease.js +6 -12
- package/number/{getDivide.d.ts → getSafeDivide.d.ts} +3 -3
- package/number/getSafeDivide.js +20 -0
- package/number/index.d.ts +6 -0
- package/number/index.js +15 -0
- package/object/index.d.ts +1 -0
- package/object/index.js +5 -0
- package/object/replaceKeys.d.ts +1 -6
- package/object/replaceKeys.js +5 -10
- package/onePassword/OnePasswordNamespace.d.ts +13 -0
- package/onePassword/OnePasswordNamespace.js +81 -0
- package/onePassword/index.d.ts +7 -0
- package/onePassword/index.js +25 -0
- package/openAi/OpenAiNamespace.d.ts +11 -0
- package/openAi/OpenAiNamespace.js +44 -0
- package/openAi/index.d.ts +5 -0
- package/openAi/index.js +30 -0
- package/package.json +175 -46
- package/prisma/PrismaNamespace.d.ts +8 -0
- package/prisma/PrismaNamespace.js +79 -0
- package/prisma/getDecimal.d.ts +1 -6
- package/prisma/getDecimal.js +8 -10
- package/prisma/index.d.ts +8 -0
- package/prisma/index.js +29 -0
- package/snapchat/SnapchatNamespace.d.ts +15 -0
- package/snapchat/SnapchatNamespace.js +30 -0
- package/snapchat/index.d.ts +7 -0
- package/snapchat/index.js +30 -0
- package/sorting/byNumberAscending.d.ts +1 -5
- package/sorting/byNumberAscending.js +11 -9
- package/sorting/byNumberDescending.d.ts +1 -5
- package/sorting/byNumberDescending.js +13 -8
- package/sorting/byStringAscending.d.ts +1 -5
- package/sorting/byStringAscending.js +6 -11
- package/sorting/byStringDescending.d.ts +1 -5
- package/sorting/byStringDescending.js +6 -11
- package/sorting/index.d.ts +4 -0
- package/sorting/index.js +11 -0
- package/stream/index.d.ts +1 -0
- package/stream/index.js +5 -0
- package/stream/sort.d.ts +2 -3
- package/stream/sort.js +3 -2
- package/string/getCapitalised.d.ts +1 -6
- package/string/getCapitalised.js +5 -4
- package/string/getClean.d.ts +3 -3
- package/string/getClean.js +30 -44
- package/string/getFolder.d.ts +1 -5
- package/string/getFolder.js +4 -3
- package/string/getProperCase.d.ts +4 -4
- package/string/getProperCase.js +10 -12
- package/string/getString.d.ts +1 -4
- package/string/getString.js +8 -8
- package/string/getStringFromStream.d.ts +1 -4
- package/string/getStringFromStream.js +7 -6
- package/string/{getDecoded.d.ts → getUnescaped.d.ts} +1 -5
- package/string/{getDecoded.js → getUnescaped.js} +5 -5
- package/string/getWithoutAccents.d.ts +1 -5
- package/string/getWithoutAccents.js +4 -7
- package/string/getWithoutHtmlTags.d.ts +1 -5
- package/string/getWithoutHtmlTags.js +5 -8
- package/string/getWithoutPunctuation.d.ts +1 -5
- package/string/getWithoutPunctuation.js +6 -9
- package/string/getWithoutUnderscores.d.ts +1 -5
- package/string/getWithoutUnderscores.js +5 -8
- package/string/getWithoutWhitespaces.d.ts +1 -5
- package/string/getWithoutWhitespaces.js +5 -8
- package/string/index.d.ts +12 -0
- package/string/index.js +27 -0
- package/swr/index.d.ts +42 -0
- package/swr/index.js +59 -0
- package/upTimeRobot/UpTimeRobotNamespace.d.ts +31 -0
- package/upTimeRobot/UpTimeRobotNamespace.js +52 -0
- package/upTimeRobot/index.d.ts +38 -0
- package/upTimeRobot/index.js +63 -0
- package/url/index.d.ts +19 -0
- package/url/index.js +70 -0
- package/url/writeUrlContents.d.ts +1 -6
- package/url/writeUrlContents.js +41 -9
- package/util/defaultTo.d.ts +1 -7
- package/util/defaultTo.js +10 -9
- package/util/getBrotliCompressed.d.ts +2 -6
- package/util/getBrotliCompressed.js +10 -6
- package/util/getBrotliDecompressed.d.ts +2 -6
- package/util/getBrotliDecompressed.js +9 -5
- package/util/getClean.d.ts +3 -3
- package/util/getClean.js +12 -17
- package/util/getGzipCompressed.d.ts +2 -6
- package/util/getGzipCompressed.js +10 -6
- package/util/getGzipDecompressed.d.ts +2 -6
- package/util/getGzipDecompressed.js +11 -7
- package/util/getWithoutHash.d.ts +1 -5
- package/util/getWithoutHash.js +5 -4
- package/util/getWithoutParameter.d.ts +1 -5
- package/util/getWithoutParameter.js +5 -4
- package/util/index.d.ts +11 -0
- package/util/index.js +25 -0
- package/util/isUndefined.d.ts +1 -6
- package/util/isUndefined.js +6 -12
- package/util/promiseChunks.d.ts +1 -6
- package/util/promiseChunks.js +4 -3
- package/util/sleep.d.ts +1 -5
- package/util/sleep.js +4 -3
- package/webWorker/index.d.ts +1 -1
- package/webWorker/index.js +7 -7
- package/xml/getXml.d.ts +1 -5
- package/xml/getXml.js +5 -9
- package/api/ApiResponse.d.ts +0 -50
- package/api/ApiResponse.js +0 -94
- package/api/isError.d.ts +0 -6
- package/api/isError.js +0 -7
- package/api/isSuccess.d.ts +0 -6
- package/api/isSuccess.js +0 -7
- package/api/response.d.ts +0 -8
- package/api/response.js +0 -9
- package/array/contains.d.ts +0 -9
- package/array/contains.js +0 -7
- package/array/getArray.d.ts +0 -8
- package/atInternet/request.d.ts +0 -30
- package/atInternet/request.js +0 -2
- package/aws/athenaExpress/initClient.d.ts +0 -12
- package/aws/athenaExpress/initClient.js +0 -31
- package/aws/athenaExpress/query.d.ts +0 -8
- package/aws/athenaExpress/query.js +0 -16
- package/aws/ec2/initClient.d.ts +0 -11
- package/aws/ec2/initClient.js +0 -23
- package/aws/ec2/startInstances.d.ts +0 -11
- package/aws/ec2/startInstances.js +0 -18
- package/aws/ec2/stopInstances.d.ts +0 -12
- package/aws/ec2/stopInstances.js +0 -19
- package/aws/ecs/getClusters.d.ts +0 -9
- package/aws/ecs/getClusters.js +0 -32
- package/aws/ecs/getTaskDefinitions.d.ts +0 -13
- package/aws/ecs/getTaskDefinitions.js +0 -35
- package/aws/ecs/getTasks.d.ts +0 -16
- package/aws/ecs/getTasks.js +0 -38
- package/aws/ecs/initClient.d.ts +0 -11
- package/aws/ecs/initClient.js +0 -23
- package/aws/ecs/runTask.d.ts +0 -16
- package/aws/ecs/runTask.js +0 -30
- package/aws/getConfig.d.ts +0 -13
- package/aws/getConfig.js +0 -27
- package/aws/glue/initClient.d.ts +0 -10
- package/aws/glue/initClient.js +0 -21
- package/aws/glue/invoke.d.ts +0 -9
- package/aws/glue/invoke.js +0 -23
- package/aws/lambda/getHandlerPath.d.ts +0 -5
- package/aws/lambda/getHandlerPath.js +0 -7
- package/aws/lambda/initClient.d.ts +0 -10
- package/aws/lambda/initClient.js +0 -21
- package/aws/lambda/invoke.d.ts +0 -13
- package/aws/lambda/invoke.js +0 -61
- package/aws/s3/copyFile.d.ts +0 -13
- package/aws/s3/copyFile.js +0 -14
- package/aws/s3/deleteFile.d.ts +0 -9
- package/aws/s3/deleteFile.js +0 -13
- package/aws/s3/deleteFiles.d.ts +0 -9
- package/aws/s3/deleteFiles.js +0 -17
- package/aws/s3/deleteFolder.d.ts +0 -9
- package/aws/s3/deleteFolder.js +0 -36
- package/aws/s3/getGlueJson.d.ts +0 -8
- package/aws/s3/getGlueJson.js +0 -11
- package/aws/s3/getPresignedPost.d.ts +0 -20
- package/aws/s3/getPresignedPost.js +0 -19
- package/aws/s3/getSignedUrl.d.ts +0 -12
- package/aws/s3/getSignedUrl.js +0 -17
- package/aws/s3/initClient.d.ts +0 -10
- package/aws/s3/initClient.js +0 -19
- package/aws/s3/isFileExists.d.ts +0 -9
- package/aws/s3/isFileExists.js +0 -27
- package/aws/s3/listFiles.d.ts +0 -9
- package/aws/s3/listFiles.js +0 -33
- package/aws/s3/listFilesIteratively.d.ts +0 -9
- package/aws/s3/listFilesIteratively.js +0 -44
- package/aws/s3/listFolders.d.ts +0 -9
- package/aws/s3/listFolders.js +0 -32
- package/aws/s3/moveFile.d.ts +0 -10
- package/aws/s3/moveFile.js +0 -21
- package/aws/s3/readBrotli.d.ts +0 -11
- package/aws/s3/readBrotli.js +0 -28
- package/aws/s3/readBuffer.d.ts +0 -13
- package/aws/s3/readBuffer.js +0 -39
- package/aws/s3/readFile.d.ts +0 -31
- package/aws/s3/readFile.js +0 -83
- package/aws/s3/readGzip.d.ts +0 -11
- package/aws/s3/readGzip.js +0 -28
- package/aws/s3/writeBrotli.d.ts +0 -12
- package/aws/s3/writeBrotli.js +0 -28
- package/aws/s3/writeFile.d.ts +0 -11
- package/aws/s3/writeFile.js +0 -16
- package/aws/s3/writeGzip.d.ts +0 -12
- package/aws/s3/writeGzip.js +0 -28
- package/aws/s3/writePresignedPost.d.ts +0 -14
- package/aws/s3/writePresignedPost.js +0 -31
- package/aws/s3/writeUrlContents.d.ts +0 -10
- package/aws/s3/writeUrlContents.js +0 -26
- package/aws/s3cache/getCache.d.ts +0 -11
- package/aws/s3cache/getCache.js +0 -37
- package/aws/s3cache/getKey.d.ts +0 -10
- package/aws/s3cache/getKey.js +0 -18
- package/aws/s3cache/index.d.ts +0 -6
- package/aws/s3cache/index.js +0 -2
- package/aws/s3cache/saveCache.d.ts +0 -10
- package/aws/s3cache/saveCache.js +0 -17
- package/aws/s3cache/updateCache.d.ts +0 -10
- package/aws/s3cache/updateCache.js +0 -24
- package/aws/ses/initClient.d.ts +0 -10
- package/aws/ses/initClient.js +0 -19
- package/aws/sqs/addToQueue.d.ts +0 -27
- package/aws/sqs/addToQueue.js +0 -26
- package/aws/sqs/deleteFromQueue.d.ts +0 -10
- package/aws/sqs/deleteFromQueue.js +0 -15
- package/aws/sqs/initClient.d.ts +0 -10
- package/aws/sqs/initClient.js +0 -19
- package/aws/sqs/isEventSqs.js +0 -13
- package/aws/ssm/getParameter.d.ts +0 -10
- package/aws/ssm/getParameter.js +0 -40
- package/aws/ssm/initClient.d.ts +0 -10
- package/aws/ssm/initClient.js +0 -19
- package/axios/delete.d.ts +0 -11
- package/brightData/getCustomerId.d.ts +0 -10
- package/brightData/getCustomerId.js +0 -11
- package/brightData/getZone.d.ts +0 -9
- package/brightData/getZone.js +0 -10
- package/brightData/param.d.ts +0 -9
- package/brightData/param.js +0 -3
- package/brightData/serpApi/type.d.ts +0 -11
- package/brightData/serpApi/type.js +0 -14
- package/class/BaseClass.d.ts +0 -31
- package/class/BaseClass.js +0 -50
- package/date/getDate.d.ts +0 -14
- package/date/getDate.js +0 -138
- package/date/getDatesBetween.d.ts +0 -13
- package/date/getDatesBetween.js +0 -54
- package/date/getDurationHours.d.ts +0 -9
- package/date/getDurationHours.js +0 -24
- package/date/getDurationMinutes.d.ts +0 -9
- package/date/getDurationMinutes.js +0 -22
- package/date/getFinancialYear.d.ts +0 -9
- package/date/getFinancialYear.js +0 -52
- package/date/getFinancialYearToDate.d.ts +0 -7
- package/date/getFinancialYearToDate.js +0 -20
- package/date/getFinancialYearToYesterday.d.ts +0 -7
- package/date/getFinancialYearToYesterday.js +0 -20
- package/date/getFinancialYearWeeks.d.ts +0 -9
- package/date/getFinancialYearWeeks.js +0 -33
- package/date/getLastWeek.d.ts +0 -10
- package/date/getLastWeek.js +0 -34
- package/date/getMax.d.ts +0 -13
- package/date/getMax.js +0 -24
- package/date/getMidnight.d.ts +0 -10
- package/date/getMidnight.js +0 -13
- package/date/getMin.d.ts +0 -13
- package/date/getMin.js +0 -24
- package/date/getMonday.d.ts +0 -15
- package/date/getMonday.js +0 -46
- package/date/getNumber.d.ts +0 -7
- package/date/getNumber.js +0 -20
- package/date/getPredefinedTimeframe.d.ts +0 -8
- package/date/getPredefinedTimeframe.js +0 -24
- package/date/getSunday.d.ts +0 -15
- package/date/getSunday.js +0 -42
- package/date/getThisWeek.d.ts +0 -10
- package/date/getThisWeek.js +0 -36
- package/date/getTimeZoned.d.ts +0 -13
- package/date/getTimeZoned.js +0 -55
- package/date/getToday.d.ts +0 -9
- package/date/getToday.js +0 -24
- package/date/getTodayYmd.d.ts +0 -5
- package/date/getTodayYmd.js +0 -21
- package/date/getTodayYmdhis.d.ts +0 -5
- package/date/getTodayYmdhis.js +0 -21
- package/date/getTwoWeeksAgo.d.ts +0 -10
- package/date/getTwoWeeksAgo.js +0 -36
- package/date/getWeeksAgo.d.ts +0 -13
- package/date/getWeeksAgo.js +0 -25
- package/date/getYesterday.d.ts +0 -9
- package/date/isDateValid.d.ts +0 -7
- package/date/isDateValid.js +0 -20
- package/date/isLastWeek.d.ts +0 -6
- package/date/isLastWeek.js +0 -14
- package/date/isThisWeek.d.ts +0 -6
- package/date/isThisWeek.js +0 -14
- package/date/parseExcelDate.d.ts +0 -8
- package/date/parseExcelDate.js +0 -19
- package/environment/getEnvironment.d.ts +0 -6
- package/environment/getEnvironment.js +0 -43
- package/environment/isAws.d.ts +0 -5
- package/environment/isAws.js +0 -8
- package/environment/isDevelopment.d.ts +0 -2
- package/environment/isDevelopment.js +0 -9
- package/environment/isLocalhost.d.ts +0 -5
- package/environment/isLocalhost.js +0 -25
- package/environment/isProduction.d.ts +0 -2
- package/environment/isProduction.js +0 -9
- package/environment/isStaging.d.ts +0 -2
- package/environment/isStaging.js +0 -9
- package/environment/isVercel.d.ts +0 -5
- package/environment/isVercel.js +0 -7
- package/eskimi/ageGroups.d.ts +0 -5
- package/eskimi/ageGroups.js +0 -41
- package/eskimi/campaign.d.ts +0 -19
- package/eskimi/campaign.js +0 -2
- package/eskimi/devices.d.ts +0 -5
- package/eskimi/devices.js +0 -13
- package/eskimi/endpoints.d.ts +0 -16
- package/eskimi/endpoints.js +0 -18
- package/eskimi/genders.d.ts +0 -5
- package/eskimi/genders.js +0 -13
- package/eskimi/getAccessToken.d.ts +0 -9
- package/eskimi/getAccessToken.js +0 -23
- package/eskimi/getCampaignIds.d.ts +0 -7
- package/eskimi/getCampaignIds.js +0 -12
- package/file/writeFile.d.ts +0 -1
- package/file/writeFile.js +0 -2
- package/global/forceUpdate.d.ts +0 -8
- package/global/forceUpdate.js +0 -25
- package/global/init.d.ts +0 -10
- package/global/init.js +0 -18
- package/global/isSet.d.ts +0 -8
- package/global/isSet.js +0 -9
- package/global/maxCache.d.ts +0 -8
- package/global/maxCache.js +0 -17
- package/global/read.d.ts +0 -8
- package/global/read.js +0 -30
- package/google/bigQuery/IsTableExists.d.ts +0 -11
- package/google/bigQuery/IsTableExists.js +0 -25
- package/google/bigQuery/createDataset.d.ts +0 -11
- package/google/bigQuery/createDataset.js +0 -22
- package/google/bigQuery/createTable.d.ts +0 -12
- package/google/bigQuery/createTable.js +0 -31
- package/google/bigQuery/getClient.d.ts +0 -9
- package/google/bigQuery/getClient.js +0 -18
- package/google/bigQuery/getDatasets.d.ts +0 -13
- package/google/bigQuery/getDatasets.js +0 -27
- package/google/bigQuery/getTables.d.ts +0 -12
- package/google/bigQuery/getTables.js +0 -25
- package/google/bigQuery/initClient.d.ts +0 -11
- package/google/bigQuery/initClient.js +0 -29
- package/google/bigQuery/isDatasetExists.d.ts +0 -11
- package/google/bigQuery/isDatasetExists.js +0 -25
- package/google/bigQuery/query.d.ts +0 -19
- package/google/bigQuery/query.js +0 -15
- package/google/getConfig.js +0 -23
- package/google/sheets/getBatchData.d.ts +0 -18
- package/google/sheets/getBatchData.js +0 -19
- package/google/sheets/initClient.d.ts +0 -11
- package/google/sheets/initClient.js +0 -25
- package/google/sheets/isCellNa.d.ts +0 -7
- package/google/sheets/isCellNa.js +0 -7
- package/google/storage/copyToCloud.d.ts +0 -11
- package/google/storage/copyToCloud.js +0 -18
- package/google/storage/getClient.d.ts +0 -8
- package/google/storage/getClient.js +0 -18
- package/google/storage/initClient.d.ts +0 -12
- package/google/storage/initClient.js +0 -29
- package/google/storage/isFileExists.d.ts +0 -10
- package/google/storage/isFileExists.js +0 -19
- package/google/storage/writeFile.d.ts +0 -11
- package/google/storage/writeFile.js +0 -37
- package/googleAds/getCustomer.d.ts +0 -8
- package/googleAds/getCustomer.js +0 -14
- package/googleAds/initClient.d.ts +0 -16
- package/googleAds/initClient.js +0 -25
- package/googleAds/keywordPlanner/request.d.ts +0 -18
- package/googleAds/keywordPlanner/request.js +0 -13
- package/googleAds/keywordPlanner/response.d.ts +0 -25
- package/googleAds/keywordPlanner/response.js +0 -2
- package/initClients.d.ts +0 -43
- package/initClients.js +0 -131
- package/littleWarden/isAllGood.d.ts +0 -7
- package/littleWarden/isAllGood.js +0 -15
- package/littleWarden/isDanger.d.ts +0 -7
- package/littleWarden/isDanger.js +0 -15
- package/littleWarden/isWarning.d.ts +0 -7
- package/littleWarden/isWarning.js +0 -15
- package/lumar/api/filter.d.ts +0 -5
- package/lumar/api/filter.js +0 -2
- package/lumar/api/operands.d.ts +0 -11
- package/lumar/api/operands.js +0 -13
- package/lumar/api/orders.d.ts +0 -9
- package/lumar/api/orders.js +0 -7
- package/lumar/api/reports.d.ts +0 -11
- package/lumar/api/reports.js +0 -13
- package/lumar/graphql/getReportKey.d.ts +0 -9
- package/lumar/graphql/getReportKey.js +0 -9
- package/lumar/graphql/operands.d.ts +0 -16
- package/lumar/graphql/operands.js +0 -18
- package/lumar/graphql/reportTypes.d.ts +0 -7
- package/lumar/graphql/reportTypes.js +0 -9
- package/myTarget/getAccessToken.d.ts +0 -9
- package/myTarget/getAccessToken.js +0 -23
- package/number/getDivide.js +0 -26
- package/prisma/initClient.d.ts +0 -6
- package/prisma/initClient.js +0 -36
- package/snapchat/getAccessToken.d.ts +0 -9
- package/snapchat/getAccessToken.js +0 -35
- package/swr/isAllData.d.ts +0 -7
- package/swr/isAllData.js +0 -19
- package/swr/isAnyError.d.ts +0 -7
- package/swr/isAnyError.js +0 -19
- package/swr/isAnyLoading.d.ts +0 -7
- package/swr/isAnyLoading.js +0 -21
- package/swr/isData.d.ts +0 -7
- package/swr/isData.js +0 -9
- package/swr/isError.d.ts +0 -7
- package/swr/isError.js +0 -7
- package/swr/isLoading.d.ts +0 -7
- package/swr/isLoading.js +0 -12
- package/upTimeRobot/getMonitors.d.ts +0 -1
- package/upTimeRobot/getMonitors.js +0 -33
- package/upTimeRobot/logTypes.d.ts +0 -7
- package/upTimeRobot/logTypes.js +0 -9
- package/upTimeRobot/monitorStatuses.d.ts +0 -8
- package/upTimeRobot/monitorStatuses.js +0 -10
- package/upTimeRobot/monitorSubTypes.d.ts +0 -10
- package/upTimeRobot/monitorSubTypes.js +0 -12
- package/upTimeRobot/monitorTypes.d.ts +0 -8
- package/upTimeRobot/monitorTypes.js +0 -10
- package/upTimeRobot/requestStatuses.d.ts +0 -5
- package/upTimeRobot/requestStatuses.js +0 -7
- package/url/buildParameters.d.ts +0 -8
- package/url/buildParameters.js +0 -22
- package/url/buildRelative.d.ts +0 -8
- package/url/buildRelative.js +0 -13
- package/url/buildUrl.d.ts +0 -10
- package/url/buildUrl.js +0 -29
- package/url/isAbsolute.d.ts +0 -7
- package/url/isAbsolute.js +0 -15
- package/url/isRelative.d.ts +0 -7
- package/url/isRelative.js +0 -8
- package/url/url.d.ts +0 -6
- package/url/url.js +0 -2
- /package/{aws/sqs/isEventSqs.d.ts → cache/test/cache.test.d.ts} +0 -0
package/sorting/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.byStringDescending = exports.byStringAscending = exports.byNumberDescending = exports.byNumberAscending = void 0;
|
|
4
|
+
var byNumberAscending_1 = require("./byNumberAscending");
|
|
5
|
+
Object.defineProperty(exports, "byNumberAscending", { enumerable: true, get: function () { return byNumberAscending_1.byNumberAscending; } });
|
|
6
|
+
var byNumberDescending_1 = require("./byNumberDescending");
|
|
7
|
+
Object.defineProperty(exports, "byNumberDescending", { enumerable: true, get: function () { return byNumberDescending_1.byNumberDescending; } });
|
|
8
|
+
var byStringAscending_1 = require("./byStringAscending");
|
|
9
|
+
Object.defineProperty(exports, "byStringAscending", { enumerable: true, get: function () { return byStringAscending_1.byStringAscending; } });
|
|
10
|
+
var byStringDescending_1 = require("./byStringDescending");
|
|
11
|
+
Object.defineProperty(exports, "byStringDescending", { enumerable: true, get: function () { return byStringDescending_1.byStringDescending; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { sort } from "./sort";
|
package/stream/index.js
ADDED
package/stream/sort.d.ts
CHANGED
|
@@ -4,11 +4,10 @@ declare const Transform: any;
|
|
|
4
4
|
* https://www.npmjs.com/package/fast-stream-sort
|
|
5
5
|
*/
|
|
6
6
|
declare class SortStreamer extends Transform {
|
|
7
|
-
static [x: string]: any;
|
|
8
7
|
constructor(options: any, comp: any);
|
|
9
8
|
_transform(data: any, _: any, callback: any): void;
|
|
10
9
|
_flush(): void;
|
|
11
10
|
fullflush(): void;
|
|
12
11
|
}
|
|
13
|
-
declare const sort: (comp: any, options: any) => SortStreamer;
|
|
14
|
-
export
|
|
12
|
+
export declare const sort: (comp: any, options: any) => SortStreamer;
|
|
13
|
+
export {};
|
package/stream/sort.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.sort = void 0;
|
|
4
|
+
const Transform = require("stream").Transform;
|
|
4
5
|
const batch = 15000;
|
|
5
6
|
/**
|
|
6
7
|
* Batch sort stream without overloading the memory limit.
|
|
@@ -47,4 +48,4 @@ const sort = (comp, options) => {
|
|
|
47
48
|
options = options || { objectMode: true };
|
|
48
49
|
return new SortStreamer(options, comp);
|
|
49
50
|
};
|
|
50
|
-
exports.
|
|
51
|
+
exports.sort = sort;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
type GetCapitalised = {
|
|
2
|
-
input: string;
|
|
3
|
-
split?: string;
|
|
4
|
-
};
|
|
5
1
|
/**
|
|
6
2
|
* Convert a string into Capitalised Text.
|
|
7
3
|
* https://stackoverflow.com/a/196991/2664955
|
|
8
4
|
*/
|
|
9
|
-
declare const getCapitalised: (
|
|
10
|
-
export default getCapitalised;
|
|
5
|
+
export declare const getCapitalised: (input: string, split?: string) => string;
|
package/string/getCapitalised.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCapitalised = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* Convert a string into Capitalised Text.
|
|
5
6
|
* https://stackoverflow.com/a/196991/2664955
|
|
6
7
|
*/
|
|
7
|
-
const getCapitalised = (
|
|
8
|
-
const regex = new RegExp(split ||
|
|
8
|
+
const getCapitalised = (input, split = "_") => {
|
|
9
|
+
const regex = new RegExp(split || "_", "g");
|
|
9
10
|
return input
|
|
10
|
-
.replace(regex,
|
|
11
|
+
.replace(regex, " ")
|
|
11
12
|
.replace(/\w\S*/g, function (txt) {
|
|
12
13
|
return txt.charAt(0)
|
|
13
14
|
.toUpperCase() + txt.substr(1)
|
|
14
15
|
.toLowerCase();
|
|
15
16
|
});
|
|
16
17
|
};
|
|
17
|
-
exports.
|
|
18
|
+
exports.getCapitalised = getCapitalised;
|
package/string/getClean.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type
|
|
1
|
+
type GetCleanProps = {
|
|
2
2
|
accents?: boolean;
|
|
3
3
|
decoded?: boolean;
|
|
4
4
|
htmlTags?: boolean;
|
|
@@ -14,5 +14,5 @@ type GetClean = {
|
|
|
14
14
|
/**
|
|
15
15
|
* Shorthand function to get a clean version of a string.
|
|
16
16
|
*/
|
|
17
|
-
declare const getClean: (
|
|
18
|
-
export
|
|
17
|
+
export declare const getClean: (props: GetCleanProps) => string;
|
|
18
|
+
export {};
|
package/string/getClean.js
CHANGED
|
@@ -1,65 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
3
|
+
exports.getClean = void 0;
|
|
4
|
+
const getString_1 = require("./getString");
|
|
5
|
+
const getWithoutHtmlTags_1 = require("./getWithoutHtmlTags");
|
|
6
|
+
const getWithoutAccents_1 = require("./getWithoutAccents");
|
|
7
|
+
const getProperCase_1 = require("./getProperCase");
|
|
8
|
+
const getWithoutWhitespaces_1 = require("./getWithoutWhitespaces");
|
|
9
|
+
const getWithoutPunctuation_1 = require("./getWithoutPunctuation");
|
|
10
|
+
const getWithoutUnderscores_1 = require("./getWithoutUnderscores");
|
|
11
|
+
const getUnescaped_1 = require("./getUnescaped");
|
|
14
12
|
/**
|
|
15
13
|
* Shorthand function to get a clean version of a string.
|
|
16
14
|
*/
|
|
17
|
-
const getClean = (
|
|
18
|
-
let response = (0, getString_1.
|
|
19
|
-
if (decoded) {
|
|
20
|
-
response = (0,
|
|
21
|
-
input: response,
|
|
22
|
-
});
|
|
15
|
+
const getClean = (props) => {
|
|
16
|
+
let response = (0, getString_1.getString)(props.input);
|
|
17
|
+
if (props.decoded) {
|
|
18
|
+
response = (0, getUnescaped_1.getUnescaped)(response);
|
|
23
19
|
}
|
|
24
|
-
if (accents) {
|
|
25
|
-
response = (0, getWithoutAccents_1.
|
|
26
|
-
input: response
|
|
27
|
-
});
|
|
20
|
+
if (props.accents) {
|
|
21
|
+
response = (0, getWithoutAccents_1.getWithoutAccents)(response);
|
|
28
22
|
}
|
|
29
|
-
if (htmlTags) {
|
|
30
|
-
response = (0, getWithoutHtmlTags_1.
|
|
31
|
-
input: response
|
|
32
|
-
});
|
|
23
|
+
if (props.htmlTags) {
|
|
24
|
+
response = (0, getWithoutHtmlTags_1.getWithoutHtmlTags)(response);
|
|
33
25
|
}
|
|
34
|
-
if (underscores) {
|
|
35
|
-
response = (0, getWithoutUnderscores_1.
|
|
36
|
-
input: response,
|
|
37
|
-
});
|
|
26
|
+
if (props.underscores) {
|
|
27
|
+
response = (0, getWithoutUnderscores_1.getWithoutUnderscores)(response);
|
|
38
28
|
}
|
|
39
|
-
if (punctuation) {
|
|
40
|
-
response = (0, getWithoutPunctuation_1.
|
|
41
|
-
input: response
|
|
42
|
-
});
|
|
29
|
+
if (props.punctuation) {
|
|
30
|
+
response = (0, getWithoutPunctuation_1.getWithoutPunctuation)(response);
|
|
43
31
|
}
|
|
44
|
-
if (whitespace) {
|
|
45
|
-
response = (0, getWithoutWhitespaces_1.
|
|
46
|
-
input: response
|
|
47
|
-
});
|
|
32
|
+
if (props.whitespace) {
|
|
33
|
+
response = (0, getWithoutWhitespaces_1.getWithoutWhitespaces)(response);
|
|
48
34
|
}
|
|
49
|
-
if (lowercase) {
|
|
35
|
+
if (props.lowercase) {
|
|
50
36
|
response = response.toLowerCase();
|
|
51
37
|
}
|
|
52
|
-
if (propercase) {
|
|
53
|
-
response = (0, getProperCase_1.
|
|
54
|
-
input: response
|
|
38
|
+
if (props.propercase) {
|
|
39
|
+
response = (0, getProperCase_1.getProperCase)({
|
|
40
|
+
input: response,
|
|
55
41
|
});
|
|
56
42
|
}
|
|
57
|
-
if (uppercase) {
|
|
43
|
+
if (props.uppercase) {
|
|
58
44
|
response = response.toUpperCase();
|
|
59
45
|
}
|
|
60
|
-
if (trim) {
|
|
46
|
+
if (props.trim) {
|
|
61
47
|
response = response.trim();
|
|
62
48
|
}
|
|
63
49
|
return response;
|
|
64
50
|
};
|
|
65
|
-
exports.
|
|
51
|
+
exports.getClean = getClean;
|
package/string/getFolder.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
type GetFolder = {
|
|
2
|
-
input: string;
|
|
3
|
-
};
|
|
4
1
|
/**
|
|
5
2
|
* Take an input that may have a / before or after the input and return just the folder.
|
|
6
3
|
*/
|
|
7
|
-
declare const getFolder: (
|
|
8
|
-
export default getFolder;
|
|
4
|
+
export declare const getFolder: (input: string) => string;
|
package/string/getFolder.js
CHANGED
|
@@ -3,12 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getFolder = void 0;
|
|
6
7
|
const trim_1 = __importDefault(require("lodash/trim"));
|
|
7
8
|
/**
|
|
8
9
|
* Take an input that may have a / before or after the input and return just the folder.
|
|
9
10
|
*/
|
|
10
|
-
const getFolder = (
|
|
11
|
-
return (0, trim_1.default)(input,
|
|
11
|
+
const getFolder = (input) => {
|
|
12
|
+
return (0, trim_1.default)(input, "/")
|
|
12
13
|
.trim();
|
|
13
14
|
};
|
|
14
|
-
exports.
|
|
15
|
+
exports.getFolder = getFolder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
input:
|
|
1
|
+
type GetProperCaseProps = {
|
|
2
|
+
input: string;
|
|
3
3
|
hyphen?: boolean;
|
|
4
4
|
pipe?: boolean;
|
|
5
5
|
underscore?: boolean;
|
|
@@ -7,5 +7,5 @@ type GetProperCase = {
|
|
|
7
7
|
/**
|
|
8
8
|
* Return a string "With Proper Casing".
|
|
9
9
|
*/
|
|
10
|
-
declare const getProperCase: (props:
|
|
11
|
-
export
|
|
10
|
+
export declare const getProperCase: (props: GetProperCaseProps) => string;
|
|
11
|
+
export {};
|
package/string/getProperCase.js
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
3
|
+
exports.getProperCase = void 0;
|
|
7
4
|
/**
|
|
8
5
|
* Return a string "With Proper Casing".
|
|
9
6
|
*/
|
|
10
7
|
const getProperCase = (props) => {
|
|
11
|
-
let
|
|
12
|
-
input: props.input,
|
|
13
|
-
});
|
|
8
|
+
let response = props.input;
|
|
14
9
|
if (props?.hyphen) {
|
|
15
|
-
|
|
10
|
+
response = response.split(/-/g)
|
|
11
|
+
.join(" ");
|
|
16
12
|
}
|
|
17
13
|
if (props?.pipe) {
|
|
18
|
-
|
|
14
|
+
response = response.split(/\|/g)
|
|
15
|
+
.join(" ");
|
|
19
16
|
}
|
|
20
17
|
if (props?.underscore) {
|
|
21
|
-
|
|
18
|
+
response = response.split(/_/g)
|
|
19
|
+
.join(" ");
|
|
22
20
|
}
|
|
23
|
-
return
|
|
21
|
+
return response.replace(/\w\S*/g, word => word.charAt(0)
|
|
24
22
|
.toUpperCase() + word.substr(1)
|
|
25
23
|
.toLowerCase());
|
|
26
24
|
};
|
|
27
|
-
exports.
|
|
25
|
+
exports.getProperCase = getProperCase;
|
package/string/getString.d.ts
CHANGED
package/string/getString.js
CHANGED
|
@@ -3,21 +3,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getString = void 0;
|
|
6
7
|
const isArray_1 = __importDefault(require("lodash/isArray"));
|
|
7
8
|
const isDate_1 = __importDefault(require("lodash/isDate"));
|
|
8
9
|
const isObject_1 = __importDefault(require("lodash/isObject"));
|
|
9
|
-
const
|
|
10
|
+
const date_1 = require("../date");
|
|
10
11
|
/**
|
|
11
12
|
* Convert into string.
|
|
12
13
|
*/
|
|
13
|
-
const getString = (
|
|
14
|
-
let string =
|
|
14
|
+
const getString = (input) => {
|
|
15
|
+
let string = "";
|
|
15
16
|
// Already a string
|
|
16
|
-
if (
|
|
17
|
+
if ("string" === typeof input) {
|
|
17
18
|
string = input;
|
|
18
19
|
}
|
|
19
20
|
// Convert a number into a date
|
|
20
|
-
else if (
|
|
21
|
+
else if ("number" === typeof input) {
|
|
21
22
|
string = input.toString();
|
|
22
23
|
}
|
|
23
24
|
// Object or array to JSON
|
|
@@ -26,9 +27,8 @@ const getString = ({ input }) => {
|
|
|
26
27
|
}
|
|
27
28
|
// Date
|
|
28
29
|
else if ((0, isDate_1.default)(input)) {
|
|
29
|
-
string = (0,
|
|
30
|
-
.toString();
|
|
30
|
+
string = (0, date_1.getYmdString)(input);
|
|
31
31
|
}
|
|
32
32
|
return string;
|
|
33
33
|
};
|
|
34
|
-
exports.
|
|
34
|
+
exports.getString = getString;
|
|
@@ -2,7 +2,4 @@
|
|
|
2
2
|
* Converts a stream into a string.
|
|
3
3
|
* https://stackoverflow.com/a/49428486
|
|
4
4
|
*/
|
|
5
|
-
declare const getStringFromStream: (
|
|
6
|
-
stream: any;
|
|
7
|
-
}) => Promise<string>;
|
|
8
|
-
export default getStringFromStream;
|
|
5
|
+
export declare const getStringFromStream: (stream: any) => Promise<string>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStringFromStream = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* Converts a stream into a string.
|
|
5
6
|
* https://stackoverflow.com/a/49428486
|
|
6
7
|
*/
|
|
7
|
-
const getStringFromStream = (
|
|
8
|
+
const getStringFromStream = (stream) => {
|
|
8
9
|
const chunks = [];
|
|
9
10
|
return new Promise((resolve, reject) => {
|
|
10
|
-
stream.on(
|
|
11
|
-
stream.on(
|
|
12
|
-
stream.on(
|
|
13
|
-
.toString(
|
|
11
|
+
stream.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
|
|
12
|
+
stream.on("error", (err) => reject(err));
|
|
13
|
+
stream.on("end", () => resolve(Buffer.concat(chunks)
|
|
14
|
+
.toString("utf8")));
|
|
14
15
|
});
|
|
15
16
|
};
|
|
16
|
-
exports.
|
|
17
|
+
exports.getStringFromStream = getStringFromStream;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
type GetDecoded = {
|
|
2
|
-
input: any;
|
|
3
|
-
};
|
|
4
1
|
/**
|
|
5
2
|
* Convert escaped copy into unescaped.
|
|
6
3
|
* E.g. there's => there's
|
|
7
4
|
* https://stackoverflow.com/a/42182294/2664955
|
|
8
5
|
*/
|
|
9
|
-
declare const
|
|
10
|
-
export default getDecoded;
|
|
6
|
+
export declare const getUnescaped: (input: string) => string;
|
|
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
exports.getUnescaped = void 0;
|
|
7
7
|
const unescape_1 = __importDefault(require("lodash/unescape"));
|
|
8
8
|
/**
|
|
9
9
|
* Convert escaped copy into unescaped.
|
|
10
10
|
* E.g. there's => there's
|
|
11
11
|
* https://stackoverflow.com/a/42182294/2664955
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
let response =
|
|
13
|
+
const getUnescaped = (input) => {
|
|
14
|
+
let response = input;
|
|
15
15
|
// Only works if DOM exists
|
|
16
|
-
if (
|
|
16
|
+
if ("undefined" !== typeof document) {
|
|
17
17
|
let el = document.createElement("textarea");
|
|
18
18
|
el.innerHTML = response;
|
|
19
19
|
response = el.value;
|
|
@@ -23,4 +23,4 @@ const getDecoded = ({ input }) => {
|
|
|
23
23
|
}
|
|
24
24
|
return response;
|
|
25
25
|
};
|
|
26
|
-
exports.
|
|
26
|
+
exports.getUnescaped = getUnescaped;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
type GetWithoutAccents = {
|
|
2
|
-
input: string;
|
|
3
|
-
};
|
|
4
1
|
/**
|
|
5
2
|
* Remove the accents from a string.
|
|
6
3
|
* https://stackoverflow.com/a/37511463
|
|
7
4
|
*/
|
|
8
|
-
declare const getWithoutAccents: (
|
|
9
|
-
export default getWithoutAccents;
|
|
5
|
+
export declare const getWithoutAccents: (input: string) => string;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
3
|
+
exports.getWithoutAccents = void 0;
|
|
7
4
|
/**
|
|
8
5
|
* Remove the accents from a string.
|
|
9
6
|
* https://stackoverflow.com/a/37511463
|
|
10
7
|
*/
|
|
11
|
-
const getWithoutAccents = (
|
|
12
|
-
return
|
|
8
|
+
const getWithoutAccents = (input) => {
|
|
9
|
+
return input
|
|
13
10
|
.normalize("NFD")
|
|
14
11
|
.replace(/[\u0300-\u036f]/g, "");
|
|
15
12
|
};
|
|
16
|
-
exports.
|
|
13
|
+
exports.getWithoutAccents = getWithoutAccents;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
type GetWithoutHtmlTags = {
|
|
2
|
-
input: any;
|
|
3
|
-
};
|
|
4
1
|
/**
|
|
5
2
|
* Removes all HTML tags from an input.
|
|
6
3
|
* https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
|
|
7
4
|
*/
|
|
8
|
-
declare const getWithoutHtmlTags: (
|
|
9
|
-
export default getWithoutHtmlTags;
|
|
5
|
+
export declare const getWithoutHtmlTags: (input: string) => string;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
3
|
+
exports.getWithoutHtmlTags = void 0;
|
|
7
4
|
/**
|
|
8
5
|
* Removes all HTML tags from an input.
|
|
9
6
|
* https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
|
|
10
7
|
*/
|
|
11
|
-
const getWithoutHtmlTags = (
|
|
12
|
-
return
|
|
13
|
-
.replace(/(<([^>]+)>)/gi,
|
|
8
|
+
const getWithoutHtmlTags = (input) => {
|
|
9
|
+
return input
|
|
10
|
+
.replace(/(<([^>]+)>)/gi, "");
|
|
14
11
|
};
|
|
15
|
-
exports.
|
|
12
|
+
exports.getWithoutHtmlTags = getWithoutHtmlTags;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
type GetWithoutPunctuation = {
|
|
2
|
-
input: string;
|
|
3
|
-
};
|
|
4
1
|
/**
|
|
5
2
|
* Remove all punctuation from a string and replace with a space.
|
|
6
3
|
* https://stackoverflow.com/a/25575009
|
|
7
4
|
*/
|
|
8
|
-
declare const getWithoutPunctuation: (
|
|
9
|
-
export default getWithoutPunctuation;
|
|
5
|
+
export declare const getWithoutPunctuation: (input: string) => string;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
3
|
+
exports.getWithoutPunctuation = void 0;
|
|
7
4
|
/**
|
|
8
5
|
* Remove all punctuation from a string and replace with a space.
|
|
9
6
|
* https://stackoverflow.com/a/25575009
|
|
10
7
|
*/
|
|
11
|
-
const getWithoutPunctuation = (
|
|
12
|
-
return
|
|
13
|
-
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g,
|
|
14
|
-
.replace(/\s+/g,
|
|
8
|
+
const getWithoutPunctuation = (input) => {
|
|
9
|
+
return input
|
|
10
|
+
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g, "")
|
|
11
|
+
.replace(/\s+/g, " ");
|
|
15
12
|
};
|
|
16
|
-
exports.
|
|
13
|
+
exports.getWithoutPunctuation = getWithoutPunctuation;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
type GetWithoutUnderscores = {
|
|
2
|
-
input: string;
|
|
3
|
-
};
|
|
4
1
|
/**
|
|
5
2
|
* Replace all underscores with a space.
|
|
6
3
|
*/
|
|
7
|
-
declare const getWithoutUnderscores: (
|
|
8
|
-
export default getWithoutUnderscores;
|
|
4
|
+
export declare const getWithoutUnderscores: (input: string) => string;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
3
|
+
exports.getWithoutUnderscores = void 0;
|
|
7
4
|
/**
|
|
8
5
|
* Replace all underscores with a space.
|
|
9
6
|
*/
|
|
10
|
-
const getWithoutUnderscores = (
|
|
11
|
-
return
|
|
12
|
-
.replace(
|
|
7
|
+
const getWithoutUnderscores = (input) => {
|
|
8
|
+
return input
|
|
9
|
+
.replace("_", " ");
|
|
13
10
|
};
|
|
14
|
-
exports.
|
|
11
|
+
exports.getWithoutUnderscores = getWithoutUnderscores;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
type GetWithoutWhitespaces = {
|
|
2
|
-
input: string;
|
|
3
|
-
};
|
|
4
1
|
/**
|
|
5
2
|
* Remove all new lines, tabs multiple spaces, with a single space.
|
|
6
3
|
* https://stackoverflow.com/a/45029224
|
|
7
4
|
*/
|
|
8
|
-
declare const getWithoutWhitespaces: (
|
|
9
|
-
export default getWithoutWhitespaces;
|
|
5
|
+
export declare const getWithoutWhitespaces: (input: string) => string;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
3
|
+
exports.getWithoutWhitespaces = void 0;
|
|
7
4
|
/**
|
|
8
5
|
* Remove all new lines, tabs multiple spaces, with a single space.
|
|
9
6
|
* https://stackoverflow.com/a/45029224
|
|
10
7
|
*/
|
|
11
|
-
const getWithoutWhitespaces = (
|
|
12
|
-
return
|
|
13
|
-
.replace(/\s+/g,
|
|
8
|
+
const getWithoutWhitespaces = (input) => {
|
|
9
|
+
return input
|
|
10
|
+
.replace(/\s+/g, " ")
|
|
14
11
|
.trim();
|
|
15
12
|
};
|
|
16
|
-
exports.
|
|
13
|
+
exports.getWithoutWhitespaces = getWithoutWhitespaces;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { getCapitalised } from "./getCapitalised";
|
|
2
|
+
export { getClean } from "./getClean";
|
|
3
|
+
export { getFolder } from "./getFolder";
|
|
4
|
+
export { getProperCase } from "./getProperCase";
|
|
5
|
+
export { getString } from "./getString";
|
|
6
|
+
export { getStringFromStream } from "./getStringFromStream";
|
|
7
|
+
export { getUnescaped } from "./getUnescaped";
|
|
8
|
+
export { getWithoutAccents } from "./getWithoutAccents";
|
|
9
|
+
export { getWithoutHtmlTags } from "./getWithoutHtmlTags";
|
|
10
|
+
export { getWithoutPunctuation } from "./getWithoutPunctuation";
|
|
11
|
+
export { getWithoutUnderscores } from "./getWithoutUnderscores";
|
|
12
|
+
export { getWithoutWhitespaces } from "./getWithoutWhitespaces";
|
package/string/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWithoutWhitespaces = exports.getWithoutUnderscores = exports.getWithoutPunctuation = exports.getWithoutHtmlTags = exports.getWithoutAccents = exports.getUnescaped = exports.getStringFromStream = exports.getString = exports.getProperCase = exports.getFolder = exports.getClean = exports.getCapitalised = void 0;
|
|
4
|
+
var getCapitalised_1 = require("./getCapitalised");
|
|
5
|
+
Object.defineProperty(exports, "getCapitalised", { enumerable: true, get: function () { return getCapitalised_1.getCapitalised; } });
|
|
6
|
+
var getClean_1 = require("./getClean");
|
|
7
|
+
Object.defineProperty(exports, "getClean", { enumerable: true, get: function () { return getClean_1.getClean; } });
|
|
8
|
+
var getFolder_1 = require("./getFolder");
|
|
9
|
+
Object.defineProperty(exports, "getFolder", { enumerable: true, get: function () { return getFolder_1.getFolder; } });
|
|
10
|
+
var getProperCase_1 = require("./getProperCase");
|
|
11
|
+
Object.defineProperty(exports, "getProperCase", { enumerable: true, get: function () { return getProperCase_1.getProperCase; } });
|
|
12
|
+
var getString_1 = require("./getString");
|
|
13
|
+
Object.defineProperty(exports, "getString", { enumerable: true, get: function () { return getString_1.getString; } });
|
|
14
|
+
var getStringFromStream_1 = require("./getStringFromStream");
|
|
15
|
+
Object.defineProperty(exports, "getStringFromStream", { enumerable: true, get: function () { return getStringFromStream_1.getStringFromStream; } });
|
|
16
|
+
var getUnescaped_1 = require("./getUnescaped");
|
|
17
|
+
Object.defineProperty(exports, "getUnescaped", { enumerable: true, get: function () { return getUnescaped_1.getUnescaped; } });
|
|
18
|
+
var getWithoutAccents_1 = require("./getWithoutAccents");
|
|
19
|
+
Object.defineProperty(exports, "getWithoutAccents", { enumerable: true, get: function () { return getWithoutAccents_1.getWithoutAccents; } });
|
|
20
|
+
var getWithoutHtmlTags_1 = require("./getWithoutHtmlTags");
|
|
21
|
+
Object.defineProperty(exports, "getWithoutHtmlTags", { enumerable: true, get: function () { return getWithoutHtmlTags_1.getWithoutHtmlTags; } });
|
|
22
|
+
var getWithoutPunctuation_1 = require("./getWithoutPunctuation");
|
|
23
|
+
Object.defineProperty(exports, "getWithoutPunctuation", { enumerable: true, get: function () { return getWithoutPunctuation_1.getWithoutPunctuation; } });
|
|
24
|
+
var getWithoutUnderscores_1 = require("./getWithoutUnderscores");
|
|
25
|
+
Object.defineProperty(exports, "getWithoutUnderscores", { enumerable: true, get: function () { return getWithoutUnderscores_1.getWithoutUnderscores; } });
|
|
26
|
+
var getWithoutWhitespaces_1 = require("./getWithoutWhitespaces");
|
|
27
|
+
Object.defineProperty(exports, "getWithoutWhitespaces", { enumerable: true, get: function () { return getWithoutWhitespaces_1.getWithoutWhitespaces; } });
|