@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 +1,11 @@
1
- "use strict";
2
1
  // https://github.com/lodash/lodash/blob/main/src/toString.ts
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.toString = toString;
5
- const is_symbol_function_1 = require("./is-symbol.function");
2
+
3
+ import { isSymbol } from './is-symbol.function';
4
+
6
5
  /** Used as references for various `Number` constants. */
7
6
  const INFINITY = 1 / 0;
8
- function toString(value) {
7
+
8
+ export function toString(value: any): string {
9
9
  if (value == null) {
10
10
  return '';
11
11
  }
@@ -17,7 +17,7 @@ function toString(value) {
17
17
  // Recursively convert values (susceptible to call stack limits).
18
18
  return `${value.map((other) => (other == null ? other : toString(other)))}`;
19
19
  }
20
- if ((0, is_symbol_function_1.isSymbol)(value)) {
20
+ if (isSymbol(value)) {
21
21
  return value.toString();
22
22
  }
23
23
  const result = `${value}`;
@@ -0,0 +1,45 @@
1
+ import { toUniqueArray } from './to-unique-array.function';
2
+
3
+ describe('toUniqueArray', () => {
4
+ it.each([
5
+ [
6
+ [1, 2, 3],
7
+ [1, 2, 3],
8
+ ],
9
+ [[1, 1, 1], [1]],
10
+ ])(
11
+ 'GIVEN array of numbers: %j, returns a unique array without duplicate elements',
12
+ (array, expected) => {
13
+ expect(toUniqueArray(array)).toEqual(expected);
14
+ }
15
+ );
16
+
17
+ it.each([
18
+ [
19
+ ['one', 'two', 'three'],
20
+ ['one', 'two', 'three'],
21
+ ],
22
+ [['one', 'one', 'one'], ['one']],
23
+ ])(
24
+ 'GIVEN array of strings: %j, returns a unique array without duplicate elements',
25
+ (array, expected) => {
26
+ expect(toUniqueArray(array)).toEqual(expected);
27
+ }
28
+ );
29
+
30
+ it.each([
31
+ [
32
+ ['one', 'two', 'three', undefined, undefined],
33
+ ['one', 'two', 'three', undefined],
34
+ ],
35
+ [
36
+ ['one', 'one', 'one', null, null],
37
+ ['one', null],
38
+ ],
39
+ ])(
40
+ 'GIVEN array with falsey values: %j, returns a unique array without duplicate elements including falsey values',
41
+ (array, expected) => {
42
+ expect(toUniqueArray(array)).toEqual(expected);
43
+ }
44
+ );
45
+ });
@@ -0,0 +1,3 @@
1
+ export function toUniqueArray<TElement>(elements: TElement[]): TElement[] {
2
+ return Array.from(new Set(elements));
3
+ }
@@ -0,0 +1,7 @@
1
+ import { toWords } from "./to-words.function";
2
+
3
+ describe('toWords', () => {
4
+ it('worx', () => {
5
+ expect(toWords(337)).toMatchSnapshot();
6
+ });
7
+ });
@@ -1,8 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toWords = toWords;
4
- const remove_alpha_chars_function_1 = require("./remove-alpha-chars.function");
1
+ import { removeAlphaChars } from "./remove-alpha-chars.function";
2
+
5
3
  const MAX_SAFE_INTEGER = 9007199254740991;
4
+
6
5
  const TEN = 10;
7
6
  const ONE_HUNDRED = 100;
8
7
  const ONE_THOUSAND = 1000;
@@ -18,74 +17,92 @@ const LESS_THAN_TWENTY = [
18
17
  const TENTHS_LESS_THAN_HUNDRED = [
19
18
  'zero', 'ten', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'
20
19
  ];
21
- function toWords(input) {
22
- let words;
23
- const number = (0, remove_alpha_chars_function_1.removeAlphaChars)(input) || '0';
20
+
21
+ export function toWords(input: number | string): string {
22
+ let words: string;
23
+ const number = removeAlphaChars(input) || '0';
24
24
  const num = parseInt(number, 10);
25
+
25
26
  if (!isFinite(num)) {
26
- throw new TypeError('Not a finite number: ' + number + ' (' + typeof number + ')');
27
+ throw new TypeError(
28
+ 'Not a finite number: ' + number + ' (' + typeof number + ')'
29
+ );
27
30
  }
31
+
28
32
  if (!isSafeNumber(num)) {
29
- throw new RangeError('Input is not a safe number, it\'s either too large or too small.');
33
+ throw new RangeError(
34
+ 'Input is not a safe number, it\'s either too large or too small.'
35
+ );
30
36
  }
37
+
31
38
  words = generateWords(num);
39
+
32
40
  return words;
33
41
  }
34
- function generateWords(number, words) {
42
+
43
+ function generateWords(number: any, words?: any[]): string {
35
44
  let remainder, word;
45
+
36
46
  if (number === 0) {
37
47
  return !words ? 'zero' : words.join(' ').replace(/,$/, '');
38
48
  }
49
+
39
50
  if (!words) {
40
51
  words = [];
41
52
  }
53
+
42
54
  if (number < 0) {
43
55
  words.push('minus');
44
56
  number = Math.abs(number);
45
57
  }
58
+
46
59
  if (number < 20) {
47
60
  remainder = 0;
48
61
  word = LESS_THAN_TWENTY[number];
49
- }
50
- else if (number < ONE_HUNDRED) {
62
+
63
+ } else if (number < ONE_HUNDRED) {
51
64
  remainder = number % TEN;
52
65
  word = TENTHS_LESS_THAN_HUNDRED[Math.floor(number / TEN)];
66
+
53
67
  if (remainder) {
54
68
  word += '-' + LESS_THAN_TWENTY[remainder];
55
69
  remainder = 0;
56
70
  }
57
- }
58
- else if (number < ONE_THOUSAND) {
71
+
72
+ } else if (number < ONE_THOUSAND) {
59
73
  remainder = number % ONE_HUNDRED;
60
74
  word = generateWords(Math.floor(number / ONE_HUNDRED)) + ' hundred';
61
- }
62
- else if (number < ONE_MILLION) {
75
+
76
+ } else if (number < ONE_MILLION) {
63
77
  remainder = number % ONE_THOUSAND;
64
78
  word = generateWords(Math.floor(number / ONE_THOUSAND)) + ' thousand,';
65
- }
66
- else if (number < ONE_BILLION) {
79
+
80
+ } else if (number < ONE_BILLION) {
67
81
  remainder = number % ONE_MILLION;
68
82
  word = generateWords(Math.floor(number / ONE_MILLION)) + ' million,';
69
- }
70
- else if (number < ONE_TRILLION) {
83
+
84
+ } else if (number < ONE_TRILLION) {
71
85
  remainder = number % ONE_BILLION;
72
86
  word = generateWords(Math.floor(number / ONE_BILLION)) + ' billion,';
73
- }
74
- else if (number < ONE_QUADRILLION) {
87
+
88
+ } else if (number < ONE_QUADRILLION) {
75
89
  remainder = number % ONE_TRILLION;
76
90
  word = generateWords(Math.floor(number / ONE_TRILLION)) + ' trillion,';
77
- }
78
- else if (number <= MAX) {
91
+
92
+ } else if (number <= MAX) {
79
93
  remainder = number % ONE_QUADRILLION;
80
94
  word = generateWords(Math.floor(number / ONE_QUADRILLION)) +
81
95
  ' quadrillion,';
82
96
  }
97
+
83
98
  words.push(word);
84
99
  return generateWords(remainder, words);
85
100
  }
86
- function isFinite(value) {
101
+
102
+ function isFinite(value: any) {
87
103
  return !(typeof value !== 'number' || value !== value || value === Infinity || value === -Infinity);
88
104
  }
89
- function isSafeNumber(value) {
105
+
106
+ function isSafeNumber(value: any) {
90
107
  return typeof value === 'number' && Math.abs(value) <= MAX_SAFE_INTEGER;
91
108
  }
@@ -0,0 +1,37 @@
1
+ import { tryJsonParse } from './try-json-parse';
2
+
3
+ describe('tryJsonParse', () => {
4
+ describe('GIVEN input is parseable', () => {
5
+ describe.each([
6
+ [0, 0],
7
+ ['0', 0],
8
+ [337, expect.any(Number)],
9
+ [`${337}`, expect.any(Number)],
10
+ [false, false],
11
+ ['false', false],
12
+ [true, true],
13
+ ['true', true],
14
+ [`{ "test": ${337} }`, expect.objectContaining({ test: expect.any(Number) })],
15
+ [`{ "test": "${337}" }`, expect.objectContaining({ test: expect.stringMatching(/\d/) })],
16
+ ])('WHEN input is: %j', (input, expectedOutput) => {
17
+ it(`returns ${expectedOutput}`, () => {
18
+ expect(tryJsonParse(input as any)).toEqual(expectedOutput);
19
+ });
20
+ });
21
+ });
22
+
23
+ describe('GIVEN input is not parseable', () => {
24
+ describe.each([
25
+ ['', null],
26
+ [null, null],
27
+ [undefined, null],
28
+ [NaN, null],
29
+ ['randomness', null],
30
+ ['totally random', null],
31
+ ])('WHEN input is: %j', (input, expectedOutput) => {
32
+ it(`returns ${expectedOutput}`, () => {
33
+ expect(tryJsonParse(input as any)).toEqual(expectedOutput);
34
+ });
35
+ });
36
+ });
37
+ });
@@ -0,0 +1,11 @@
1
+ export function tryJsonParse<T>(parseable: string | null | undefined): T | null {
2
+ if (typeof parseable === 'undefined') {
3
+ return null;
4
+ }
5
+
6
+ try {
7
+ return JSON.parse(parseable as any) as T;
8
+ } catch (_e) {
9
+ return null;
10
+ }
11
+ }
@@ -0,0 +1,44 @@
1
+ import { tryJsonStringify } from './try-json-stringify';
2
+
3
+ const arbitraryNumber: number = 337;
4
+
5
+ describe('tryJsonStringify', () => {
6
+ describe('GIVEN input is stringifiable', () => {
7
+ describe.each([
8
+ [0, '0'],
9
+ ['0', '"0"'],
10
+ [arbitraryNumber, expect.stringMatching(/\d/)],
11
+ [arbitraryNumber.toString(), expect.stringMatching(/\d/)],
12
+ [false, 'false'],
13
+ ['false', '"false"'],
14
+ [true, 'true'],
15
+ ['true', '"true"'],
16
+ ['', '""'],
17
+ [{ test: arbitraryNumber }, expect.stringMatching(new RegExp(`"test".*${arbitraryNumber}`))],
18
+ [{ test: arbitraryNumber.toString() }, expect.stringMatching(new RegExp(`"test".*"${arbitraryNumber}"`))],
19
+ ['randommmm', expect.any(String)],
20
+ ['so random', expect.any(String)],
21
+ ])('WHEN input is: %j', (input, expectedOutput) => {
22
+ it(`returns ${expectedOutput}`, () => {
23
+ expect(tryJsonStringify(input as any)).toEqual(expectedOutput);
24
+ });
25
+ });
26
+ });
27
+
28
+ describe('GIVEN input is not stringifiable', () => {
29
+ let circularObject: any;
30
+
31
+ beforeEach(() => {
32
+ circularObject = { children: [] };
33
+ const circularObjectChild = { parent: circularObject };
34
+ circularObject.children.push(circularObjectChild);
35
+ });
36
+
37
+ describe('WHEN input is circular', () => {
38
+ it(`returns null`, () => {
39
+ expect(tryJsonStringify(circularObject)).toMatchSnapshot();
40
+ // expect(tryJsonStringify(circularObject)).toEqual(null);
41
+ });
42
+ });
43
+ });
44
+ });
@@ -0,0 +1,11 @@
1
+ export function tryJsonStringify<T>(object: T | null | undefined, fmtr?: any, spaces?: number): string | null {
2
+ if (typeof object === 'undefined') {
3
+ return null;
4
+ }
5
+
6
+ try {
7
+ return JSON.stringify(object, fmtr, spaces);
8
+ } catch (_e) {
9
+ return null;
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ import { tryParseDate } from './try-parse-date.function';
2
+
3
+ describe('tryParseDate', () => {
4
+ describe('GIVEN input is partial or full ISO8601', () => {
5
+ it.each([
6
+ '2023-12-23',
7
+ '2023-12-23T00:00:00.000',
8
+ ])('%j', (input) => {
9
+ expect(tryParseDate(input)).toMatchSnapshot();
10
+ });
11
+ });
12
+ });
@@ -0,0 +1,17 @@
1
+ export function tryParseDate(input: string | Date | undefined | null): Date | undefined {
2
+ if (!input) {
3
+ return;
4
+ }
5
+
6
+ if(input instanceof Date) {
7
+ return input;
8
+ }
9
+
10
+ const date = new Date(input);
11
+
12
+ if ((date as any) == 'Invalid Date') {
13
+ return;
14
+ }
15
+
16
+ return date;
17
+ }
@@ -0,0 +1,70 @@
1
+ // source https://github.com/lodash/lodash/blob/master/.internal/unicodeWords.js
2
+
3
+ /** Used to compose unicode character classes. */
4
+ const rsAstralRange = '\\ud800-\\udfff'
5
+ const rsComboMarksRange = '\\u0300-\\u036f'
6
+ const reComboHalfMarksRange = '\\ufe20-\\ufe2f'
7
+ const rsComboSymbolsRange = '\\u20d0-\\u20ff'
8
+ const rsComboMarksExtendedRange = '\\u1ab0-\\u1aff'
9
+ const rsComboMarksSupplementRange = '\\u1dc0-\\u1dff'
10
+ const rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange + rsComboMarksExtendedRange + rsComboMarksSupplementRange
11
+ const rsDingbatRange = '\\u2700-\\u27bf'
12
+ const rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff'
13
+ const rsMathOpRange = '\\xac\\xb1\\xd7\\xf7'
14
+ const rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf'
15
+ const rsPunctuationRange = '\\u2000-\\u206f'
16
+ 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'
17
+ const rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde'
18
+ const rsVarRange = '\\ufe0e\\ufe0f'
19
+ const rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange
20
+
21
+ /** Used to compose unicode capture groups. */
22
+ const rsApos = "['\u2019]"
23
+ const rsBreak = `[${rsBreakRange}]`
24
+ const rsCombo = `[${rsComboRange}]`
25
+ const rsDigit = '\\d'
26
+ const rsDingbat = `[${rsDingbatRange}]`
27
+ const rsLower = `[${rsLowerRange}]`
28
+ const rsMisc = `[^${rsAstralRange}${rsBreakRange + rsDigit + rsDingbatRange + rsLowerRange + rsUpperRange}]`
29
+ const rsFitz = '\\ud83c[\\udffb-\\udfff]'
30
+ const rsModifier = `(?:${rsCombo}|${rsFitz})`
31
+ const rsNonAstral = `[^${rsAstralRange}]`
32
+ const rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'
33
+ const rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'
34
+ const rsUpper = `[${rsUpperRange}]`
35
+ const rsZWJ = '\\u200d'
36
+
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
+
50
+ const reUnicodeWords = RegExp([
51
+ `${rsUpper}?${rsLower}+${rsOptContrLower}(?=${[rsBreak, rsUpper, '$'].join('|')})`,
52
+ `${rsMiscUpper}+${rsOptContrUpper}(?=${[rsBreak, rsUpper + rsMiscLower, '$'].join('|')})`,
53
+ `${rsUpper}?${rsMiscLower}+${rsOptContrLower}`,
54
+ `${rsUpper}+${rsOptContrUpper}`,
55
+ rsOrdUpper,
56
+ rsOrdLower,
57
+ `${rsDigit}+`,
58
+ rsEmoji
59
+ ].join('|'), 'g')
60
+
61
+ /**
62
+ * Splits a Unicode `string` into an array of its words.
63
+ *
64
+ * @private
65
+ * @param {string} The string to inspect.
66
+ * @returns {Array} Returns the words of `string`.
67
+ */
68
+ export function unicodeWords(string: string) {
69
+ return string.match(reUnicodeWords)
70
+ }
@@ -0,0 +1,16 @@
1
+ import { upperFirst } from './upper-first.function';
2
+
3
+ describe('upperFirst', () => {
4
+ it.each([
5
+ 'asdf',
6
+ 'XCVB'
7
+ ])('GIVEN %j, does what u expect', (input) => {
8
+ expect(upperFirst(input)).toMatchSnapshot();
9
+ });
10
+
11
+ it.each([
12
+ null, undefined, 0, false
13
+ ])('GIVEN falsey input %j, does what u expect', (input) => {
14
+ expect(upperFirst(input)).toMatchSnapshot();
15
+ });
16
+ });
@@ -0,0 +1,10 @@
1
+ export function upperFirst(string: string) {
2
+ if (!string) {
3
+ return string;
4
+ }
5
+
6
+ return string
7
+ .split('')
8
+ .map((curr: string, i: number) => curr[!i ? 'toUpperCase' : 'toLowerCase']())
9
+ .join('');
10
+ }
@@ -0,0 +1,21 @@
1
+ /* eslint no-global-assign:0 */
2
+ export async function useDate(date: string, fn: () => Promise<void>) {
3
+ const mockedDate = new Date(date);
4
+
5
+ const OriginalDate = Date;
6
+
7
+ Date = class extends OriginalDate {
8
+ constructor(...args: any[]) {
9
+ super(
10
+ (args.length === 0) ? mockedDate : new (OriginalDate as any)(...args)
11
+ );
12
+ }
13
+ static override now() {
14
+ return mockedDate.getTime();
15
+ }
16
+ } as any;
17
+
18
+ await fn();
19
+
20
+ Date = OriginalDate;
21
+ }
@@ -0,0 +1,38 @@
1
+ // source https://github.com/lodash/lodash/blob/master/words.js
2
+
3
+ import { unicodeWords } from './unicode-words.const';
4
+
5
+ const hasUnicodeWord = RegExp.prototype.test.bind(
6
+ /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/
7
+ )
8
+
9
+ /** Used to match words composed of alphanumeric characters. */
10
+ const reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g
11
+
12
+ function asciiWords(string: string) {
13
+ return string.match(reAsciiWord)
14
+ }
15
+
16
+ /**
17
+ * Splits `string` into an array of its words.
18
+ *
19
+ * @since 3.0.0
20
+ * @category String
21
+ * @param {string} [string=''] The string to inspect.
22
+ * @param {RegExp|string} [pattern] The pattern to match words.
23
+ * @returns {Array} Returns the words of `string`.
24
+ * @example
25
+ *
26
+ * words('fred, barney, & pebbles')
27
+ * // => ['fred', 'barney', 'pebbles']
28
+ *
29
+ * words('fred, barney, & pebbles', /[^, ]+/g)
30
+ * // => ['fred', 'barney', '&', 'pebbles']
31
+ */
32
+ export function words(string: string, pattern?: RegExp) {
33
+ if (pattern === undefined) {
34
+ const result = hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string)
35
+ return result || []
36
+ }
37
+ return string.match(pattern) || []
38
+ }
@@ -0,0 +1,8 @@
1
+ export type IAccessToken = {
2
+ id: string,
3
+ brokerId?: string,
4
+ companyId?: string,
5
+ roleId: string,
6
+ type: 'user' | 'machine',
7
+ exp?: number
8
+ };
@@ -1,5 +1,5 @@
1
1
  export interface IAxiosWrappedNestException {
2
2
  statusCode: number;
3
3
  error: string;
4
- message: string;
4
+ message: string
5
5
  }
@@ -0,0 +1,18 @@
1
+ export type TCompany = {
2
+ id: string;
3
+ statusId: string;
4
+ renewalDate: string;
5
+ name: string;
6
+ ein: string;
7
+ duns: string;
8
+ address1: string;
9
+ address2: string;
10
+ city: string;
11
+ state: string;
12
+ zip: string;
13
+ phone: string;
14
+ externalId: string;
15
+ bmiThresholdWithComorbidities: number;
16
+ bmiThresholdWithoutComorbidities: number;
17
+ membershipType: string;
18
+ };
@@ -0,0 +1 @@
1
+ export type TCreateable = { createdAt: Date | string };
@@ -6,4 +6,4 @@ export interface IEntityProvider<TEntity, TFindOneOptions, TFindManyOptions, TFi
6
6
  delete: (options: TFindOptionsWhere) => Promise<void>;
7
7
  put: (options: TFindOptionsWhere, body: TQueryDeepPartialEntity) => Promise<void>;
8
8
  patch: (options: TFindOptionsWhere, body: TQueryDeepPartialEntity) => Promise<void>;
9
- }
9
+ }
@@ -0,0 +1 @@
1
+ export type TKeysOf<TKeySource, TValue> = { [key in keyof TKeySource]: TValue };
@@ -0,0 +1 @@
1
+ export type TKeysOf<TKeySource, TValue> = { [key in keyof TKeySource]: TValue };
@@ -1,4 +1,4 @@
1
1
  export interface ILookup<TDisplay, TValue> {
2
- display: TDisplay;
3
- value: TValue;
2
+ display: TDisplay;
3
+ value: TValue;
4
4
  }
@@ -1,4 +1,4 @@
1
1
  export interface ILookup<TDisplay, TValue> {
2
- display: TDisplay;
3
- value: TValue;
2
+ display: TDisplay;
3
+ value: TValue;
4
4
  }
@@ -0,0 +1,4 @@
1
+ export type TNameable = {
2
+ firstName: string;
3
+ lastName: string;
4
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../../tsconfig.isomorphic.json",
3
+ "files": [],
4
+ "include": [],
5
+ "references": [
6
+ {
7
+ "path": "./tsconfig.lib.json"
8
+ },
9
+ {
10
+ "path": "./tsconfig.spec.json"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "outDir": "../../../dist/out-tsc"
6
+ },
7
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
8
+ "include": ["src/**/*.ts"]
9
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../../dist/out-tsc",
5
+ "module": "commonjs",
6
+ "types": ["jest", "node"]
7
+ },
8
+ "include": [
9
+ "jest.config.ts",
10
+ "src/**/*.test.ts",
11
+ "src/**/*.spec.ts",
12
+ "src/**/*.d.ts"
13
+ ]
14
+ }