@onivoro/isomorphic-common 22.0.7 → 24.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.
Files changed (330) hide show
  1. package/README.md +289 -0
  2. package/jest.config.ts +11 -0
  3. package/package.json +8 -39
  4. package/project.json +23 -0
  5. package/{dist/cjs/index.d.ts → src/index.ts} +41 -4
  6. package/src/lib/constants/api-id-header.constant.ts +1 -0
  7. package/src/lib/constants/api-key-header.constant.ts +1 -0
  8. package/src/lib/constants/auth-cookie-name.constant.ts +2 -0
  9. package/src/lib/constants/millis-per-day.constant.ts +3 -0
  10. package/src/lib/constants/millis-per-hour.constant.ts +3 -0
  11. package/src/lib/constants/millis-per-minute.constant.ts +1 -0
  12. package/src/lib/constants/regexes.constant.ts +30 -0
  13. package/src/lib/functions/__snapshots__/chunk.function.spec.ts.snap +94 -0
  14. package/src/lib/functions/__snapshots__/split-date-range-into-days.function.spec.ts.snap +50 -0
  15. package/src/lib/functions/add-offset.function.spec.ts +12 -0
  16. package/src/lib/functions/add-offset.function.ts +14 -0
  17. package/src/lib/functions/arrange-act-assert.function.ts +23 -0
  18. package/src/lib/functions/camel-case.function.ts +30 -0
  19. package/src/lib/functions/chunk.function.spec.ts +20 -0
  20. package/src/lib/functions/chunk.function.ts +25 -0
  21. package/src/lib/functions/convert-object-to-literal.function.spec.ts +16 -0
  22. package/src/lib/functions/convert-object-to-literal.function.ts +10 -0
  23. package/src/lib/functions/format-usd.function.ts +4 -0
  24. package/src/lib/functions/from-boolean-string.function.ts +3 -0
  25. package/src/lib/functions/from-calendar-date.function.spec.ts +11 -0
  26. package/src/lib/functions/from-calendar-date.function.ts +5 -0
  27. package/src/lib/functions/from-csv-string.function.ts +3 -0
  28. package/src/lib/functions/get-date-last-month.function.ts +6 -0
  29. package/src/lib/functions/get-date-range-for-month.function copy.ts +8 -0
  30. package/src/lib/functions/get-date-range-for-month.function.ts +8 -0
  31. package/src/lib/functions/get-tag.function.ts +10 -0
  32. package/src/lib/functions/get-user-full-name.function.ts +5 -0
  33. package/src/lib/functions/is-symbol.function.ts +11 -0
  34. package/src/lib/functions/is-valid-date.function.ts +5 -0
  35. package/src/lib/functions/kebab-case.function.ts +5 -0
  36. package/src/lib/functions/map-entities-to-options.function.ts +11 -0
  37. package/src/lib/functions/map-enum-to-array-of-values.function copy.ts +3 -0
  38. package/src/lib/functions/map-enum-to-array-of-values.function.ts +3 -0
  39. package/src/lib/functions/map-enum-to-lookup-array.function.ts +6 -0
  40. package/src/lib/functions/map-enum-to-options.function copy.ts +7 -0
  41. package/src/lib/functions/map-enum-to-options.function.ts +7 -0
  42. package/src/lib/functions/mock-calls.function.ts +4 -0
  43. package/src/lib/functions/money.function.spec.ts +10 -0
  44. package/src/lib/functions/money.function.ts +22 -0
  45. package/src/lib/functions/parse-bool.function.ts +3 -0
  46. package/src/lib/functions/properties-to-array.function.ts +21 -0
  47. package/src/lib/functions/remove-alpha-chars.function.spec.ts +11 -0
  48. package/src/lib/functions/remove-alpha-chars.function.ts +9 -0
  49. package/src/lib/functions/remove-element-at-index.function copy.ts +9 -0
  50. package/src/lib/functions/remove-element-at-index.function.ts +9 -0
  51. package/src/lib/functions/round.function copy.ts +4 -0
  52. package/src/lib/functions/round.function.ts +4 -0
  53. package/src/lib/functions/sanitize-filename.function.ts +9 -0
  54. package/src/lib/functions/sleep.function.ts +3 -0
  55. package/{dist/esm/lib/functions/snake-case.function.js → src/lib/functions/snake-case.function.ts} +9 -6
  56. package/src/lib/functions/sort-by-created-at.function.ts +7 -0
  57. package/src/lib/functions/sort-by-full-name.function.ts +6 -0
  58. package/src/lib/functions/sort-by-id.function.ts +3 -0
  59. package/src/lib/functions/sort-by-name.function.ts +3 -0
  60. package/src/lib/functions/sort-numbers.function.ts +3 -0
  61. package/src/lib/functions/split-date-range-into-days.function.spec.ts +17 -0
  62. package/src/lib/functions/split-date-range-into-days.function.ts +26 -0
  63. package/src/lib/functions/subtract-offset.function.spec.ts +12 -0
  64. package/src/lib/functions/subtract-offset.function.ts +14 -0
  65. package/src/lib/functions/to-boolean-string.function.ts +3 -0
  66. package/src/lib/functions/to-calendar-date.function.ts +11 -0
  67. package/src/lib/functions/to-csv-string.function.ts +3 -0
  68. package/{dist/cjs/lib/functions/to-decimal-base.function.js → src/lib/functions/to-decimal-base.function.ts} +9 -7
  69. package/src/lib/functions/to-dollars-and-cents.function.spec.ts +7 -0
  70. package/src/lib/functions/to-dollars-and-cents.function.ts +17 -0
  71. package/{dist/cjs/lib/functions/to-string.function.js → src/lib/functions/to-string.function.ts} +6 -6
  72. package/src/lib/functions/to-unique-array.function.spec.ts +45 -0
  73. package/src/lib/functions/to-unique-array.function.ts +3 -0
  74. package/src/lib/functions/to-words.function.spec.ts +7 -0
  75. package/{dist/cjs/lib/functions/to-words.function.js → src/lib/functions/to-words.function.ts} +43 -26
  76. package/src/lib/functions/try-json-parse.spec.ts +37 -0
  77. package/src/lib/functions/try-json-parse.ts +11 -0
  78. package/src/lib/functions/try-json-stringify.spec.ts +44 -0
  79. package/src/lib/functions/try-json-stringify.ts +11 -0
  80. package/src/lib/functions/try-parse-date.function.spec.ts +12 -0
  81. package/src/lib/functions/try-parse-date.function.ts +17 -0
  82. package/src/lib/functions/unicode-words.const.ts +70 -0
  83. package/src/lib/functions/upper-first.function.spec.ts +16 -0
  84. package/src/lib/functions/upper-first.function.ts +10 -0
  85. package/src/lib/functions/use-date.function.ts +21 -0
  86. package/src/lib/functions/words.function.ts +38 -0
  87. package/src/lib/types/access-token.interface.ts +8 -0
  88. package/{dist/esm/lib/interfaces/axios-wrapped-nest-exception.interface.d.ts → src/lib/types/axios-wrapped-nest-exception.interface.ts} +1 -1
  89. package/src/lib/types/company.type.ts +18 -0
  90. package/src/lib/types/createable.type.ts +1 -0
  91. package/{dist/cjs/lib/interfaces/entity-provider.interface.d.ts → src/lib/types/entity-provider.interface.ts} +1 -1
  92. package/src/lib/types/keys-of.type copy.ts +1 -0
  93. package/src/lib/types/keys-of.type.ts +1 -0
  94. package/{dist/types/lib/interfaces/lookup.interface.d.ts → src/lib/types/lookup.interface copy.ts } +2 -2
  95. package/{dist/cjs/lib/interfaces/lookup.interface.d.ts → src/lib/types/lookup.interface.ts} +2 -2
  96. package/src/lib/types/nameable.type.ts +4 -0
  97. package/tsconfig.json +13 -0
  98. package/tsconfig.lib.json +9 -0
  99. package/tsconfig.spec.json +14 -0
  100. package/dist/cjs/index.js +0 -59
  101. package/dist/cjs/lib/constants/millis-per-day.constant.d.ts +0 -1
  102. package/dist/cjs/lib/constants/millis-per-day.constant.js +0 -5
  103. package/dist/cjs/lib/constants/millis-per-hour.constant.d.ts +0 -1
  104. package/dist/cjs/lib/constants/millis-per-hour.constant.js +0 -5
  105. package/dist/cjs/lib/constants/millis-per-minute.constant.d.ts +0 -1
  106. package/dist/cjs/lib/constants/millis-per-minute.constant.js +0 -4
  107. package/dist/cjs/lib/constants/regexes.constant.d.ts +0 -27
  108. package/dist/cjs/lib/constants/regexes.constant.js +0 -30
  109. package/dist/cjs/lib/functions/add-offset.function.d.ts +0 -1
  110. package/dist/cjs/lib/functions/add-offset.function.js +0 -13
  111. package/dist/cjs/lib/functions/camel-case.function.d.ts +0 -20
  112. package/dist/cjs/lib/functions/camel-case.function.js +0 -31
  113. package/dist/cjs/lib/functions/convert-object-to-literal.function.d.ts +0 -1
  114. package/dist/cjs/lib/functions/convert-object-to-literal.function.js +0 -9
  115. package/dist/cjs/lib/functions/format-usd.function.d.ts +0 -1
  116. package/dist/cjs/lib/functions/format-usd.function.js +0 -7
  117. package/dist/cjs/lib/functions/from-boolean-string.function.d.ts +0 -1
  118. package/dist/cjs/lib/functions/from-boolean-string.function.js +0 -6
  119. package/dist/cjs/lib/functions/from-calendar-date.function.d.ts +0 -1
  120. package/dist/cjs/lib/functions/from-calendar-date.function.js +0 -7
  121. package/dist/cjs/lib/functions/from-csv-string.function.d.ts +0 -1
  122. package/dist/cjs/lib/functions/from-csv-string.function.js +0 -6
  123. package/dist/cjs/lib/functions/get-date-range-for-month.function.d.ts +0 -4
  124. package/dist/cjs/lib/functions/get-date-range-for-month.function.js +0 -9
  125. package/dist/cjs/lib/functions/get-tag.function.d.ts +0 -1
  126. package/dist/cjs/lib/functions/get-tag.function.js +0 -11
  127. package/dist/cjs/lib/functions/is-symbol.function.d.ts +0 -1
  128. package/dist/cjs/lib/functions/is-symbol.function.js +0 -10
  129. package/dist/cjs/lib/functions/is-valid-date.function.d.ts +0 -1
  130. package/dist/cjs/lib/functions/is-valid-date.function.js +0 -7
  131. package/dist/cjs/lib/functions/kebab-case.function.d.ts +0 -1
  132. package/dist/cjs/lib/functions/kebab-case.function.js +0 -7
  133. package/dist/cjs/lib/functions/map-enum-to-array-of-values.function.d.ts +0 -1
  134. package/dist/cjs/lib/functions/map-enum-to-array-of-values.function.js +0 -6
  135. package/dist/cjs/lib/functions/map-enum-to-lookup-array.function.d.ts +0 -2
  136. package/dist/cjs/lib/functions/map-enum-to-lookup-array.function.js +0 -7
  137. package/dist/cjs/lib/functions/map-enum-to-options.function.d.ts +0 -4
  138. package/dist/cjs/lib/functions/map-enum-to-options.function.js +0 -9
  139. package/dist/cjs/lib/functions/money.function.d.ts +0 -1
  140. package/dist/cjs/lib/functions/money.function.js +0 -19
  141. package/dist/cjs/lib/functions/parse-bool.function.d.ts +0 -1
  142. package/dist/cjs/lib/functions/parse-bool.function.js +0 -6
  143. package/dist/cjs/lib/functions/properties-to-array.function.d.ts +0 -1
  144. package/dist/cjs/lib/functions/properties-to-array.function.js +0 -18
  145. package/dist/cjs/lib/functions/remove-alpha-chars.function.d.ts +0 -1
  146. package/dist/cjs/lib/functions/remove-alpha-chars.function.js +0 -10
  147. package/dist/cjs/lib/functions/remove-element-at-index.function.d.ts +0 -1
  148. package/dist/cjs/lib/functions/remove-element-at-index.function.js +0 -12
  149. package/dist/cjs/lib/functions/round.function.d.ts +0 -1
  150. package/dist/cjs/lib/functions/round.function.js +0 -7
  151. package/dist/cjs/lib/functions/sanitize-filename.function.d.ts +0 -1
  152. package/dist/cjs/lib/functions/sanitize-filename.function.js +0 -10
  153. package/dist/cjs/lib/functions/sleep.function.d.ts +0 -1
  154. package/dist/cjs/lib/functions/sleep.function.js +0 -6
  155. package/dist/cjs/lib/functions/snake-case.function.d.ts +0 -24
  156. package/dist/cjs/lib/functions/snake-case.function.js +0 -31
  157. package/dist/cjs/lib/functions/subtract-offset.function.d.ts +0 -1
  158. package/dist/cjs/lib/functions/subtract-offset.function.js +0 -13
  159. package/dist/cjs/lib/functions/to-boolean-string.function.d.ts +0 -1
  160. package/dist/cjs/lib/functions/to-boolean-string.function.js +0 -6
  161. package/dist/cjs/lib/functions/to-calendar-date.function.d.ts +0 -1
  162. package/dist/cjs/lib/functions/to-calendar-date.function.js +0 -11
  163. package/dist/cjs/lib/functions/to-csv-string.function.d.ts +0 -1
  164. package/dist/cjs/lib/functions/to-csv-string.function.js +0 -6
  165. package/dist/cjs/lib/functions/to-decimal-base.function.d.ts +0 -1
  166. package/dist/cjs/lib/functions/to-dollars-and-cents.function.d.ts +0 -1
  167. package/dist/cjs/lib/functions/to-dollars-and-cents.function.js +0 -16
  168. package/dist/cjs/lib/functions/to-string.function.d.ts +0 -1
  169. package/dist/cjs/lib/functions/to-unique-array.function.d.ts +0 -1
  170. package/dist/cjs/lib/functions/to-unique-array.function.js +0 -6
  171. package/dist/cjs/lib/functions/to-words.function.d.ts +0 -1
  172. package/dist/cjs/lib/functions/try-json-parse.d.ts +0 -1
  173. package/dist/cjs/lib/functions/try-json-parse.js +0 -14
  174. package/dist/cjs/lib/functions/try-json-stringify.d.ts +0 -1
  175. package/dist/cjs/lib/functions/try-json-stringify.js +0 -14
  176. package/dist/cjs/lib/functions/try-parse-date.function.d.ts +0 -1
  177. package/dist/cjs/lib/functions/try-parse-date.function.js +0 -16
  178. package/dist/cjs/lib/functions/unicode-words.const.d.ts +0 -8
  179. package/dist/cjs/lib/functions/unicode-words.const.js +0 -68
  180. package/dist/cjs/lib/functions/upper-first.function.d.ts +0 -1
  181. package/dist/cjs/lib/functions/upper-first.function.js +0 -12
  182. package/dist/cjs/lib/functions/words.function.d.ts +0 -17
  183. package/dist/cjs/lib/functions/words.function.js +0 -34
  184. package/dist/cjs/lib/interfaces/axios-wrapped-nest-exception.interface.d.ts +0 -5
  185. package/dist/cjs/lib/interfaces/axios-wrapped-nest-exception.interface.js +0 -2
  186. package/dist/cjs/lib/interfaces/entity-provider.interface.js +0 -2
  187. package/dist/cjs/lib/interfaces/keys-of.type.d.ts +0 -3
  188. package/dist/cjs/lib/interfaces/keys-of.type.js +0 -2
  189. package/dist/cjs/lib/interfaces/lookup.interface.js +0 -2
  190. package/dist/esm/index.d.ts +0 -43
  191. package/dist/esm/index.js +0 -59
  192. package/dist/esm/lib/constants/millis-per-day.constant.d.ts +0 -1
  193. package/dist/esm/lib/constants/millis-per-day.constant.js +0 -5
  194. package/dist/esm/lib/constants/millis-per-hour.constant.d.ts +0 -1
  195. package/dist/esm/lib/constants/millis-per-hour.constant.js +0 -5
  196. package/dist/esm/lib/constants/millis-per-minute.constant.d.ts +0 -1
  197. package/dist/esm/lib/constants/millis-per-minute.constant.js +0 -4
  198. package/dist/esm/lib/constants/regexes.constant.d.ts +0 -27
  199. package/dist/esm/lib/constants/regexes.constant.js +0 -30
  200. package/dist/esm/lib/functions/add-offset.function.d.ts +0 -1
  201. package/dist/esm/lib/functions/add-offset.function.js +0 -13
  202. package/dist/esm/lib/functions/camel-case.function.d.ts +0 -20
  203. package/dist/esm/lib/functions/camel-case.function.js +0 -31
  204. package/dist/esm/lib/functions/convert-object-to-literal.function.d.ts +0 -1
  205. package/dist/esm/lib/functions/convert-object-to-literal.function.js +0 -9
  206. package/dist/esm/lib/functions/format-usd.function.d.ts +0 -1
  207. package/dist/esm/lib/functions/format-usd.function.js +0 -7
  208. package/dist/esm/lib/functions/from-boolean-string.function.d.ts +0 -1
  209. package/dist/esm/lib/functions/from-boolean-string.function.js +0 -6
  210. package/dist/esm/lib/functions/from-calendar-date.function.d.ts +0 -1
  211. package/dist/esm/lib/functions/from-calendar-date.function.js +0 -7
  212. package/dist/esm/lib/functions/from-csv-string.function.d.ts +0 -1
  213. package/dist/esm/lib/functions/from-csv-string.function.js +0 -6
  214. package/dist/esm/lib/functions/get-date-range-for-month.function.d.ts +0 -4
  215. package/dist/esm/lib/functions/get-date-range-for-month.function.js +0 -9
  216. package/dist/esm/lib/functions/get-tag.function.d.ts +0 -1
  217. package/dist/esm/lib/functions/get-tag.function.js +0 -11
  218. package/dist/esm/lib/functions/is-symbol.function.d.ts +0 -1
  219. package/dist/esm/lib/functions/is-symbol.function.js +0 -10
  220. package/dist/esm/lib/functions/is-valid-date.function.d.ts +0 -1
  221. package/dist/esm/lib/functions/is-valid-date.function.js +0 -7
  222. package/dist/esm/lib/functions/kebab-case.function.d.ts +0 -1
  223. package/dist/esm/lib/functions/kebab-case.function.js +0 -7
  224. package/dist/esm/lib/functions/map-enum-to-array-of-values.function.d.ts +0 -1
  225. package/dist/esm/lib/functions/map-enum-to-array-of-values.function.js +0 -6
  226. package/dist/esm/lib/functions/map-enum-to-lookup-array.function.d.ts +0 -2
  227. package/dist/esm/lib/functions/map-enum-to-lookup-array.function.js +0 -7
  228. package/dist/esm/lib/functions/map-enum-to-options.function.d.ts +0 -4
  229. package/dist/esm/lib/functions/map-enum-to-options.function.js +0 -9
  230. package/dist/esm/lib/functions/money.function.d.ts +0 -1
  231. package/dist/esm/lib/functions/money.function.js +0 -19
  232. package/dist/esm/lib/functions/parse-bool.function.d.ts +0 -1
  233. package/dist/esm/lib/functions/parse-bool.function.js +0 -6
  234. package/dist/esm/lib/functions/properties-to-array.function.d.ts +0 -1
  235. package/dist/esm/lib/functions/properties-to-array.function.js +0 -18
  236. package/dist/esm/lib/functions/remove-alpha-chars.function.d.ts +0 -1
  237. package/dist/esm/lib/functions/remove-alpha-chars.function.js +0 -10
  238. package/dist/esm/lib/functions/remove-element-at-index.function.d.ts +0 -1
  239. package/dist/esm/lib/functions/remove-element-at-index.function.js +0 -12
  240. package/dist/esm/lib/functions/round.function.d.ts +0 -1
  241. package/dist/esm/lib/functions/round.function.js +0 -7
  242. package/dist/esm/lib/functions/sanitize-filename.function.d.ts +0 -1
  243. package/dist/esm/lib/functions/sanitize-filename.function.js +0 -10
  244. package/dist/esm/lib/functions/sleep.function.d.ts +0 -1
  245. package/dist/esm/lib/functions/sleep.function.js +0 -6
  246. package/dist/esm/lib/functions/snake-case.function.d.ts +0 -24
  247. package/dist/esm/lib/functions/subtract-offset.function.d.ts +0 -1
  248. package/dist/esm/lib/functions/subtract-offset.function.js +0 -13
  249. package/dist/esm/lib/functions/to-boolean-string.function.d.ts +0 -1
  250. package/dist/esm/lib/functions/to-boolean-string.function.js +0 -6
  251. package/dist/esm/lib/functions/to-calendar-date.function.d.ts +0 -1
  252. package/dist/esm/lib/functions/to-calendar-date.function.js +0 -11
  253. package/dist/esm/lib/functions/to-csv-string.function.d.ts +0 -1
  254. package/dist/esm/lib/functions/to-csv-string.function.js +0 -6
  255. package/dist/esm/lib/functions/to-decimal-base.function.d.ts +0 -1
  256. package/dist/esm/lib/functions/to-decimal-base.function.js +0 -21
  257. package/dist/esm/lib/functions/to-dollars-and-cents.function.d.ts +0 -1
  258. package/dist/esm/lib/functions/to-dollars-and-cents.function.js +0 -16
  259. package/dist/esm/lib/functions/to-string.function.d.ts +0 -1
  260. package/dist/esm/lib/functions/to-string.function.js +0 -25
  261. package/dist/esm/lib/functions/to-unique-array.function.d.ts +0 -1
  262. package/dist/esm/lib/functions/to-unique-array.function.js +0 -6
  263. package/dist/esm/lib/functions/to-words.function.d.ts +0 -1
  264. package/dist/esm/lib/functions/to-words.function.js +0 -91
  265. package/dist/esm/lib/functions/try-json-parse.d.ts +0 -1
  266. package/dist/esm/lib/functions/try-json-parse.js +0 -14
  267. package/dist/esm/lib/functions/try-json-stringify.d.ts +0 -1
  268. package/dist/esm/lib/functions/try-json-stringify.js +0 -14
  269. package/dist/esm/lib/functions/try-parse-date.function.d.ts +0 -1
  270. package/dist/esm/lib/functions/try-parse-date.function.js +0 -16
  271. package/dist/esm/lib/functions/unicode-words.const.d.ts +0 -8
  272. package/dist/esm/lib/functions/unicode-words.const.js +0 -68
  273. package/dist/esm/lib/functions/upper-first.function.d.ts +0 -1
  274. package/dist/esm/lib/functions/upper-first.function.js +0 -12
  275. package/dist/esm/lib/functions/words.function.d.ts +0 -17
  276. package/dist/esm/lib/functions/words.function.js +0 -34
  277. package/dist/esm/lib/interfaces/axios-wrapped-nest-exception.interface.js +0 -2
  278. package/dist/esm/lib/interfaces/entity-provider.interface.d.ts +0 -9
  279. package/dist/esm/lib/interfaces/entity-provider.interface.js +0 -2
  280. package/dist/esm/lib/interfaces/keys-of.type.d.ts +0 -3
  281. package/dist/esm/lib/interfaces/keys-of.type.js +0 -2
  282. package/dist/esm/lib/interfaces/lookup.interface.d.ts +0 -4
  283. package/dist/esm/lib/interfaces/lookup.interface.js +0 -2
  284. package/dist/types/index.d.ts +0 -43
  285. package/dist/types/lib/constants/millis-per-day.constant.d.ts +0 -1
  286. package/dist/types/lib/constants/millis-per-hour.constant.d.ts +0 -1
  287. package/dist/types/lib/constants/millis-per-minute.constant.d.ts +0 -1
  288. package/dist/types/lib/constants/regexes.constant.d.ts +0 -27
  289. package/dist/types/lib/functions/add-offset.function.d.ts +0 -1
  290. package/dist/types/lib/functions/camel-case.function.d.ts +0 -20
  291. package/dist/types/lib/functions/convert-object-to-literal.function.d.ts +0 -1
  292. package/dist/types/lib/functions/format-usd.function.d.ts +0 -1
  293. package/dist/types/lib/functions/from-boolean-string.function.d.ts +0 -1
  294. package/dist/types/lib/functions/from-calendar-date.function.d.ts +0 -1
  295. package/dist/types/lib/functions/from-csv-string.function.d.ts +0 -1
  296. package/dist/types/lib/functions/get-date-range-for-month.function.d.ts +0 -4
  297. package/dist/types/lib/functions/get-tag.function.d.ts +0 -1
  298. package/dist/types/lib/functions/is-symbol.function.d.ts +0 -1
  299. package/dist/types/lib/functions/is-valid-date.function.d.ts +0 -1
  300. package/dist/types/lib/functions/kebab-case.function.d.ts +0 -1
  301. package/dist/types/lib/functions/map-enum-to-array-of-values.function.d.ts +0 -1
  302. package/dist/types/lib/functions/map-enum-to-lookup-array.function.d.ts +0 -2
  303. package/dist/types/lib/functions/map-enum-to-options.function.d.ts +0 -4
  304. package/dist/types/lib/functions/money.function.d.ts +0 -1
  305. package/dist/types/lib/functions/parse-bool.function.d.ts +0 -1
  306. package/dist/types/lib/functions/properties-to-array.function.d.ts +0 -1
  307. package/dist/types/lib/functions/remove-alpha-chars.function.d.ts +0 -1
  308. package/dist/types/lib/functions/remove-element-at-index.function.d.ts +0 -1
  309. package/dist/types/lib/functions/round.function.d.ts +0 -1
  310. package/dist/types/lib/functions/sanitize-filename.function.d.ts +0 -1
  311. package/dist/types/lib/functions/sleep.function.d.ts +0 -1
  312. package/dist/types/lib/functions/snake-case.function.d.ts +0 -24
  313. package/dist/types/lib/functions/subtract-offset.function.d.ts +0 -1
  314. package/dist/types/lib/functions/to-boolean-string.function.d.ts +0 -1
  315. package/dist/types/lib/functions/to-calendar-date.function.d.ts +0 -1
  316. package/dist/types/lib/functions/to-csv-string.function.d.ts +0 -1
  317. package/dist/types/lib/functions/to-decimal-base.function.d.ts +0 -1
  318. package/dist/types/lib/functions/to-dollars-and-cents.function.d.ts +0 -1
  319. package/dist/types/lib/functions/to-string.function.d.ts +0 -1
  320. package/dist/types/lib/functions/to-unique-array.function.d.ts +0 -1
  321. package/dist/types/lib/functions/to-words.function.d.ts +0 -1
  322. package/dist/types/lib/functions/try-json-parse.d.ts +0 -1
  323. package/dist/types/lib/functions/try-json-stringify.d.ts +0 -1
  324. package/dist/types/lib/functions/try-parse-date.function.d.ts +0 -1
  325. package/dist/types/lib/functions/unicode-words.const.d.ts +0 -8
  326. package/dist/types/lib/functions/upper-first.function.d.ts +0 -1
  327. package/dist/types/lib/functions/words.function.d.ts +0 -17
  328. package/dist/types/lib/interfaces/axios-wrapped-nest-exception.interface.d.ts +0 -5
  329. package/dist/types/lib/interfaces/entity-provider.interface.d.ts +0 -9
  330. package/dist/types/lib/interfaces/keys-of.type.d.ts +0 -3
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toCalendarDate = toCalendarDate;
4
- const subtract_offset_function_1 = require("./subtract-offset.function");
5
- function toCalendarDate(input) {
6
- const parsed = (0, subtract_offset_function_1.subtractOffset)(input);
7
- if (!parsed) {
8
- return;
9
- }
10
- return parsed?.toISOString().split('T')[0];
11
- }
@@ -1 +0,0 @@
1
- export declare function toCsvString(val?: string[]): string;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toCsvString = toCsvString;
4
- function toCsvString(val) {
5
- return (val || []).join(',');
6
- }
@@ -1 +0,0 @@
1
- export declare function toDecimalBase(n: string | number, base?: number): number;
@@ -1 +0,0 @@
1
- export declare function toDollarsAndCents(input: string | number): string;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toDollarsAndCents = toDollarsAndCents;
4
- const remove_alpha_chars_function_1 = require("./remove-alpha-chars.function");
5
- const to_words_function_1 = require("./to-words.function");
6
- function toDollarsAndCents(input) {
7
- const number = (0, remove_alpha_chars_function_1.removeAlphaChars)(input);
8
- const num = Number(number);
9
- const decimal = (Math.round((num % 1) * 100)) / 100;
10
- const int = num - decimal;
11
- const dollars = `${(0, to_words_function_1.toWords)(int)} dollars`;
12
- if (!decimal) {
13
- return dollars;
14
- }
15
- return `${dollars} and ${(0, to_words_function_1.toWords)(decimal * 100)} cents`;
16
- }
@@ -1 +0,0 @@
1
- export declare function toString(value: any): string;
@@ -1 +0,0 @@
1
- export declare function toUniqueArray<TElement>(elements: TElement[]): TElement[];
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toUniqueArray = toUniqueArray;
4
- function toUniqueArray(elements) {
5
- return Array.from(new Set(elements));
6
- }
@@ -1 +0,0 @@
1
- export declare function toWords(input: number | string): string;
@@ -1 +0,0 @@
1
- export declare function tryJsonParse<T>(parseable: string | null | undefined): T | null;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tryJsonParse = tryJsonParse;
4
- function tryJsonParse(parseable) {
5
- if (typeof parseable === 'undefined') {
6
- return null;
7
- }
8
- try {
9
- return JSON.parse(parseable);
10
- }
11
- catch (_e) {
12
- return null;
13
- }
14
- }
@@ -1 +0,0 @@
1
- export declare function tryJsonStringify<T>(object: T | null | undefined, fmtr?: any, spaces?: number): string | null;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tryJsonStringify = tryJsonStringify;
4
- function tryJsonStringify(object, fmtr, spaces) {
5
- if (typeof object === 'undefined') {
6
- return null;
7
- }
8
- try {
9
- return JSON.stringify(object, fmtr, spaces);
10
- }
11
- catch (_e) {
12
- return null;
13
- }
14
- }
@@ -1 +0,0 @@
1
- export declare function tryParseDate(input: string | Date | undefined | null): Date | undefined;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tryParseDate = tryParseDate;
4
- function tryParseDate(input) {
5
- if (!input) {
6
- return;
7
- }
8
- if (input instanceof Date) {
9
- return input;
10
- }
11
- const date = new Date(input);
12
- if (date == 'Invalid Date') {
13
- return;
14
- }
15
- return date;
16
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Splits a Unicode `string` into an array of its words.
3
- *
4
- * @private
5
- * @param {string} The string to inspect.
6
- * @returns {Array} Returns the words of `string`.
7
- */
8
- export declare function unicodeWords(string: string): RegExpMatchArray | null;
@@ -1,68 +0,0 @@
1
- "use strict";
2
- // source https://github.com/lodash/lodash/blob/master/.internal/unicodeWords.js
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.unicodeWords = unicodeWords;
5
- /** Used to compose unicode character classes. */
6
- const rsAstralRange = '\\ud800-\\udfff';
7
- const rsComboMarksRange = '\\u0300-\\u036f';
8
- const reComboHalfMarksRange = '\\ufe20-\\ufe2f';
9
- const rsComboSymbolsRange = '\\u20d0-\\u20ff';
10
- const rsComboMarksExtendedRange = '\\u1ab0-\\u1aff';
11
- const rsComboMarksSupplementRange = '\\u1dc0-\\u1dff';
12
- const rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange + rsComboMarksExtendedRange + rsComboMarksSupplementRange;
13
- const rsDingbatRange = '\\u2700-\\u27bf';
14
- const rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff';
15
- const rsMathOpRange = '\\xac\\xb1\\xd7\\xf7';
16
- const rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf';
17
- const rsPunctuationRange = '\\u2000-\\u206f';
18
- const rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000';
19
- const rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde';
20
- const rsVarRange = '\\ufe0e\\ufe0f';
21
- const rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
22
- /** Used to compose unicode capture groups. */
23
- const rsApos = "['\u2019]";
24
- const rsBreak = `[${rsBreakRange}]`;
25
- const rsCombo = `[${rsComboRange}]`;
26
- const rsDigit = '\\d';
27
- const rsDingbat = `[${rsDingbatRange}]`;
28
- const rsLower = `[${rsLowerRange}]`;
29
- const rsMisc = `[^${rsAstralRange}${rsBreakRange + rsDigit + rsDingbatRange + rsLowerRange + rsUpperRange}]`;
30
- const rsFitz = '\\ud83c[\\udffb-\\udfff]';
31
- const rsModifier = `(?:${rsCombo}|${rsFitz})`;
32
- const rsNonAstral = `[^${rsAstralRange}]`;
33
- const rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}';
34
- const rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]';
35
- const rsUpper = `[${rsUpperRange}]`;
36
- const rsZWJ = '\\u200d';
37
- /** Used to compose unicode regexes. */
38
- const rsMiscLower = `(?:${rsLower}|${rsMisc})`;
39
- const rsMiscUpper = `(?:${rsUpper}|${rsMisc})`;
40
- const rsOptContrLower = `(?:${rsApos}(?:d|ll|m|re|s|t|ve))?`;
41
- const rsOptContrUpper = `(?:${rsApos}(?:D|LL|M|RE|S|T|VE))?`;
42
- const reOptMod = `${rsModifier}?`;
43
- const rsOptVar = `[${rsVarRange}]?`;
44
- const rsOptJoin = `(?:${rsZWJ}(?:${[rsNonAstral, rsRegional, rsSurrPair].join('|')})${rsOptVar + reOptMod})*`;
45
- const rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])';
46
- const rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])';
47
- const rsSeq = rsOptVar + reOptMod + rsOptJoin;
48
- const rsEmoji = `(?:${[rsDingbat, rsRegional, rsSurrPair].join('|')})${rsSeq}`;
49
- const reUnicodeWords = RegExp([
50
- `${rsUpper}?${rsLower}+${rsOptContrLower}(?=${[rsBreak, rsUpper, '$'].join('|')})`,
51
- `${rsMiscUpper}+${rsOptContrUpper}(?=${[rsBreak, rsUpper + rsMiscLower, '$'].join('|')})`,
52
- `${rsUpper}?${rsMiscLower}+${rsOptContrLower}`,
53
- `${rsUpper}+${rsOptContrUpper}`,
54
- rsOrdUpper,
55
- rsOrdLower,
56
- `${rsDigit}+`,
57
- rsEmoji
58
- ].join('|'), 'g');
59
- /**
60
- * Splits a Unicode `string` into an array of its words.
61
- *
62
- * @private
63
- * @param {string} The string to inspect.
64
- * @returns {Array} Returns the words of `string`.
65
- */
66
- function unicodeWords(string) {
67
- return string.match(reUnicodeWords);
68
- }
@@ -1 +0,0 @@
1
- export declare function upperFirst(string: string): string;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.upperFirst = upperFirst;
4
- function upperFirst(string) {
5
- if (!string) {
6
- return string;
7
- }
8
- return string
9
- .split('')
10
- .map((curr, i) => curr[!i ? 'toUpperCase' : 'toLowerCase']())
11
- .join('');
12
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Splits `string` into an array of its words.
3
- *
4
- * @since 3.0.0
5
- * @category String
6
- * @param {string} [string=''] The string to inspect.
7
- * @param {RegExp|string} [pattern] The pattern to match words.
8
- * @returns {Array} Returns the words of `string`.
9
- * @example
10
- *
11
- * words('fred, barney, & pebbles')
12
- * // => ['fred', 'barney', 'pebbles']
13
- *
14
- * words('fred, barney, & pebbles', /[^, ]+/g)
15
- * // => ['fred', 'barney', '&', 'pebbles']
16
- */
17
- export declare function words(string: string, pattern?: RegExp): [] | RegExpMatchArray;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- // source https://github.com/lodash/lodash/blob/master/words.js
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.words = words;
5
- const unicode_words_const_1 = require("./unicode-words.const");
6
- const hasUnicodeWord = RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/);
7
- /** Used to match words composed of alphanumeric characters. */
8
- const reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
9
- function asciiWords(string) {
10
- return string.match(reAsciiWord);
11
- }
12
- /**
13
- * Splits `string` into an array of its words.
14
- *
15
- * @since 3.0.0
16
- * @category String
17
- * @param {string} [string=''] The string to inspect.
18
- * @param {RegExp|string} [pattern] The pattern to match words.
19
- * @returns {Array} Returns the words of `string`.
20
- * @example
21
- *
22
- * words('fred, barney, & pebbles')
23
- * // => ['fred', 'barney', 'pebbles']
24
- *
25
- * words('fred, barney, & pebbles', /[^, ]+/g)
26
- * // => ['fred', 'barney', '&', 'pebbles']
27
- */
28
- function words(string, pattern) {
29
- if (pattern === undefined) {
30
- const result = hasUnicodeWord(string) ? (0, unicode_words_const_1.unicodeWords)(string) : asciiWords(string);
31
- return result || [];
32
- }
33
- return string.match(pattern) || [];
34
- }
@@ -1,5 +0,0 @@
1
- export interface IAxiosWrappedNestException {
2
- statusCode: number;
3
- error: string;
4
- message: string;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export type TKeysOf<TKeySource, TValue> = {
2
- [key in keyof TKeySource]: TValue;
3
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,43 +0,0 @@
1
- export * from './lib/constants/millis-per-day.constant';
2
- export * from './lib/constants/millis-per-hour.constant';
3
- export * from './lib/constants/millis-per-minute.constant';
4
- export * from './lib/constants/regexes.constant';
5
- export * from './lib/functions/add-offset.function';
6
- export * from './lib/functions/camel-case.function';
7
- export * from './lib/functions/convert-object-to-literal.function';
8
- export * from './lib/functions/format-usd.function';
9
- export * from './lib/functions/from-boolean-string.function';
10
- export * from './lib/functions/from-calendar-date.function';
11
- export * from './lib/functions/from-csv-string.function';
12
- export * from './lib/functions/get-date-range-for-month.function';
13
- export * from './lib/functions/is-symbol.function';
14
- export * from './lib/functions/is-valid-date.function';
15
- export * from './lib/functions/kebab-case.function';
16
- export * from './lib/functions/map-enum-to-array-of-values.function';
17
- export * from './lib/functions/map-enum-to-lookup-array.function';
18
- export * from './lib/functions/map-enum-to-options.function';
19
- export * from './lib/functions/money.function';
20
- export * from './lib/functions/parse-bool.function';
21
- export * from './lib/functions/properties-to-array.function';
22
- export * from './lib/functions/remove-alpha-chars.function';
23
- export * from './lib/functions/remove-element-at-index.function';
24
- export * from './lib/functions/round.function';
25
- export * from './lib/functions/sleep.function';
26
- export * from './lib/functions/sanitize-filename.function';
27
- export * from './lib/functions/snake-case.function';
28
- export * from './lib/functions/subtract-offset.function';
29
- export * from './lib/functions/to-boolean-string.function';
30
- export * from './lib/functions/to-calendar-date.function';
31
- export * from './lib/functions/to-csv-string.function';
32
- export * from './lib/functions/to-decimal-base.function';
33
- export * from './lib/functions/to-dollars-and-cents.function';
34
- export * from './lib/functions/to-unique-array.function';
35
- export * from './lib/functions/to-words.function';
36
- export * from './lib/functions/try-parse-date.function';
37
- export * from './lib/functions/unicode-words.const';
38
- export * from './lib/functions/upper-first.function';
39
- export * from './lib/functions/words.function';
40
- export * from './lib/interfaces/axios-wrapped-nest-exception.interface';
41
- export * from './lib/interfaces/entity-provider.interface';
42
- export * from './lib/interfaces/keys-of.type';
43
- export * from './lib/interfaces/lookup.interface';
package/dist/esm/index.js DELETED
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./lib/constants/millis-per-day.constant"), exports);
18
- __exportStar(require("./lib/constants/millis-per-hour.constant"), exports);
19
- __exportStar(require("./lib/constants/millis-per-minute.constant"), exports);
20
- __exportStar(require("./lib/constants/regexes.constant"), exports);
21
- __exportStar(require("./lib/functions/add-offset.function"), exports);
22
- __exportStar(require("./lib/functions/camel-case.function"), exports);
23
- __exportStar(require("./lib/functions/convert-object-to-literal.function"), exports);
24
- __exportStar(require("./lib/functions/format-usd.function"), exports);
25
- __exportStar(require("./lib/functions/from-boolean-string.function"), exports);
26
- __exportStar(require("./lib/functions/from-calendar-date.function"), exports);
27
- __exportStar(require("./lib/functions/from-csv-string.function"), exports);
28
- __exportStar(require("./lib/functions/get-date-range-for-month.function"), exports);
29
- __exportStar(require("./lib/functions/is-symbol.function"), exports);
30
- __exportStar(require("./lib/functions/is-valid-date.function"), exports);
31
- __exportStar(require("./lib/functions/kebab-case.function"), exports);
32
- __exportStar(require("./lib/functions/map-enum-to-array-of-values.function"), exports);
33
- __exportStar(require("./lib/functions/map-enum-to-lookup-array.function"), exports);
34
- __exportStar(require("./lib/functions/map-enum-to-options.function"), exports);
35
- __exportStar(require("./lib/functions/money.function"), exports);
36
- __exportStar(require("./lib/functions/parse-bool.function"), exports);
37
- __exportStar(require("./lib/functions/properties-to-array.function"), exports);
38
- __exportStar(require("./lib/functions/remove-alpha-chars.function"), exports);
39
- __exportStar(require("./lib/functions/remove-element-at-index.function"), exports);
40
- __exportStar(require("./lib/functions/round.function"), exports);
41
- __exportStar(require("./lib/functions/sleep.function"), exports);
42
- __exportStar(require("./lib/functions/sanitize-filename.function"), exports);
43
- __exportStar(require("./lib/functions/snake-case.function"), exports);
44
- __exportStar(require("./lib/functions/subtract-offset.function"), exports);
45
- __exportStar(require("./lib/functions/to-boolean-string.function"), exports);
46
- __exportStar(require("./lib/functions/to-calendar-date.function"), exports);
47
- __exportStar(require("./lib/functions/to-csv-string.function"), exports);
48
- __exportStar(require("./lib/functions/to-decimal-base.function"), exports);
49
- __exportStar(require("./lib/functions/to-dollars-and-cents.function"), exports);
50
- __exportStar(require("./lib/functions/to-unique-array.function"), exports);
51
- __exportStar(require("./lib/functions/to-words.function"), exports);
52
- __exportStar(require("./lib/functions/try-parse-date.function"), exports);
53
- __exportStar(require("./lib/functions/unicode-words.const"), exports);
54
- __exportStar(require("./lib/functions/upper-first.function"), exports);
55
- __exportStar(require("./lib/functions/words.function"), exports);
56
- __exportStar(require("./lib/interfaces/axios-wrapped-nest-exception.interface"), exports);
57
- __exportStar(require("./lib/interfaces/entity-provider.interface"), exports);
58
- __exportStar(require("./lib/interfaces/keys-of.type"), exports);
59
- __exportStar(require("./lib/interfaces/lookup.interface"), exports);
@@ -1 +0,0 @@
1
- export declare const MILLIS_PER_DAY: number;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MILLIS_PER_DAY = void 0;
4
- const millis_per_hour_constant_1 = require("./millis-per-hour.constant");
5
- exports.MILLIS_PER_DAY = millis_per_hour_constant_1.MILLIS_PER_HOUR * 24;
@@ -1 +0,0 @@
1
- export declare const MILLIS_PER_HOUR: number;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MILLIS_PER_HOUR = void 0;
4
- const millis_per_minute_constant_1 = require("./millis-per-minute.constant");
5
- exports.MILLIS_PER_HOUR = millis_per_minute_constant_1.MILLIS_PER_MINUTE * 60;
@@ -1 +0,0 @@
1
- export declare const MILLIS_PER_MINUTE: number;
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MILLIS_PER_MINUTE = void 0;
4
- exports.MILLIS_PER_MINUTE = 1000 * 60;
@@ -1,27 +0,0 @@
1
- export declare const multipleSpaces: RegExp;
2
- export declare const comma: RegExp;
3
- export declare const dashesLettersNumbers: RegExp;
4
- export declare const dashesLettersNumbersSpaces: RegExp;
5
- export declare const decimalRegex: RegExp;
6
- export declare const zip: RegExp;
7
- export declare const phone: RegExp;
8
- export declare const phonePlusOne: RegExp;
9
- export declare const code: RegExp;
10
- export declare const url: RegExp;
11
- export declare const protocol: RegExp;
12
- export declare const firstSpaceLast: RegExp;
13
- export declare const passwordNumber: RegExp;
14
- export declare const passwordUpper: RegExp;
15
- export declare const passwordLower: RegExp;
16
- export declare const passwordSpecial: RegExp;
17
- export declare const ssn: RegExp;
18
- export declare const numeric: RegExp;
19
- export declare const duns: RegExp;
20
- export declare const lastFourSocial: RegExp;
21
- export declare const ein: RegExp;
22
- export declare const stateShort: RegExp;
23
- export declare const email: RegExp;
24
- export declare const domain: RegExp;
25
- export declare const emailDomain: RegExp;
26
- export declare const v4: RegExp;
27
- export declare const dateIso8601: RegExp;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dateIso8601 = exports.v4 = exports.emailDomain = exports.domain = exports.email = exports.stateShort = exports.ein = exports.lastFourSocial = exports.duns = exports.numeric = exports.ssn = exports.passwordSpecial = exports.passwordLower = exports.passwordUpper = exports.passwordNumber = exports.firstSpaceLast = exports.protocol = exports.url = exports.code = exports.phonePlusOne = exports.phone = exports.zip = exports.decimalRegex = exports.dashesLettersNumbersSpaces = exports.dashesLettersNumbers = exports.comma = exports.multipleSpaces = void 0;
4
- exports.multipleSpaces = /\s{2,}/g;
5
- exports.comma = /,/g;
6
- exports.dashesLettersNumbers = /^([a-z]|-|\d)*$/i;
7
- exports.dashesLettersNumbersSpaces = /^([a-z]|-|\s|\d)*$/i;
8
- exports.decimalRegex = /(\d|\.)/g;
9
- exports.zip = /^\d{5}$/;
10
- exports.phone = /^\d{3}-\d{3}-\d{4}$/;
11
- exports.phonePlusOne = /^\+1\d{10}$/;
12
- exports.code = /^\d{6}$/;
13
- exports.url = /(https?:\/\/|https?:\/\/).*\..+/;
14
- exports.protocol = /https?:\/\/|https?:\/\//;
15
- exports.firstSpaceLast = /[a-z]+\s[a-z]+([a-z]|')+[a-z]+/i;
16
- exports.passwordNumber = /\d/;
17
- exports.passwordUpper = /[A-Z]/;
18
- exports.passwordLower = /[a-z]/;
19
- exports.passwordSpecial = /\^|\$|\*|\.|\?|-|!|@|#|%|>|<|:|;|_|~|\+|=/;
20
- exports.ssn = /^\d{3}-\d{2}-\d{4}$/;
21
- exports.numeric = /^(\d|\.)*$/;
22
- exports.duns = /^\d{9}$/;
23
- exports.lastFourSocial = /^\d{4}$/;
24
- exports.ein = /^\d{2}-\d{7}$/;
25
- exports.stateShort = /^[A-Z]{2}$/;
26
- exports.email = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
27
- exports.domain = /^(?!:\/\/)([a-zA-Z0-9-_]{1,63}\.)+[a-zA-Z]{2,63}$/;
28
- exports.emailDomain = /^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
29
- exports.v4 = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;
30
- exports.dateIso8601 = /^\d{4}-\d{1,2}-\d{1,2}$/;
@@ -1 +0,0 @@
1
- export declare function addOffset(input: string | Date | undefined | null): Date | undefined;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addOffset = addOffset;
4
- const millis_per_minute_constant_1 = require("../constants/millis-per-minute.constant");
5
- const try_parse_date_function_1 = require("./try-parse-date.function");
6
- function addOffset(input) {
7
- const parsed = (0, try_parse_date_function_1.tryParseDate)(input);
8
- if (!parsed) {
9
- return;
10
- }
11
- const offset = (parsed).getTimezoneOffset();
12
- return new Date(parsed.valueOf() + offset * millis_per_minute_constant_1.MILLIS_PER_MINUTE);
13
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
3
- *
4
- * @since 3.0.0
5
- * @category String
6
- * @param {string} [string=''] The string to convert.
7
- * @returns {string} Returns the camel cased string.
8
- * @see lowerCase, kebabCase, snakeCase, startCase, upperCase, upperFirst
9
- * @example
10
- *
11
- * camelCase('Foo Bar')
12
- * // => 'fooBar'
13
- *
14
- * camelCase('--foo-bar--')
15
- * // => 'fooBar'
16
- *
17
- * camelCase('__FOO_BAR__')
18
- * // => 'fooBar'
19
- */
20
- export declare const camelCase: (string: string) => string;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- // https://github.com/lodash/lodash/blob/main/src/camelCase.ts
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.camelCase = void 0;
5
- const to_string_function_1 = require("./to-string.function");
6
- const upper_first_function_1 = require("./upper-first.function");
7
- const words_function_1 = require("./words.function");
8
- /**
9
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
10
- *
11
- * @since 3.0.0
12
- * @category String
13
- * @param {string} [string=''] The string to convert.
14
- * @returns {string} Returns the camel cased string.
15
- * @see lowerCase, kebabCase, snakeCase, startCase, upperCase, upperFirst
16
- * @example
17
- *
18
- * camelCase('Foo Bar')
19
- * // => 'fooBar'
20
- *
21
- * camelCase('--foo-bar--')
22
- * // => 'fooBar'
23
- *
24
- * camelCase('__FOO_BAR__')
25
- * // => 'fooBar'
26
- */
27
- const camelCase = (string) => (0, words_function_1.words)((0, to_string_function_1.toString)(string).replace(/['\u2019]/g, '')).reduce((result, word, index) => {
28
- word = word.toLowerCase();
29
- return result + (index ? (0, upper_first_function_1.upperFirst)(word) : word);
30
- }, '');
31
- exports.camelCase = camelCase;
@@ -1 +0,0 @@
1
- export declare function convertObjectToLiteral(literalFn: (k: string, v: any) => string, delimiter: string, keyValuePairs: Record<string, any>): string;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertObjectToLiteral = convertObjectToLiteral;
4
- function convertObjectToLiteral(literalFn, delimiter, keyValuePairs) {
5
- return Object.entries(keyValuePairs)
6
- .filter(([, v]) => !!v || v === 0 || v === false)
7
- .map(([k, v]) => literalFn(k, v?.toString?.()))
8
- .join(delimiter);
9
- }
@@ -1 +0,0 @@
1
- export declare function formatUsd(rawAmount?: number | string): string;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatUsd = formatUsd;
4
- function formatUsd(rawAmount) {
5
- const amount = Number(rawAmount) || 0;
6
- return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(amount);
7
- }
@@ -1 +0,0 @@
1
- export declare function fromBooleanString(value?: string): value is "true";
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromBooleanString = fromBooleanString;
4
- function fromBooleanString(value) {
5
- return value === 'true';
6
- }
@@ -1 +0,0 @@
1
- export declare function fromCalendarDate(input: string | Date | undefined | null): Date | null;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromCalendarDate = fromCalendarDate;
4
- const add_offset_function_1 = require("./add-offset.function");
5
- function fromCalendarDate(input) {
6
- return (0, add_offset_function_1.addOffset)(input) || null;
7
- }
@@ -1 +0,0 @@
1
- export declare function fromCsvString(value?: string): string[];
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromCsvString = fromCsvString;
4
- function fromCsvString(value) {
5
- return value ? value.split(',').map((v) => v.trim()) : [];
6
- }