@8ms/helpers 1.38.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (516) hide show
  1. package/.github/workflows/deploy_npmjs.yml +22 -14
  2. package/.yarn/install-state.gz +0 -0
  3. package/.yarn/releases/yarn-4.9.2.cjs +942 -0
  4. package/.yarnrc.yml +2 -0
  5. package/README.md +12 -0
  6. package/package.json +175 -46
  7. package/api/ApiResponse.d.ts +0 -50
  8. package/api/ApiResponse.js +0 -94
  9. package/api/index.d.ts +0 -9
  10. package/api/index.js +0 -13
  11. package/api/isError.d.ts +0 -6
  12. package/api/isError.js +0 -7
  13. package/api/isSuccess.d.ts +0 -6
  14. package/api/isSuccess.js +0 -7
  15. package/api/response.d.ts +0 -8
  16. package/api/response.js +0 -9
  17. package/array/contains.d.ts +0 -9
  18. package/array/contains.js +0 -7
  19. package/array/getArray.d.ts +0 -8
  20. package/array/getArray.js +0 -11
  21. package/atInternet/request.d.ts +0 -30
  22. package/atInternet/request.js +0 -2
  23. package/aws/athenaExpress/initClient.d.ts +0 -12
  24. package/aws/athenaExpress/initClient.js +0 -31
  25. package/aws/athenaExpress/query.d.ts +0 -8
  26. package/aws/athenaExpress/query.js +0 -16
  27. package/aws/ec2/initClient.d.ts +0 -11
  28. package/aws/ec2/initClient.js +0 -23
  29. package/aws/ec2/startInstances.d.ts +0 -11
  30. package/aws/ec2/startInstances.js +0 -18
  31. package/aws/ec2/stopInstances.d.ts +0 -12
  32. package/aws/ec2/stopInstances.js +0 -19
  33. package/aws/ecs/getClusters.d.ts +0 -9
  34. package/aws/ecs/getClusters.js +0 -32
  35. package/aws/ecs/getTaskDefinitions.d.ts +0 -13
  36. package/aws/ecs/getTaskDefinitions.js +0 -35
  37. package/aws/ecs/getTasks.d.ts +0 -16
  38. package/aws/ecs/getTasks.js +0 -38
  39. package/aws/ecs/initClient.d.ts +0 -11
  40. package/aws/ecs/initClient.js +0 -23
  41. package/aws/ecs/runTask.d.ts +0 -16
  42. package/aws/ecs/runTask.js +0 -30
  43. package/aws/getConfig.d.ts +0 -13
  44. package/aws/getConfig.js +0 -27
  45. package/aws/glue/initClient.d.ts +0 -10
  46. package/aws/glue/initClient.js +0 -21
  47. package/aws/glue/invoke.d.ts +0 -9
  48. package/aws/glue/invoke.js +0 -23
  49. package/aws/isResponse200.d.ts +0 -7
  50. package/aws/isResponse200.js +0 -22
  51. package/aws/lambda/getHandlerPath.d.ts +0 -5
  52. package/aws/lambda/getHandlerPath.js +0 -7
  53. package/aws/lambda/initClient.d.ts +0 -10
  54. package/aws/lambda/initClient.js +0 -21
  55. package/aws/lambda/invoke.d.ts +0 -13
  56. package/aws/lambda/invoke.js +0 -61
  57. package/aws/s3/copyFile.d.ts +0 -13
  58. package/aws/s3/copyFile.js +0 -14
  59. package/aws/s3/deleteFile.d.ts +0 -9
  60. package/aws/s3/deleteFile.js +0 -13
  61. package/aws/s3/deleteFiles.d.ts +0 -9
  62. package/aws/s3/deleteFiles.js +0 -17
  63. package/aws/s3/deleteFolder.d.ts +0 -9
  64. package/aws/s3/deleteFolder.js +0 -36
  65. package/aws/s3/getGlueJson.d.ts +0 -8
  66. package/aws/s3/getGlueJson.js +0 -11
  67. package/aws/s3/getPresignedPost.d.ts +0 -20
  68. package/aws/s3/getPresignedPost.js +0 -19
  69. package/aws/s3/getSignedUrl.d.ts +0 -12
  70. package/aws/s3/getSignedUrl.js +0 -17
  71. package/aws/s3/initClient.d.ts +0 -10
  72. package/aws/s3/initClient.js +0 -19
  73. package/aws/s3/isFileExists.d.ts +0 -9
  74. package/aws/s3/isFileExists.js +0 -27
  75. package/aws/s3/listFiles.d.ts +0 -9
  76. package/aws/s3/listFiles.js +0 -33
  77. package/aws/s3/listFilesIteratively.d.ts +0 -9
  78. package/aws/s3/listFilesIteratively.js +0 -44
  79. package/aws/s3/listFolders.d.ts +0 -9
  80. package/aws/s3/listFolders.js +0 -32
  81. package/aws/s3/moveFile.d.ts +0 -10
  82. package/aws/s3/moveFile.js +0 -21
  83. package/aws/s3/readBrotli.d.ts +0 -11
  84. package/aws/s3/readBrotli.js +0 -28
  85. package/aws/s3/readBuffer.d.ts +0 -13
  86. package/aws/s3/readBuffer.js +0 -39
  87. package/aws/s3/readFile.d.ts +0 -31
  88. package/aws/s3/readFile.js +0 -83
  89. package/aws/s3/readGzip.d.ts +0 -11
  90. package/aws/s3/readGzip.js +0 -28
  91. package/aws/s3/writeBrotli.d.ts +0 -12
  92. package/aws/s3/writeBrotli.js +0 -28
  93. package/aws/s3/writeFile.d.ts +0 -11
  94. package/aws/s3/writeFile.js +0 -16
  95. package/aws/s3/writeGzip.d.ts +0 -12
  96. package/aws/s3/writeGzip.js +0 -28
  97. package/aws/s3/writePresignedPost.d.ts +0 -14
  98. package/aws/s3/writePresignedPost.js +0 -31
  99. package/aws/s3/writeUrlContents.d.ts +0 -10
  100. package/aws/s3/writeUrlContents.js +0 -26
  101. package/aws/s3cache/getCache.d.ts +0 -11
  102. package/aws/s3cache/getCache.js +0 -37
  103. package/aws/s3cache/getKey.d.ts +0 -10
  104. package/aws/s3cache/getKey.js +0 -18
  105. package/aws/s3cache/index.d.ts +0 -6
  106. package/aws/s3cache/index.js +0 -2
  107. package/aws/s3cache/saveCache.d.ts +0 -10
  108. package/aws/s3cache/saveCache.js +0 -17
  109. package/aws/s3cache/updateCache.d.ts +0 -10
  110. package/aws/s3cache/updateCache.js +0 -24
  111. package/aws/ses/SimpleEmail.d.ts +0 -51
  112. package/aws/ses/SimpleEmail.js +0 -114
  113. package/aws/ses/initClient.d.ts +0 -10
  114. package/aws/ses/initClient.js +0 -19
  115. package/aws/sqs/addToQueue.d.ts +0 -27
  116. package/aws/sqs/addToQueue.js +0 -26
  117. package/aws/sqs/deleteFromQueue.d.ts +0 -10
  118. package/aws/sqs/deleteFromQueue.js +0 -15
  119. package/aws/sqs/initClient.d.ts +0 -10
  120. package/aws/sqs/initClient.js +0 -19
  121. package/aws/sqs/isEventSqs.d.ts +0 -1
  122. package/aws/sqs/isEventSqs.js +0 -13
  123. package/aws/ssm/getParameter.d.ts +0 -10
  124. package/aws/ssm/getParameter.js +0 -40
  125. package/aws/ssm/initClient.d.ts +0 -10
  126. package/aws/ssm/initClient.js +0 -19
  127. package/axios/delete.d.ts +0 -11
  128. package/axios/delete.js +0 -39
  129. package/axios/get.d.ts +0 -10
  130. package/axios/get.js +0 -38
  131. package/axios/post.d.ts +0 -11
  132. package/axios/post.js +0 -38
  133. package/boolean/getBoolean.d.ts +0 -7
  134. package/boolean/getBoolean.js +0 -16
  135. package/brightData/getCustomerId.d.ts +0 -10
  136. package/brightData/getCustomerId.js +0 -11
  137. package/brightData/getZone.d.ts +0 -9
  138. package/brightData/getZone.js +0 -10
  139. package/brightData/param.d.ts +0 -9
  140. package/brightData/param.js +0 -3
  141. package/brightData/serpApi/buildGoogleSerpUrl.d.ts +0 -32
  142. package/brightData/serpApi/buildGoogleSerpUrl.js +0 -115
  143. package/brightData/serpApi/buildGoogleTrendsUrl.d.ts +0 -22
  144. package/brightData/serpApi/buildGoogleTrendsUrl.js +0 -60
  145. package/brightData/serpApi/getAsyncRequestId.d.ts +0 -14
  146. package/brightData/serpApi/getAsyncRequestId.js +0 -50
  147. package/brightData/serpApi/getAsyncResults.d.ts +0 -12
  148. package/brightData/serpApi/getAsyncResults.js +0 -49
  149. package/brightData/serpApi/getRealtime.d.ts +0 -10
  150. package/brightData/serpApi/getRealtime.js +0 -35
  151. package/brightData/serpApi/type.d.ts +0 -11
  152. package/brightData/serpApi/type.js +0 -14
  153. package/brightData/webScraperIde/getBatch.d.ts +0 -14
  154. package/brightData/webScraperIde/getBatch.js +0 -34
  155. package/brightData/webScraperIde/getRealtime.d.ts +0 -13
  156. package/brightData/webScraperIde/getRealtime.js +0 -64
  157. package/class/BaseClass.d.ts +0 -31
  158. package/class/BaseClass.js +0 -50
  159. package/crud/index.d.ts +0 -6
  160. package/crud/index.js +0 -10
  161. package/crypto/getDecrypt.d.ts +0 -10
  162. package/crypto/getDecrypt.js +0 -13
  163. package/crypto/getEncrypt.d.ts +0 -10
  164. package/crypto/getEncrypt.js +0 -13
  165. package/crypto/getRandom.d.ts +0 -8
  166. package/crypto/getRandom.js +0 -12
  167. package/crypto/getSha256.d.ts +0 -8
  168. package/crypto/getSha256.js +0 -17
  169. package/date/format.d.ts +0 -10
  170. package/date/format.js +0 -21
  171. package/date/getDate.d.ts +0 -14
  172. package/date/getDate.js +0 -138
  173. package/date/getDatesBetween.d.ts +0 -13
  174. package/date/getDatesBetween.js +0 -54
  175. package/date/getDurationHours.d.ts +0 -9
  176. package/date/getDurationHours.js +0 -24
  177. package/date/getDurationMinutes.d.ts +0 -9
  178. package/date/getDurationMinutes.js +0 -22
  179. package/date/getFinancialYear.d.ts +0 -9
  180. package/date/getFinancialYear.js +0 -52
  181. package/date/getFinancialYearToDate.d.ts +0 -7
  182. package/date/getFinancialYearToDate.js +0 -20
  183. package/date/getFinancialYearToYesterday.d.ts +0 -7
  184. package/date/getFinancialYearToYesterday.js +0 -20
  185. package/date/getFinancialYearWeeks.d.ts +0 -9
  186. package/date/getFinancialYearWeeks.js +0 -33
  187. package/date/getLastWeek.d.ts +0 -10
  188. package/date/getLastWeek.js +0 -34
  189. package/date/getMax.d.ts +0 -13
  190. package/date/getMax.js +0 -24
  191. package/date/getMidnight.d.ts +0 -10
  192. package/date/getMidnight.js +0 -13
  193. package/date/getMin.d.ts +0 -13
  194. package/date/getMin.js +0 -24
  195. package/date/getMonday.d.ts +0 -15
  196. package/date/getMonday.js +0 -46
  197. package/date/getNumber.d.ts +0 -7
  198. package/date/getNumber.js +0 -20
  199. package/date/getPredefinedTimeframe.d.ts +0 -8
  200. package/date/getPredefinedTimeframe.js +0 -24
  201. package/date/getSunday.d.ts +0 -15
  202. package/date/getSunday.js +0 -42
  203. package/date/getThisWeek.d.ts +0 -10
  204. package/date/getThisWeek.js +0 -36
  205. package/date/getTimeZoned.d.ts +0 -13
  206. package/date/getTimeZoned.js +0 -55
  207. package/date/getToday.d.ts +0 -9
  208. package/date/getToday.js +0 -24
  209. package/date/getTodayYmd.d.ts +0 -5
  210. package/date/getTodayYmd.js +0 -21
  211. package/date/getTodayYmdhis.d.ts +0 -5
  212. package/date/getTodayYmdhis.js +0 -21
  213. package/date/getTwoWeeksAgo.d.ts +0 -10
  214. package/date/getTwoWeeksAgo.js +0 -36
  215. package/date/getWeeksAgo.d.ts +0 -13
  216. package/date/getWeeksAgo.js +0 -25
  217. package/date/getYesterday.d.ts +0 -9
  218. package/date/getYesterday.js +0 -52
  219. package/date/index.d.ts +0 -55
  220. package/date/index.js +0 -36
  221. package/date/isDateValid.d.ts +0 -7
  222. package/date/isDateValid.js +0 -20
  223. package/date/isLastWeek.d.ts +0 -6
  224. package/date/isLastWeek.js +0 -14
  225. package/date/isThisWeek.d.ts +0 -6
  226. package/date/isThisWeek.js +0 -14
  227. package/date/parseExcelDate.d.ts +0 -8
  228. package/date/parseExcelDate.js +0 -19
  229. package/environment/getEnvironment.d.ts +0 -6
  230. package/environment/getEnvironment.js +0 -43
  231. package/environment/index.d.ts +0 -9
  232. package/environment/index.js +0 -14
  233. package/environment/isAws.d.ts +0 -5
  234. package/environment/isAws.js +0 -8
  235. package/environment/isDevelopment.d.ts +0 -2
  236. package/environment/isDevelopment.js +0 -9
  237. package/environment/isLocalhost.d.ts +0 -5
  238. package/environment/isLocalhost.js +0 -25
  239. package/environment/isProduction.d.ts +0 -2
  240. package/environment/isProduction.js +0 -9
  241. package/environment/isStaging.d.ts +0 -2
  242. package/environment/isStaging.js +0 -9
  243. package/environment/isVercel.d.ts +0 -5
  244. package/environment/isVercel.js +0 -7
  245. package/eskimi/ageGroups.d.ts +0 -5
  246. package/eskimi/ageGroups.js +0 -41
  247. package/eskimi/campaign.d.ts +0 -19
  248. package/eskimi/campaign.js +0 -2
  249. package/eskimi/devices.d.ts +0 -5
  250. package/eskimi/devices.js +0 -13
  251. package/eskimi/endpoints.d.ts +0 -16
  252. package/eskimi/endpoints.js +0 -18
  253. package/eskimi/genders.d.ts +0 -5
  254. package/eskimi/genders.js +0 -13
  255. package/eskimi/getAccessToken.d.ts +0 -9
  256. package/eskimi/getAccessToken.js +0 -23
  257. package/eskimi/getAgeGroup.d.ts +0 -7
  258. package/eskimi/getAgeGroup.js +0 -17
  259. package/eskimi/getCampaignIds.d.ts +0 -7
  260. package/eskimi/getCampaignIds.js +0 -12
  261. package/eskimi/getData.d.ts +0 -8
  262. package/eskimi/getData.js +0 -23
  263. package/eskimi/getDevice.d.ts +0 -7
  264. package/eskimi/getDevice.js +0 -17
  265. package/eskimi/getGender.d.ts +0 -7
  266. package/eskimi/getGender.js +0 -17
  267. package/file/createDirectory.d.ts +0 -9
  268. package/file/createDirectory.js +0 -16
  269. package/file/writeFile.d.ts +0 -1
  270. package/file/writeFile.js +0 -2
  271. package/global/forceUpdate.d.ts +0 -8
  272. package/global/forceUpdate.js +0 -25
  273. package/global/init.d.ts +0 -10
  274. package/global/init.js +0 -18
  275. package/global/isSet.d.ts +0 -8
  276. package/global/isSet.js +0 -9
  277. package/global/maxCache.d.ts +0 -8
  278. package/global/maxCache.js +0 -17
  279. package/global/read.d.ts +0 -8
  280. package/global/read.js +0 -30
  281. package/google/bigQuery/IsTableExists.d.ts +0 -11
  282. package/google/bigQuery/IsTableExists.js +0 -25
  283. package/google/bigQuery/createDataset.d.ts +0 -11
  284. package/google/bigQuery/createDataset.js +0 -22
  285. package/google/bigQuery/createTable.d.ts +0 -12
  286. package/google/bigQuery/createTable.js +0 -31
  287. package/google/bigQuery/getClient.d.ts +0 -9
  288. package/google/bigQuery/getClient.js +0 -18
  289. package/google/bigQuery/getDatasets.d.ts +0 -13
  290. package/google/bigQuery/getDatasets.js +0 -27
  291. package/google/bigQuery/getTables.d.ts +0 -12
  292. package/google/bigQuery/getTables.js +0 -25
  293. package/google/bigQuery/initClient.d.ts +0 -11
  294. package/google/bigQuery/initClient.js +0 -29
  295. package/google/bigQuery/isDatasetExists.d.ts +0 -11
  296. package/google/bigQuery/isDatasetExists.js +0 -25
  297. package/google/bigQuery/loadData.d.ts +0 -18
  298. package/google/bigQuery/loadData.js +0 -32
  299. package/google/bigQuery/query.d.ts +0 -19
  300. package/google/bigQuery/query.js +0 -15
  301. package/google/getConfig.d.ts +0 -20
  302. package/google/getConfig.js +0 -23
  303. package/google/sheets/getAssociatedData.d.ts +0 -16
  304. package/google/sheets/getAssociatedData.js +0 -53
  305. package/google/sheets/getBatchData.d.ts +0 -18
  306. package/google/sheets/getBatchData.js +0 -19
  307. package/google/sheets/initClient.d.ts +0 -11
  308. package/google/sheets/initClient.js +0 -25
  309. package/google/sheets/isCellNa.d.ts +0 -7
  310. package/google/sheets/isCellNa.js +0 -7
  311. package/google/storage/copyToCloud.d.ts +0 -11
  312. package/google/storage/copyToCloud.js +0 -18
  313. package/google/storage/getClient.d.ts +0 -8
  314. package/google/storage/getClient.js +0 -18
  315. package/google/storage/initClient.d.ts +0 -12
  316. package/google/storage/initClient.js +0 -29
  317. package/google/storage/isFileExists.d.ts +0 -10
  318. package/google/storage/isFileExists.js +0 -19
  319. package/google/storage/writeFile.d.ts +0 -11
  320. package/google/storage/writeFile.js +0 -37
  321. package/googleAds/getCustomer.d.ts +0 -8
  322. package/googleAds/getCustomer.js +0 -14
  323. package/googleAds/initClient.d.ts +0 -16
  324. package/googleAds/initClient.js +0 -25
  325. package/googleAds/keywordPlanner/index.d.ts +0 -238
  326. package/googleAds/keywordPlanner/index.js +0 -244
  327. package/googleAds/keywordPlanner/request.d.ts +0 -18
  328. package/googleAds/keywordPlanner/request.js +0 -13
  329. package/googleAds/keywordPlanner/response.d.ts +0 -25
  330. package/googleAds/keywordPlanner/response.js +0 -2
  331. package/initClients.d.ts +0 -43
  332. package/initClients.js +0 -131
  333. package/json/getJsonNewline.d.ts +0 -5
  334. package/json/getJsonNewline.js +0 -17
  335. package/json/isJson.d.ts +0 -8
  336. package/json/isJson.js +0 -20
  337. package/littleWarden/getUrlStatus.d.ts +0 -9
  338. package/littleWarden/getUrlStatus.js +0 -21
  339. package/littleWarden/index.d.ts +0 -5
  340. package/littleWarden/index.js +0 -9
  341. package/littleWarden/isAllGood.d.ts +0 -7
  342. package/littleWarden/isAllGood.js +0 -15
  343. package/littleWarden/isDanger.d.ts +0 -7
  344. package/littleWarden/isDanger.js +0 -15
  345. package/littleWarden/isWarning.d.ts +0 -7
  346. package/littleWarden/isWarning.js +0 -15
  347. package/lumar/api/buildRequest.d.ts +0 -15
  348. package/lumar/api/buildRequest.js +0 -83
  349. package/lumar/api/filter.d.ts +0 -5
  350. package/lumar/api/filter.js +0 -2
  351. package/lumar/api/getData.d.ts +0 -6
  352. package/lumar/api/getData.js +0 -18
  353. package/lumar/api/initClient.d.ts +0 -13
  354. package/lumar/api/initClient.js +0 -38
  355. package/lumar/api/operands.d.ts +0 -11
  356. package/lumar/api/operands.js +0 -13
  357. package/lumar/api/orders.d.ts +0 -9
  358. package/lumar/api/orders.js +0 -7
  359. package/lumar/api/reports.d.ts +0 -11
  360. package/lumar/api/reports.js +0 -13
  361. package/lumar/graphql/columns.d.ts +0 -29
  362. package/lumar/graphql/columns.js +0 -31
  363. package/lumar/graphql/getData.d.ts +0 -9
  364. package/lumar/graphql/getData.js +0 -26
  365. package/lumar/graphql/getReportKey.d.ts +0 -9
  366. package/lumar/graphql/getReportKey.js +0 -9
  367. package/lumar/graphql/initClient.d.ts +0 -12
  368. package/lumar/graphql/initClient.js +0 -38
  369. package/lumar/graphql/operands.d.ts +0 -16
  370. package/lumar/graphql/operands.js +0 -18
  371. package/lumar/graphql/queries/crawl.d.ts +0 -5
  372. package/lumar/graphql/queries/crawl.js +0 -2
  373. package/lumar/graphql/queries/getCrawls.d.ts +0 -18
  374. package/lumar/graphql/queries/getCrawls.js +0 -33
  375. package/lumar/graphql/queries/getReportDifferences.d.ts +0 -24
  376. package/lumar/graphql/queries/getReportDifferences.js +0 -40
  377. package/lumar/graphql/queries/getRows.d.ts +0 -38
  378. package/lumar/graphql/queries/getRows.js +0 -57
  379. package/lumar/graphql/queries/getTotals.d.ts +0 -25
  380. package/lumar/graphql/queries/getTotals.js +0 -40
  381. package/lumar/graphql/queries/row.d.ts +0 -157
  382. package/lumar/graphql/queries/row.js +0 -2
  383. package/lumar/graphql/reportTemplates.d.ts +0 -68
  384. package/lumar/graphql/reportTemplates.js +0 -70
  385. package/lumar/graphql/reportTypes.d.ts +0 -7
  386. package/lumar/graphql/reportTypes.js +0 -9
  387. package/myTarget/getAccessToken.d.ts +0 -9
  388. package/myTarget/getAccessToken.js +0 -23
  389. package/myTarget/request.d.ts +0 -9
  390. package/myTarget/request.js +0 -23
  391. package/nextAuth/index.d.ts +0 -5
  392. package/nextAuth/index.js +0 -9
  393. package/nextAuth/isSessionReady.d.ts +0 -4
  394. package/nextAuth/isSessionReady.js +0 -12
  395. package/nextJs/getIp.d.ts +0 -7
  396. package/nextJs/getIp.js +0 -13
  397. package/nextJs/getUserAgent.d.ts +0 -7
  398. package/nextJs/getUserAgent.js +0 -7
  399. package/number/format.d.ts +0 -11
  400. package/number/format.js +0 -23
  401. package/number/getCurrency.d.ts +0 -10
  402. package/number/getCurrency.js +0 -20
  403. package/number/getDecimal.d.ts +0 -9
  404. package/number/getDecimal.js +0 -16
  405. package/number/getDivide.d.ts +0 -11
  406. package/number/getDivide.js +0 -26
  407. package/number/getNumber.d.ts +0 -8
  408. package/number/getNumber.js +0 -51
  409. package/number/getPercentIncrease.d.ts +0 -10
  410. package/number/getPercentIncrease.js +0 -22
  411. package/object/replaceKeys.d.ts +0 -10
  412. package/object/replaceKeys.js +0 -30
  413. package/prisma/getDecimal.d.ts +0 -9
  414. package/prisma/getDecimal.js +0 -18
  415. package/prisma/initClient.d.ts +0 -6
  416. package/prisma/initClient.js +0 -36
  417. package/snapchat/getAccessToken.d.ts +0 -9
  418. package/snapchat/getAccessToken.js +0 -35
  419. package/sorting/byNumberAscending.d.ts +0 -8
  420. package/sorting/byNumberAscending.js +0 -17
  421. package/sorting/byNumberDescending.d.ts +0 -8
  422. package/sorting/byNumberDescending.js +0 -17
  423. package/sorting/byStringAscending.d.ts +0 -8
  424. package/sorting/byStringAscending.js +0 -21
  425. package/sorting/byStringDescending.d.ts +0 -8
  426. package/sorting/byStringDescending.js +0 -21
  427. package/stream/sort.d.ts +0 -14
  428. package/stream/sort.js +0 -50
  429. package/string/getCapitalised.d.ts +0 -10
  430. package/string/getCapitalised.js +0 -17
  431. package/string/getClean.d.ts +0 -18
  432. package/string/getClean.js +0 -65
  433. package/string/getDecoded.d.ts +0 -10
  434. package/string/getDecoded.js +0 -26
  435. package/string/getFolder.d.ts +0 -8
  436. package/string/getFolder.js +0 -14
  437. package/string/getProperCase.d.ts +0 -11
  438. package/string/getProperCase.js +0 -27
  439. package/string/getString.d.ts +0 -7
  440. package/string/getString.js +0 -34
  441. package/string/getStringFromStream.d.ts +0 -8
  442. package/string/getStringFromStream.js +0 -16
  443. package/string/getWithoutAccents.d.ts +0 -9
  444. package/string/getWithoutAccents.js +0 -16
  445. package/string/getWithoutHtmlTags.d.ts +0 -9
  446. package/string/getWithoutHtmlTags.js +0 -15
  447. package/string/getWithoutPunctuation.d.ts +0 -9
  448. package/string/getWithoutPunctuation.js +0 -16
  449. package/string/getWithoutUnderscores.d.ts +0 -8
  450. package/string/getWithoutUnderscores.js +0 -14
  451. package/string/getWithoutWhitespaces.d.ts +0 -9
  452. package/string/getWithoutWhitespaces.js +0 -16
  453. package/swr/isAllData.d.ts +0 -7
  454. package/swr/isAllData.js +0 -19
  455. package/swr/isAnyError.d.ts +0 -7
  456. package/swr/isAnyError.js +0 -19
  457. package/swr/isAnyLoading.d.ts +0 -7
  458. package/swr/isAnyLoading.js +0 -21
  459. package/swr/isData.d.ts +0 -7
  460. package/swr/isData.js +0 -9
  461. package/swr/isError.d.ts +0 -7
  462. package/swr/isError.js +0 -7
  463. package/swr/isLoading.d.ts +0 -7
  464. package/swr/isLoading.js +0 -12
  465. package/upTimeRobot/getMonitors.d.ts +0 -1
  466. package/upTimeRobot/getMonitors.js +0 -33
  467. package/upTimeRobot/logTypes.d.ts +0 -7
  468. package/upTimeRobot/logTypes.js +0 -9
  469. package/upTimeRobot/monitorStatuses.d.ts +0 -8
  470. package/upTimeRobot/monitorStatuses.js +0 -10
  471. package/upTimeRobot/monitorSubTypes.d.ts +0 -10
  472. package/upTimeRobot/monitorSubTypes.js +0 -12
  473. package/upTimeRobot/monitorTypes.d.ts +0 -8
  474. package/upTimeRobot/monitorTypes.js +0 -10
  475. package/upTimeRobot/requestStatuses.d.ts +0 -5
  476. package/upTimeRobot/requestStatuses.js +0 -7
  477. package/url/buildParameters.d.ts +0 -8
  478. package/url/buildParameters.js +0 -22
  479. package/url/buildRelative.d.ts +0 -8
  480. package/url/buildRelative.js +0 -13
  481. package/url/buildUrl.d.ts +0 -10
  482. package/url/buildUrl.js +0 -29
  483. package/url/isAbsolute.d.ts +0 -7
  484. package/url/isAbsolute.js +0 -15
  485. package/url/isRelative.d.ts +0 -7
  486. package/url/isRelative.js +0 -8
  487. package/url/url.d.ts +0 -6
  488. package/url/url.js +0 -2
  489. package/url/writeUrlContents.d.ts +0 -11
  490. package/url/writeUrlContents.js +0 -43
  491. package/util/defaultTo.d.ts +0 -10
  492. package/util/defaultTo.js +0 -43
  493. package/util/getBrotliCompressed.d.ts +0 -9
  494. package/util/getBrotliCompressed.js +0 -19
  495. package/util/getBrotliDecompressed.d.ts +0 -9
  496. package/util/getBrotliDecompressed.js +0 -20
  497. package/util/getClean.d.ts +0 -11
  498. package/util/getClean.js +0 -28
  499. package/util/getGzipCompressed.d.ts +0 -9
  500. package/util/getGzipCompressed.js +0 -19
  501. package/util/getGzipDecompressed.d.ts +0 -9
  502. package/util/getGzipDecompressed.js +0 -20
  503. package/util/getWithoutHash.d.ts +0 -8
  504. package/util/getWithoutHash.js +0 -17
  505. package/util/getWithoutParameter.d.ts +0 -8
  506. package/util/getWithoutParameter.js +0 -17
  507. package/util/isUndefined.d.ts +0 -9
  508. package/util/isUndefined.js +0 -19
  509. package/util/promiseChunks.d.ts +0 -10
  510. package/util/promiseChunks.js +0 -18
  511. package/util/sleep.d.ts +0 -5
  512. package/util/sleep.js +0 -6
  513. package/webWorker/index.d.ts +0 -5
  514. package/webWorker/index.js +0 -9
  515. package/xml/getXml.d.ts +0 -5
  516. package/xml/getXml.js +0 -22
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Converts a stream into a string.
5
- * https://stackoverflow.com/a/49428486
6
- */
7
- const getStringFromStream = ({ stream }) => {
8
- const chunks = [];
9
- return new Promise((resolve, reject) => {
10
- stream.on('data', (chunk) => chunks.push(Buffer.from(chunk)));
11
- stream.on('error', (err) => reject(err));
12
- stream.on('end', () => resolve(Buffer.concat(chunks)
13
- .toString('utf8')));
14
- });
15
- };
16
- exports.default = getStringFromStream;
@@ -1,9 +0,0 @@
1
- type GetWithoutAccents = {
2
- input: string;
3
- };
4
- /**
5
- * Remove the accents from a string.
6
- * https://stackoverflow.com/a/37511463
7
- */
8
- declare const getWithoutAccents: ({ input }: GetWithoutAccents) => string;
9
- export default getWithoutAccents;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const getString_1 = __importDefault(require("./getString"));
7
- /**
8
- * Remove the accents from a string.
9
- * https://stackoverflow.com/a/37511463
10
- */
11
- const getWithoutAccents = ({ input }) => {
12
- return (0, getString_1.default)({ input })
13
- .normalize("NFD")
14
- .replace(/[\u0300-\u036f]/g, "");
15
- };
16
- exports.default = getWithoutAccents;
@@ -1,9 +0,0 @@
1
- type GetWithoutHtmlTags = {
2
- input: any;
3
- };
4
- /**
5
- * Removes all HTML tags from an input.
6
- * https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
7
- */
8
- declare const getWithoutHtmlTags: ({ input }: GetWithoutHtmlTags) => string;
9
- export default getWithoutHtmlTags;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const getString_1 = __importDefault(require("./getString"));
7
- /**
8
- * Removes all HTML tags from an input.
9
- * https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
10
- */
11
- const getWithoutHtmlTags = ({ input }) => {
12
- return (0, getString_1.default)({ input })
13
- .replace(/(<([^>]+)>)/gi, '');
14
- };
15
- exports.default = getWithoutHtmlTags;
@@ -1,9 +0,0 @@
1
- type GetWithoutPunctuation = {
2
- input: string;
3
- };
4
- /**
5
- * Remove all punctuation from a string and replace with a space.
6
- * https://stackoverflow.com/a/25575009
7
- */
8
- declare const getWithoutPunctuation: ({ input }: GetWithoutPunctuation) => string;
9
- export default getWithoutPunctuation;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const getString_1 = __importDefault(require("./getString"));
7
- /**
8
- * Remove all punctuation from a string and replace with a space.
9
- * https://stackoverflow.com/a/25575009
10
- */
11
- const getWithoutPunctuation = ({ input }) => {
12
- return (0, getString_1.default)({ input })
13
- .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g, '')
14
- .replace(/\s+/g, ' ');
15
- };
16
- exports.default = getWithoutPunctuation;
@@ -1,8 +0,0 @@
1
- type GetWithoutUnderscores = {
2
- input: string;
3
- };
4
- /**
5
- * Replace all underscores with a space.
6
- */
7
- declare const getWithoutUnderscores: ({ input }: GetWithoutUnderscores) => string;
8
- export default getWithoutUnderscores;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const getString_1 = __importDefault(require("./getString"));
7
- /**
8
- * Replace all underscores with a space.
9
- */
10
- const getWithoutUnderscores = ({ input }) => {
11
- return (0, getString_1.default)({ input })
12
- .replace('_', ' ');
13
- };
14
- exports.default = getWithoutUnderscores;
@@ -1,9 +0,0 @@
1
- type GetWithoutWhitespaces = {
2
- input: string;
3
- };
4
- /**
5
- * Remove all new lines, tabs multiple spaces, with a single space.
6
- * https://stackoverflow.com/a/45029224
7
- */
8
- declare const getWithoutWhitespaces: ({ input }: GetWithoutWhitespaces) => string;
9
- export default getWithoutWhitespaces;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const getString_1 = __importDefault(require("./getString"));
7
- /**
8
- * Remove all new lines, tabs multiple spaces, with a single space.
9
- * https://stackoverflow.com/a/45029224
10
- */
11
- const getWithoutWhitespaces = ({ input }) => {
12
- return (0, getString_1.default)({ input })
13
- .replace(/\s+/g, ' ')
14
- .trim();
15
- };
16
- exports.default = getWithoutWhitespaces;
@@ -1,7 +0,0 @@
1
- /**
2
- * Are all SWRs data ready.
3
- */
4
- declare const isAllData: ({ swrs }: {
5
- swrs: any;
6
- }) => boolean;
7
- export default isAllData;
package/swr/isAllData.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const isData_1 = __importDefault(require("./isData"));
7
- /**
8
- * Are all SWRs data ready.
9
- */
10
- const isAllData = ({ swrs }) => {
11
- let fetcherWithData = 0;
12
- for (const swr in swrs) {
13
- if ((0, isData_1.default)({ swr: swrs[swr] })) {
14
- fetcherWithData++;
15
- }
16
- }
17
- return fetcherWithData === Object.keys(swrs).length;
18
- };
19
- exports.default = isAllData;
@@ -1,7 +0,0 @@
1
- /**
2
- * Are any of the SWRs marked as an error.
3
- */
4
- declare const isAnyError: ({ swrs }: {
5
- swrs: any;
6
- }) => boolean;
7
- export default isAnyError;
package/swr/isAnyError.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const isError_1 = __importDefault(require("./isError"));
7
- /**
8
- * Are any of the SWRs marked as an error.
9
- */
10
- const isAnyError = ({ swrs }) => {
11
- let fetcherError = 0;
12
- for (const swr in swrs) {
13
- if ((0, isError_1.default)({ swr: swrs[swr] })) {
14
- fetcherError++;
15
- }
16
- }
17
- return fetcherError > 0;
18
- };
19
- exports.default = isAnyError;
@@ -1,7 +0,0 @@
1
- /**
2
- * Are any of SWRs loading
3
- */
4
- export declare const isAnyLoading: ({ swrs }: {
5
- swrs: any;
6
- }) => boolean;
7
- export default isAnyLoading;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.isAnyLoading = void 0;
7
- const isLoading_1 = __importDefault(require("./isLoading"));
8
- /**
9
- * Are any of SWRs loading
10
- */
11
- const isAnyLoading = ({ swrs }) => {
12
- let fetcherLoading = 0;
13
- for (const swr in swrs) {
14
- if ((0, isLoading_1.default)({ swr: swrs[swr] })) {
15
- fetcherLoading++;
16
- }
17
- }
18
- return fetcherLoading > 0;
19
- };
20
- exports.isAnyLoading = isAnyLoading;
21
- exports.default = exports.isAnyLoading;
package/swr/isData.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Check to see if a single SWR has an error.
3
- */
4
- declare const isData: ({ swr }: {
5
- swr: any;
6
- }) => boolean;
7
- export default isData;
package/swr/isData.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Check to see if a single SWR has an error.
5
- */
6
- const isData = ({ swr }) => (undefined === swr.error || null === swr.error) &&
7
- undefined !== swr.data &&
8
- 'undefined' !== swr.data;
9
- exports.default = isData;
package/swr/isError.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Check to see if a single SWR has an error.
3
- */
4
- declare const isError: ({ swr }: {
5
- swr: any;
6
- }) => boolean;
7
- export default isError;
package/swr/isError.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Check to see if a single SWR has an error.
5
- */
6
- const isError = ({ swr }) => undefined !== swr.error && null !== swr.error;
7
- exports.default = isError;
@@ -1,7 +0,0 @@
1
- /**
2
- * Check to see if a single SWR is loading.
3
- */
4
- declare const isLoading: ({ swr }: {
5
- swr: any;
6
- }) => boolean;
7
- export default isLoading;
package/swr/isLoading.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const isData_1 = __importDefault(require("./isData"));
7
- const isError_1 = __importDefault(require("./isError"));
8
- /**
9
- * Check to see if a single SWR is loading.
10
- */
11
- const isLoading = ({ swr }) => !(0, isError_1.default)({ swr }) && !(0, isData_1.default)({ swr });
12
- exports.default = isLoading;
@@ -1 +0,0 @@
1
- export {};
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const isArray_1 = __importDefault(require("lodash/isArray"));
7
- const post_1 = __importDefault(require("../axios/post"));
8
- /**
9
- * Use the Up Time Robot API to retrieve up to 50 monitors at a time.
10
- * https://uptimerobot.com/api/
11
- */
12
- const getMonitors = async ({ apiKey, params }) => {
13
- let finalParams = {};
14
- if (undefined !== params) {
15
- finalParams = {
16
- ...params,
17
- };
18
- if (undefined !== params.monitors && (0, isArray_1.default)(params.monitors)) {
19
- finalParams['monitors'] = params.monitors.join('-');
20
- }
21
- if (undefined !== params.statuses && (0, isArray_1.default)(params.statuses)) {
22
- finalParams['statuses'] = params.statuses.join('-');
23
- }
24
- if (undefined !== params.types && (0, isArray_1.default)(params.types)) {
25
- finalParams['types'] = params.types.join('-');
26
- }
27
- }
28
- const response = await (0, post_1.default)({
29
- data: finalParams,
30
- url: `https://api.uptimerobot.com/v2/getMonitors?api_key=${apiKey}`,
31
- });
32
- return response;
33
- };
@@ -1,7 +0,0 @@
1
- declare const logTypes: {
2
- DOWN: number;
3
- UP: number;
4
- PAUSED: number;
5
- STARTED: number;
6
- };
7
- export default logTypes;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const logTypes = {
4
- DOWN: 1,
5
- UP: 2,
6
- PAUSED: 99,
7
- STARTED: 98,
8
- };
9
- exports.default = logTypes;
@@ -1,8 +0,0 @@
1
- declare const monitorStatuses: {
2
- PAUSED: number;
3
- NOT_CHECKED: number;
4
- UP: number;
5
- SEEMS_DOWN: number;
6
- DOWN: number;
7
- };
8
- export default monitorStatuses;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const monitorStatuses = {
4
- PAUSED: 0,
5
- NOT_CHECKED: 1,
6
- UP: 2,
7
- SEEMS_DOWN: 8,
8
- DOWN: 9,
9
- };
10
- exports.default = monitorStatuses;
@@ -1,10 +0,0 @@
1
- declare const monitorSubTypes: {
2
- HTTP: number;
3
- HTTPS: number;
4
- FTP: number;
5
- SMTP: number;
6
- POP3: number;
7
- IMAP: number;
8
- CUSTOM_PORT: number;
9
- };
10
- export default monitorSubTypes;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const monitorSubTypes = {
4
- HTTP: 1,
5
- HTTPS: 2,
6
- FTP: 3,
7
- SMTP: 4,
8
- POP3: 5,
9
- IMAP: 6,
10
- CUSTOM_PORT: 99,
11
- };
12
- exports.default = monitorSubTypes;
@@ -1,8 +0,0 @@
1
- declare const monitorTypes: {
2
- HTTPS: number;
3
- KEYWORD: number;
4
- PING: number;
5
- PORT: number;
6
- HEARTBEAT: number;
7
- };
8
- export default monitorTypes;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const monitorTypes = {
4
- HTTPS: 1,
5
- KEYWORD: 2,
6
- PING: 3,
7
- PORT: 4,
8
- HEARTBEAT: 5,
9
- };
10
- exports.default = monitorTypes;
@@ -1,5 +0,0 @@
1
- declare const requestStatuses: {
2
- ERROR: string;
3
- SUCCESS: string;
4
- };
5
- export default requestStatuses;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const requestStatuses = {
4
- ERROR: 'fail',
5
- SUCCESS: 'ok',
6
- };
7
- exports.default = requestStatuses;
@@ -1,8 +0,0 @@
1
- /**
2
- * Take an object and return the parameter for a given URL irrespective of path.
3
- */
4
- declare const buildParameters: ({ existing, updated }: {
5
- existing: object;
6
- updated: object;
7
- }) => string;
8
- export default buildParameters;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const merge_1 = __importDefault(require("lodash/merge"));
7
- /**
8
- * Take an object and return the parameter for a given URL irrespective of path.
9
- */
10
- const buildParameters = ({ existing, updated }) => {
11
- const merged = (0, merge_1.default)(existing, updated);
12
- let response = '';
13
- if (Object.values(merged).length) {
14
- for (const key in merged) {
15
- const value = undefined === updated[key] ? existing[key] : updated[key];
16
- response += '' === response ? '?' : '&';
17
- response += `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
18
- }
19
- }
20
- return response;
21
- };
22
- exports.default = buildParameters;
@@ -1,8 +0,0 @@
1
- /**
2
- * Create a new relative URL based on the current path.
3
- */
4
- declare const buildRelative: ({ router, updated }: {
5
- router: any;
6
- updated: object;
7
- }) => string;
8
- export default buildRelative;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const buildParameters_1 = __importDefault(require("./buildParameters"));
7
- /**
8
- * Create a new relative URL based on the current path.
9
- */
10
- const buildRelative = ({ router, updated }) => {
11
- return `${router.pathname}${(0, buildParameters_1.default)({ existing: router.query, updated: updated || {} })}`;
12
- };
13
- exports.default = buildRelative;
package/url/buildUrl.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { Url } from './url';
2
- type BuildUrlType = {
3
- path: string;
4
- url: Url;
5
- };
6
- /**
7
- * Get the current base url.
8
- */
9
- declare const buildUrl: ({ path, url }: BuildUrlType) => string;
10
- export default buildUrl;
package/url/buildUrl.js DELETED
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const isDevelopment_1 = __importDefault(require("../environment/isDevelopment"));
7
- const isLocalhost_1 = __importDefault(require("../environment/isLocalhost"));
8
- const isProduction_1 = __importDefault(require("../environment/isProduction"));
9
- const isStaging_1 = __importDefault(require("../environment/isStaging"));
10
- /**
11
- * Get the current base url.
12
- */
13
- const buildUrl = ({ path, url }) => {
14
- let response;
15
- if ((0, isDevelopment_1.default)() && (0, isLocalhost_1.default)()) {
16
- response = url.localhost;
17
- }
18
- else if ((0, isStaging_1.default)()) {
19
- response = url.staging;
20
- }
21
- else if ((0, isProduction_1.default)()) {
22
- response = url.production;
23
- }
24
- else {
25
- response = url.development;
26
- }
27
- return response + path || '';
28
- };
29
- exports.default = buildUrl;
@@ -1,7 +0,0 @@
1
- /**
2
- * Does the URL begin with HTTP or HTTPS?
3
- */
4
- declare const isAbsolute: ({ input }: {
5
- input: string;
6
- }) => boolean;
7
- export default isAbsolute;
package/url/isAbsolute.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Does the URL begin with HTTP or HTTPS?
5
- */
6
- const isAbsolute = ({ input }) => {
7
- try {
8
- new URL(input);
9
- }
10
- catch (error) {
11
- return false;
12
- }
13
- return true;
14
- };
15
- exports.default = isAbsolute;
@@ -1,7 +0,0 @@
1
- /**
2
- * Does the URL begin with a slash.
3
- */
4
- declare const isRelative: ({ input }: {
5
- input: string;
6
- }) => boolean;
7
- export default isRelative;
package/url/isRelative.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Does the URL begin with a slash.
5
- */
6
- const isRelative = ({ input }) => '/' === input.trim()
7
- .charAt(0);
8
- exports.default = isRelative;
package/url/url.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export type Url = {
2
- localhost: string;
3
- development: string;
4
- staging: string;
5
- production: string;
6
- };
package/url/url.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- type WriteUrlContents = {
2
- filePath: string;
3
- url: string;
4
- };
5
- /**
6
- * Downloads a given URL's contents to a local file.
7
- *
8
- * Requires fs-extra
9
- */
10
- declare const saveUrlContents: ({ filePath, url }: WriteUrlContents) => Promise<void>;
11
- export default saveUrlContents;