@ezez/utils 4.0.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (481) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -0
  3. package/dist/cap.d.ts.map +1 -1
  4. package/dist/cap.js.map +1 -1
  5. package/dist/capitalize.d.ts.map +1 -1
  6. package/dist/coalesce.d.ts.map +1 -1
  7. package/dist/coalesce.js.map +1 -1
  8. package/dist/compareArrays.d.ts.map +1 -1
  9. package/dist/compareProps.d.ts.map +1 -1
  10. package/dist/compareProps.js.map +1 -1
  11. package/dist/deserialize.d.ts.map +1 -1
  12. package/dist/deserialize.js.map +1 -1
  13. package/dist/ensureArray.d.ts.map +1 -1
  14. package/dist/ensureArray.js.map +1 -1
  15. package/dist/ensureDate.d.ts.map +1 -1
  16. package/dist/ensureDate.js.map +1 -1
  17. package/dist/ensureError.d.ts.map +1 -1
  18. package/dist/ensureError.js.map +1 -1
  19. package/dist/ensurePrefix.d.ts.map +1 -1
  20. package/dist/ensurePrefix.js.map +1 -1
  21. package/dist/ensureSuffix.d.ts.map +1 -1
  22. package/dist/ensureSuffix.js.map +1 -1
  23. package/dist/ensureTimestamp.d.ts.map +1 -1
  24. package/dist/ensureTimestamp.js.map +1 -1
  25. package/dist/escapeRegExp.d.ts.map +1 -1
  26. package/dist/escapeRegExp.js +1 -1
  27. package/dist/escapeRegExp.js.map +1 -1
  28. package/dist/formatDate.d.ts.map +1 -1
  29. package/dist/formatDate.js +1 -1
  30. package/dist/formatDate.js.map +1 -1
  31. package/dist/get.d.ts.map +1 -1
  32. package/dist/get.js.map +1 -1
  33. package/dist/getMultiple.d.ts.map +1 -1
  34. package/dist/getMultiple.js.map +1 -1
  35. package/dist/index.d.ts +2 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +2 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/insertSeparator.d.ts.map +1 -1
  40. package/dist/insertSeparator.js.map +1 -1
  41. package/dist/isEmpty.d.ts.map +1 -1
  42. package/dist/isEmpty.js.map +1 -1
  43. package/dist/isNumericString.d.ts.map +1 -1
  44. package/dist/isNumericString.js +1 -1
  45. package/dist/isNumericString.js.map +1 -1
  46. package/dist/isPlainObject.d.ts.map +1 -1
  47. package/dist/last.d.ts.map +1 -1
  48. package/dist/later.d.ts.map +1 -1
  49. package/dist/mapAsync.d.ts.map +1 -1
  50. package/dist/mapAsync.js.map +1 -1
  51. package/dist/mapValues.d.ts.map +1 -1
  52. package/dist/mapValues.js.map +1 -1
  53. package/dist/match.d.ts.map +1 -1
  54. package/dist/match.js.map +1 -1
  55. package/dist/memoize.d.ts +3 -0
  56. package/dist/memoize.d.ts.map +1 -0
  57. package/dist/memoize.js +19 -0
  58. package/dist/memoize.js.map +1 -0
  59. package/dist/merge.d.ts +11 -7
  60. package/dist/merge.d.ts.map +1 -1
  61. package/dist/merge.js.map +1 -1
  62. package/dist/mostFrequent.d.ts.map +1 -1
  63. package/dist/mostFrequent.js.map +1 -1
  64. package/dist/occurrences.d.ts.map +1 -1
  65. package/dist/occurrences.js.map +1 -1
  66. package/dist/omit.d.ts.map +1 -1
  67. package/dist/omit.js.map +1 -1
  68. package/dist/pick.d.ts.map +1 -1
  69. package/dist/pick.js.map +1 -1
  70. package/dist/pull.d.ts.map +1 -1
  71. package/dist/pull.js.map +1 -1
  72. package/dist/remove.d.ts.map +1 -1
  73. package/dist/remove.js +1 -1
  74. package/dist/remove.js.map +1 -1
  75. package/dist/removeCommonProperties.d.ts.map +1 -1
  76. package/dist/removeCommonProperties.js +3 -1
  77. package/dist/removeCommonProperties.js.map +1 -1
  78. package/dist/replace.d.ts.map +1 -1
  79. package/dist/replace.js +1 -1
  80. package/dist/replace.js.map +1 -1
  81. package/dist/replaceDeep.d.ts.map +1 -1
  82. package/dist/replaceDeepByFn.d.ts.map +1 -1
  83. package/dist/replaceDeepByFn.js.map +1 -1
  84. package/dist/rethrow.d.ts.map +1 -1
  85. package/dist/retry.d.ts +9 -0
  86. package/dist/retry.d.ts.map +1 -0
  87. package/dist/retry.js +26 -0
  88. package/dist/retry.js.map +1 -0
  89. package/dist/round.d.ts.map +1 -1
  90. package/dist/safe.js +1 -2
  91. package/dist/safe.js.map +1 -1
  92. package/dist/sample.d.ts +3 -1
  93. package/dist/sample.d.ts.map +1 -1
  94. package/dist/sample.js.map +1 -1
  95. package/dist/samples.d.ts.map +1 -1
  96. package/dist/samples.js.map +1 -1
  97. package/dist/scale.d.ts.map +1 -1
  98. package/dist/seq.d.ts.map +1 -1
  99. package/dist/seq.js +1 -1
  100. package/dist/seq.js.map +1 -1
  101. package/dist/serialize.d.ts.map +1 -1
  102. package/dist/serialize.js.map +1 -1
  103. package/dist/set.d.ts.map +1 -1
  104. package/dist/set.js.map +1 -1
  105. package/dist/setImmutable.d.ts.map +1 -1
  106. package/dist/setImmutable.js.map +1 -1
  107. package/dist/shuffle.d.ts.map +1 -1
  108. package/dist/sortBy.d.ts.map +1 -1
  109. package/dist/sortBy.js.map +1 -1
  110. package/dist/sortProps.d.ts.map +1 -1
  111. package/dist/sortProps.js.map +1 -1
  112. package/dist/stripPrefix.d.ts.map +1 -1
  113. package/dist/stripPrefix.js.map +1 -1
  114. package/dist/stripSuffix.d.ts.map +1 -1
  115. package/dist/stripSuffix.js.map +1 -1
  116. package/dist/throttle.d.ts.map +1 -1
  117. package/dist/throttle.js.map +1 -1
  118. package/dist/toggle.d.ts.map +1 -1
  119. package/dist/toggle.js.map +1 -1
  120. package/dist/trim.d.ts.map +1 -1
  121. package/dist/trimEnd.d.ts.map +1 -1
  122. package/dist/trimEnd.js.map +1 -1
  123. package/dist/trimStart.d.ts.map +1 -1
  124. package/dist/trimStart.js.map +1 -1
  125. package/dist/truthy.d.ts +1 -1
  126. package/dist/truthy.d.ts.map +1 -1
  127. package/dist/unique.d.ts.map +1 -1
  128. package/dist/wait.d.ts.map +1 -1
  129. package/dist/waitFor.d.ts.map +1 -1
  130. package/dist/waitFor.js +1 -1
  131. package/dist/waitFor.js.map +1 -1
  132. package/dist/waitSync.d.ts.map +1 -1
  133. package/dist/waitSync.js.map +1 -1
  134. package/docs/assets/icons.js +18 -0
  135. package/docs/assets/icons.svg +1 -0
  136. package/docs/assets/main.js +5 -3
  137. package/docs/assets/navigation.js +1 -0
  138. package/docs/assets/search.js +1 -1
  139. package/docs/assets/style.css +614 -400
  140. package/docs/documents/CHANGELOG.html +340 -0
  141. package/docs/functions/index.cap.html +5 -0
  142. package/docs/functions/index.capitalize.html +13 -0
  143. package/docs/functions/index.coalesce.html +16 -0
  144. package/docs/functions/index.compareArrays.html +8 -0
  145. package/docs/functions/index.compareProps.html +11 -0
  146. package/docs/functions/index.deserialize.html +6 -0
  147. package/docs/functions/index.ensureArray.html +3 -0
  148. package/docs/functions/index.ensureDate.html +10 -0
  149. package/docs/functions/index.ensureError.html +14 -0
  150. package/docs/functions/index.ensurePrefix.html +10 -0
  151. package/docs/functions/index.ensureSuffix.html +10 -0
  152. package/docs/functions/index.ensureTimestamp.html +10 -0
  153. package/docs/functions/index.escapeRegExp.html +7 -0
  154. package/docs/functions/index.formatDate.html +6 -0
  155. package/docs/functions/index.get.html +26 -0
  156. package/docs/functions/index.getMultiple.html +16 -0
  157. package/docs/functions/index.insertSeparator.html +7 -0
  158. package/docs/functions/index.isEmpty.html +33 -0
  159. package/docs/functions/index.isNumericString.html +5 -0
  160. package/docs/functions/index.isPlainObject.html +18 -0
  161. package/docs/functions/index.last.html +15 -0
  162. package/docs/functions/index.later-1.html +6 -0
  163. package/docs/functions/index.mapAsync.html +8 -0
  164. package/docs/functions/index.mapValues.html +14 -0
  165. package/docs/functions/index.match.html +4 -0
  166. package/docs/functions/index.memoize.html +8 -0
  167. package/docs/functions/index.merge.html +13 -0
  168. package/docs/functions/index.mostFrequent.html +2 -0
  169. package/docs/functions/index.noop.html +2 -0
  170. package/docs/functions/index.occurrences.html +14 -0
  171. package/docs/functions/index.omit.html +18 -0
  172. package/docs/functions/index.pick.html +13 -0
  173. package/docs/functions/index.pull.html +2 -0
  174. package/docs/functions/index.remove.html +2 -0
  175. package/docs/functions/index.removeCommonProperties.html +18 -0
  176. package/docs/functions/index.replace.html +10 -0
  177. package/docs/functions/index.replaceDeep.html +15 -0
  178. package/docs/functions/index.rethrow.html +2 -0
  179. package/docs/functions/index.retry.html +4 -0
  180. package/docs/functions/index.round.html +7 -0
  181. package/docs/functions/index.safe.html +7 -0
  182. package/docs/functions/index.sample.html +6 -0
  183. package/docs/functions/index.samples.html +7 -0
  184. package/docs/functions/index.scale.html +5 -0
  185. package/docs/functions/index.seq.html +17 -0
  186. package/docs/functions/index.seqEarlyBreak.html +12 -0
  187. package/docs/functions/index.serialize.html +14 -0
  188. package/docs/functions/index.set.html +26 -0
  189. package/docs/functions/index.setImmutable.html +25 -0
  190. package/docs/functions/index.shuffle.html +3 -0
  191. package/docs/functions/index.sortBy.html +6 -0
  192. package/docs/functions/index.sortProps.html +10 -0
  193. package/docs/functions/index.stripPrefix.html +4 -0
  194. package/docs/functions/index.stripSuffix.html +4 -0
  195. package/docs/functions/index.throttle.html +14 -0
  196. package/docs/functions/index.toggle.html +5 -0
  197. package/docs/functions/index.trim.html +8 -0
  198. package/docs/functions/index.trimEnd.html +8 -0
  199. package/docs/functions/index.trimStart.html +8 -0
  200. package/docs/functions/index.truthy.html +7 -0
  201. package/docs/functions/index.unique.html +6 -0
  202. package/docs/functions/index.wait.html +3 -0
  203. package/docs/functions/index.waitFor.html +10 -0
  204. package/docs/functions/index.waitSync.html +3 -0
  205. package/docs/index.html +19 -207
  206. package/docs/interfaces/index.ComparePropsOptions.html +5 -0
  207. package/docs/interfaces/index.GetMultipleSource.html +3 -0
  208. package/docs/interfaces/index.GetSource.html +3 -0
  209. package/docs/interfaces/index.IsNumericStringOptions.html +5 -0
  210. package/docs/interfaces/index.OccurencesOptions.html +3 -0
  211. package/docs/interfaces/index.SetImmutableSource.html +3 -0
  212. package/docs/interfaces/index.SetSource.html +3 -0
  213. package/docs/interfaces/index.ThrottleOptions.html +5 -0
  214. package/docs/interfaces/index.ThrottledFunctionExtras.html +5 -0
  215. package/docs/modules/index.html +87 -0
  216. package/docs/modules.html +3 -223
  217. package/docs/types/index.CustomDeserializers.html +1 -0
  218. package/docs/types/index.CustomSerializers.html +1 -0
  219. package/docs/types/index.Later.html +4 -0
  220. package/docs/types/index.MapValuesFn.html +14 -0
  221. package/docs/types/index.MatchCallback.html +1 -0
  222. package/docs/types/index.MergeTwo.html +3 -0
  223. package/docs/types/index.SeqEarlyBreaker.html +4 -0
  224. package/docs/types/index.SeqFn.html +3 -0
  225. package/docs/types/index.SeqFunctions.html +4 -0
  226. package/docs/types/index.SetImmutablePath.html +4 -0
  227. package/docs/types/index.ThrottledFunction.html +1 -0
  228. package/docs/variables/index.mapValuesUNSET.html +2 -0
  229. package/docs/variables/index.mergeUNSET.html +4 -0
  230. package/esm/cap.d.ts.map +1 -1
  231. package/esm/cap.js.map +1 -1
  232. package/esm/capitalize.d.ts.map +1 -1
  233. package/esm/coalesce.d.ts.map +1 -1
  234. package/esm/coalesce.js.map +1 -1
  235. package/esm/compareArrays.d.ts.map +1 -1
  236. package/esm/compareProps.d.ts.map +1 -1
  237. package/esm/compareProps.js.map +1 -1
  238. package/esm/deserialize.d.ts.map +1 -1
  239. package/esm/deserialize.js.map +1 -1
  240. package/esm/ensureArray.d.ts.map +1 -1
  241. package/esm/ensureArray.js.map +1 -1
  242. package/esm/ensureDate.d.ts.map +1 -1
  243. package/esm/ensureDate.js.map +1 -1
  244. package/esm/ensureError.d.ts.map +1 -1
  245. package/esm/ensureError.js.map +1 -1
  246. package/esm/ensurePrefix.d.ts.map +1 -1
  247. package/esm/ensurePrefix.js.map +1 -1
  248. package/esm/ensureSuffix.d.ts.map +1 -1
  249. package/esm/ensureSuffix.js.map +1 -1
  250. package/esm/ensureTimestamp.d.ts.map +1 -1
  251. package/esm/ensureTimestamp.js.map +1 -1
  252. package/esm/escapeRegExp.d.ts.map +1 -1
  253. package/esm/escapeRegExp.js +1 -1
  254. package/esm/escapeRegExp.js.map +1 -1
  255. package/esm/formatDate.d.ts.map +1 -1
  256. package/esm/formatDate.js +1 -1
  257. package/esm/formatDate.js.map +1 -1
  258. package/esm/get.d.ts.map +1 -1
  259. package/esm/get.js.map +1 -1
  260. package/esm/getMultiple.d.ts.map +1 -1
  261. package/esm/getMultiple.js.map +1 -1
  262. package/esm/index.d.ts +2 -0
  263. package/esm/index.d.ts.map +1 -1
  264. package/esm/index.js +2 -0
  265. package/esm/index.js.map +1 -1
  266. package/esm/insertSeparator.d.ts.map +1 -1
  267. package/esm/insertSeparator.js.map +1 -1
  268. package/esm/isEmpty.d.ts.map +1 -1
  269. package/esm/isEmpty.js.map +1 -1
  270. package/esm/isNumericString.d.ts.map +1 -1
  271. package/esm/isNumericString.js +1 -1
  272. package/esm/isNumericString.js.map +1 -1
  273. package/esm/isPlainObject.d.ts.map +1 -1
  274. package/esm/last.d.ts.map +1 -1
  275. package/esm/later.d.ts.map +1 -1
  276. package/esm/mapAsync.d.ts.map +1 -1
  277. package/esm/mapAsync.js.map +1 -1
  278. package/esm/mapValues.d.ts.map +1 -1
  279. package/esm/mapValues.js.map +1 -1
  280. package/esm/match.d.ts.map +1 -1
  281. package/esm/match.js.map +1 -1
  282. package/esm/memoize.d.ts +3 -0
  283. package/esm/memoize.d.ts.map +1 -0
  284. package/esm/memoize.js +16 -0
  285. package/esm/memoize.js.map +1 -0
  286. package/esm/merge.d.ts +11 -7
  287. package/esm/merge.d.ts.map +1 -1
  288. package/esm/merge.js.map +1 -1
  289. package/esm/mostFrequent.d.ts.map +1 -1
  290. package/esm/mostFrequent.js.map +1 -1
  291. package/esm/occurrences.d.ts.map +1 -1
  292. package/esm/occurrences.js.map +1 -1
  293. package/esm/omit.d.ts.map +1 -1
  294. package/esm/omit.js.map +1 -1
  295. package/esm/pick.d.ts.map +1 -1
  296. package/esm/pick.js.map +1 -1
  297. package/esm/pull.d.ts.map +1 -1
  298. package/esm/pull.js.map +1 -1
  299. package/esm/remove.d.ts.map +1 -1
  300. package/esm/remove.js +1 -1
  301. package/esm/remove.js.map +1 -1
  302. package/esm/removeCommonProperties.d.ts.map +1 -1
  303. package/esm/removeCommonProperties.js +3 -1
  304. package/esm/removeCommonProperties.js.map +1 -1
  305. package/esm/replace.d.ts.map +1 -1
  306. package/esm/replace.js +1 -1
  307. package/esm/replace.js.map +1 -1
  308. package/esm/replaceDeep.d.ts.map +1 -1
  309. package/esm/replaceDeepByFn.d.ts.map +1 -1
  310. package/esm/replaceDeepByFn.js.map +1 -1
  311. package/esm/rethrow.d.ts.map +1 -1
  312. package/esm/retry.d.ts +9 -0
  313. package/esm/retry.d.ts.map +1 -0
  314. package/esm/retry.js +23 -0
  315. package/esm/retry.js.map +1 -0
  316. package/esm/round.d.ts.map +1 -1
  317. package/esm/safe.js.map +1 -1
  318. package/esm/sample.d.ts +3 -1
  319. package/esm/sample.d.ts.map +1 -1
  320. package/esm/sample.js.map +1 -1
  321. package/esm/samples.d.ts.map +1 -1
  322. package/esm/samples.js.map +1 -1
  323. package/esm/scale.d.ts.map +1 -1
  324. package/esm/seq.d.ts.map +1 -1
  325. package/esm/seq.js +1 -1
  326. package/esm/seq.js.map +1 -1
  327. package/esm/serialize.d.ts.map +1 -1
  328. package/esm/serialize.js.map +1 -1
  329. package/esm/set.d.ts.map +1 -1
  330. package/esm/set.js.map +1 -1
  331. package/esm/setImmutable.d.ts.map +1 -1
  332. package/esm/setImmutable.js.map +1 -1
  333. package/esm/shuffle.d.ts.map +1 -1
  334. package/esm/sortBy.d.ts.map +1 -1
  335. package/esm/sortBy.js.map +1 -1
  336. package/esm/sortProps.d.ts.map +1 -1
  337. package/esm/sortProps.js.map +1 -1
  338. package/esm/stripPrefix.d.ts.map +1 -1
  339. package/esm/stripPrefix.js.map +1 -1
  340. package/esm/stripSuffix.d.ts.map +1 -1
  341. package/esm/stripSuffix.js.map +1 -1
  342. package/esm/throttle.d.ts.map +1 -1
  343. package/esm/throttle.js.map +1 -1
  344. package/esm/toggle.d.ts.map +1 -1
  345. package/esm/toggle.js.map +1 -1
  346. package/esm/trim.d.ts.map +1 -1
  347. package/esm/trimEnd.d.ts.map +1 -1
  348. package/esm/trimEnd.js.map +1 -1
  349. package/esm/trimStart.d.ts.map +1 -1
  350. package/esm/trimStart.js.map +1 -1
  351. package/esm/truthy.d.ts +1 -1
  352. package/esm/truthy.d.ts.map +1 -1
  353. package/esm/unique.d.ts.map +1 -1
  354. package/esm/wait.d.ts.map +1 -1
  355. package/esm/waitFor.d.ts.map +1 -1
  356. package/esm/waitFor.js +1 -1
  357. package/esm/waitFor.js.map +1 -1
  358. package/esm/waitSync.d.ts.map +1 -1
  359. package/esm/waitSync.js.map +1 -1
  360. package/package.json +10 -17
  361. package/pnpm-lock.yaml +4831 -3701
  362. package/src/compareProps.ts +9 -2
  363. package/src/deserialize.spec.ts +1 -0
  364. package/src/escapeRegExp.spec.ts +5 -3
  365. package/src/escapeRegExp.ts +3 -2
  366. package/src/formatDate.ts +2 -2
  367. package/src/get.spec.ts +2 -9
  368. package/src/getMultiple.ts +1 -0
  369. package/src/index.ts +2 -0
  370. package/src/isNumericString.ts +3 -3
  371. package/src/mapValues.spec.ts +1 -2
  372. package/src/memoize.spec.ts +90 -0
  373. package/src/memoize.ts +35 -0
  374. package/src/merge.ts +30 -8
  375. package/src/mostFrequent.ts +1 -0
  376. package/src/remove.ts +1 -1
  377. package/src/removeCommonProperties.ts +4 -2
  378. package/src/replace.ts +1 -1
  379. package/src/rethrow.ts +1 -1
  380. package/src/retry.ts +53 -0
  381. package/src/sample.spec.ts +1 -0
  382. package/src/sample.ts +18 -2
  383. package/src/samples.ts +1 -1
  384. package/src/seq.spec.ts +6 -3
  385. package/src/seq.ts +1 -1
  386. package/src/serialize.spec.ts +1 -0
  387. package/src/serialize.ts +1 -1
  388. package/src/set.ts +1 -1
  389. package/src/setImmutable.ts +1 -1
  390. package/src/sortBy.ts +1 -1
  391. package/src/throttle.ts +1 -1
  392. package/src/waitFor.spec.ts +7 -2
  393. package/src/waitFor.ts +1 -1
  394. package/typedoc.cjs +2 -4
  395. package/docs/assets/pages.css +0 -14
  396. package/docs/functions/cap.html +0 -152
  397. package/docs/functions/capitalize.html +0 -157
  398. package/docs/functions/coalesce.html +0 -162
  399. package/docs/functions/compareArrays.html +0 -165
  400. package/docs/functions/compareProps.html +0 -164
  401. package/docs/functions/deserialize.html +0 -156
  402. package/docs/functions/ensureArray.html +0 -150
  403. package/docs/functions/ensureDate.html +0 -152
  404. package/docs/functions/ensureError.html +0 -156
  405. package/docs/functions/ensurePrefix.html +0 -154
  406. package/docs/functions/ensureSuffix.html +0 -154
  407. package/docs/functions/ensureTimestamp.html +0 -152
  408. package/docs/functions/escapeRegExp.html +0 -148
  409. package/docs/functions/formatDate.html +0 -150
  410. package/docs/functions/get.html +0 -174
  411. package/docs/functions/getMultiple.html +0 -165
  412. package/docs/functions/insertSeparator.html +0 -159
  413. package/docs/functions/isEmpty.html +0 -175
  414. package/docs/functions/isNumericString.html +0 -149
  415. package/docs/functions/isPlainObject.html +0 -159
  416. package/docs/functions/last.html +0 -162
  417. package/docs/functions/later-1.html +0 -147
  418. package/docs/functions/mapAsync.html +0 -180
  419. package/docs/functions/mapValues.html +0 -166
  420. package/docs/functions/match.html +0 -158
  421. package/docs/functions/merge.html +0 -500
  422. package/docs/functions/mostFrequent.html +0 -147
  423. package/docs/functions/noop.html +0 -137
  424. package/docs/functions/occurrences.html +0 -161
  425. package/docs/functions/omit.html +0 -169
  426. package/docs/functions/pick.html +0 -165
  427. package/docs/functions/pull.html +0 -149
  428. package/docs/functions/remove.html +0 -165
  429. package/docs/functions/removeCommonProperties.html +0 -164
  430. package/docs/functions/replace.html +0 -154
  431. package/docs/functions/replaceDeep.html +0 -170
  432. package/docs/functions/rethrow.html +0 -142
  433. package/docs/functions/round.html +0 -151
  434. package/docs/functions/safe.html +0 -192
  435. package/docs/functions/sample.html +0 -149
  436. package/docs/functions/samples.html +0 -159
  437. package/docs/functions/scale.html +0 -153
  438. package/docs/functions/seq.html +0 -164
  439. package/docs/functions/seqEarlyBreak.html +0 -162
  440. package/docs/functions/serialize.html +0 -161
  441. package/docs/functions/set.html +0 -174
  442. package/docs/functions/setImmutable.html +0 -173
  443. package/docs/functions/shuffle.html +0 -149
  444. package/docs/functions/sortBy.html +0 -171
  445. package/docs/functions/sortProps.html +0 -159
  446. package/docs/functions/stripPrefix.html +0 -148
  447. package/docs/functions/stripSuffix.html +0 -148
  448. package/docs/functions/throttle.html +0 -167
  449. package/docs/functions/toggle.html +0 -154
  450. package/docs/functions/trim.html +0 -152
  451. package/docs/functions/trimEnd.html +0 -152
  452. package/docs/functions/trimStart.html +0 -152
  453. package/docs/functions/truthy.html +0 -154
  454. package/docs/functions/unique.html +0 -152
  455. package/docs/functions/wait.html +0 -145
  456. package/docs/functions/waitFor.html +0 -164
  457. package/docs/functions/waitSync.html +0 -145
  458. package/docs/interfaces/ComparePropsOptions.html +0 -70
  459. package/docs/interfaces/GetMultipleSource.html +0 -142
  460. package/docs/interfaces/GetSource.html +0 -142
  461. package/docs/interfaces/IsNumericStringOptions.html +0 -91
  462. package/docs/interfaces/OccurencesOptions.html +0 -72
  463. package/docs/interfaces/SetImmutableSource.html +0 -142
  464. package/docs/interfaces/SetSource.html +0 -142
  465. package/docs/interfaces/ThrottleOptions.html +0 -81
  466. package/docs/interfaces/ThrottledFunctionExtras.html +0 -97
  467. package/docs/pages/CHANGELOG.html +0 -973
  468. package/docs/pages/Introduction.html +0 -130
  469. package/docs/types/CustomDeserializers.html +0 -159
  470. package/docs/types/CustomSerializers.html +0 -159
  471. package/docs/types/Later.html +0 -173
  472. package/docs/types/MapValuesFn.html +0 -170
  473. package/docs/types/MatchCallback.html +0 -149
  474. package/docs/types/SeqEarlyBreaker.html +0 -150
  475. package/docs/types/SeqFn.html +0 -148
  476. package/docs/types/SeqFunctions.html +0 -141
  477. package/docs/types/SetImmutablePath.html +0 -135
  478. package/docs/types/ThrottledFunction.html +0 -149
  479. package/docs/variables/mapValuesUNSET.html +0 -137
  480. package/docs/variables/mergeUNSET.html +0 -139
  481. package/tutorials/Introduction.md +0 -1
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>coalesce | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.coalesce.html">coalesce</a></li></ul><h1>Function coalesce</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Returns first non-nil (not undefined, not null) value from given arguments.</p>
2
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">coalesce</span><span class="hl-1">(</span><span class="hl-0">null</span><span class="hl-1">, </span><span class="hl-0">undefined</span><span class="hl-1">, </span><span class="hl-0">void</span><span class="hl-1"> </span><span class="hl-5">1</span><span class="hl-1">, </span><span class="hl-5">5</span><span class="hl-1">); </span><span class="hl-6">// returns 5 (mind the `void`)</span>
3
+ </code><button type="button">Copy</button></pre>
4
+
5
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">coalesce</span><span class="hl-1">(</span><span class="hl-5">0</span><span class="hl-1">, </span><span class="hl-0">null</span><span class="hl-1">, </span><span class="hl-5">6</span><span class="hl-1">, </span><span class="hl-0">undefined</span><span class="hl-1">); </span><span class="hl-6">// returns 0</span>
6
+ </code><button type="button">Copy</button></pre>
7
+
8
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-2" class="tsd-anchor"></a>Example<a href="#Example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">coalesce</span><span class="hl-1">(</span><span class="hl-0">undefined</span><span class="hl-1">); </span><span class="hl-6">// returns null</span>
9
+ </code><button type="button">Copy</button></pre>
10
+
11
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-3" class="tsd-anchor"></a>Example<a href="#Example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">coalesce</span><span class="hl-1">(); </span><span class="hl-6">// returns null</span>
12
+ </code><button type="button">Copy</button></pre>
13
+
14
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="coalesce" class="tsd-anchor"></a><span class="tsd-kind-call-signature">coalesce</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.coalesce.html#coalesce.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">NonNullable</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.coalesce.html#coalesce.T">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#coalesce" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="coalesce.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="index.coalesce.html#coalesce.T">T</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>values</p>
15
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">NonNullable</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.coalesce.html#coalesce.T">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>first non-nil value or null</p>
16
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/coalesce.ts#L11">coalesce.ts:11</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,8 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>compareArrays | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.compareArrays.html">compareArrays</a></li></ul><h1>Function compareArrays</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Compares two arrays and returns the items that are only in arrayA, only in arrayB, and in both arrays.</p>
2
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="compareArrays" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compare<wbr/>Arrays</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">arrayA</span>, <span class="tsd-kind-parameter">arrayB</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">both</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">onlyA</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">onlyB</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><a href="#compareArrays" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="compareArrays.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">arrayA</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a></span><div class="tsd-comment tsd-typography"><p>first array</p>
3
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">arrayB</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a></span><div class="tsd-comment tsd-typography"><p>second array</p>
4
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">both</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">onlyA</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">onlyB</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h4><p>an object with three properties:
5
+ onlyA - items that exists only in first array,
6
+ onlyB - items that exists only in second array,
7
+ both - items that exists in both arrays</p>
8
+ <ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">both</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">onlyA</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">onlyB</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareArrays.html#compareArrays.T">T</a></h5></li></ul><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/compareArrays.ts#L12">compareArrays.ts:12</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>compareProps | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.compareProps.html">compareProps</a></li></ul><h1>Function compareProps</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Compare two objects and return an array of the properties that are different.
2
+ By default, if the first object doesn't have a property at all and the second object has it defined as <code>undefined</code>
3
+ this will be considered as a difference. To change this behavior, set <code>missingEqualsUndefined</code> option to <code>true</code>.</p>
4
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">compareProps</span><span class="hl-1">({ </span><span class="hl-3">a:</span><span class="hl-1"> </span><span class="hl-5">1</span><span class="hl-1">, </span><span class="hl-3">b:</span><span class="hl-1"> </span><span class="hl-5">2</span><span class="hl-1"> }, { </span><span class="hl-3">a:</span><span class="hl-1"> </span><span class="hl-5">1</span><span class="hl-1">, </span><span class="hl-3">b:</span><span class="hl-1"> </span><span class="hl-5">3</span><span class="hl-1"> }) </span><span class="hl-6">// [&quot;b&quot;]</span>
5
+ </code><button type="button">Copy</button></pre>
6
+
7
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="compareProps" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compare<wbr/>Props</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareProps.html#compareProps.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a</span>, <span class="tsd-kind-parameter">b</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#compareProps" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="compareProps.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">a</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareProps.html#compareProps.T">T</a></span><div class="tsd-comment tsd-typography"><p>first object</p>
8
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">b</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="index.compareProps.html#compareProps.T">T</a></span><div class="tsd-comment tsd-typography"><p>second object</p>
9
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/index.ComparePropsOptions.html" class="tsd-signature-type tsd-kind-interface">ComparePropsOptions</a><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>options</p>
10
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of the properties that are different</p>
11
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/compareProps.ts#L24">compareProps.ts:24</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,6 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>deserialize | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.deserialize.html">deserialize</a></li></ul><h1>Function deserialize</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Deserializes a string serialized with <code>serialize</code> into a value.</p>
2
+ <p>You will need to specify deserializers if custom data types are serialized. See <code>serialize</code> for more information.</p>
3
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-See"><h4 class="tsd-anchor-link"><a id="See" class="tsd-anchor"></a>See<a href="#See" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="index.serialize.html" class="tsd-kind-function">serialize</a>.</p>
4
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="deserialize" class="tsd-anchor"></a><span class="tsd-kind-call-signature">deserialize</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.deserialize.html#deserialize.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">serializedString</span>, <span class="tsd-kind-parameter">customDeserializers</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.deserialize.html#deserialize.T">T</a><a href="#deserialize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="deserialize.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">serializedString</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the serialized string</p>
5
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">customDeserializers</span>: <a href="../types/index.CustomDeserializers.html" class="tsd-signature-type tsd-kind-type-alias">CustomDeserializers</a></span><div class="tsd-comment tsd-typography"><p>an object with custom deserializers</p>
6
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="index.deserialize.html#deserialize.T">T</a></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/deserialize.ts#L27">deserialize.ts:27</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,3 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ensureArray | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.ensureArray.html">ensureArray</a></li></ul><h1>Function ensureArray</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Wraps value in an array unless the value is already an array</p>
2
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="ensureArray" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ensure<wbr/>Array</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.ensureArray.html#ensureArray.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.ensureArray.html#ensureArray.T">T</a><span class="tsd-signature-symbol">[]</span><a href="#ensureArray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="ensureArray.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="index.ensureArray.html#ensureArray.T">T</a><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="index.ensureArray.html#ensureArray.T">T</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>value to be wrapped</p>
3
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="index.ensureArray.html#ensureArray.T">T</a><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/ensureArray.ts#L6">ensureArray.ts:6</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ensureDate | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.ensureDate.html">ensureDate</a></li></ul><h1>Function ensureDate</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Ensure that the date value is a Date instance</p>
2
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureDate</span><span class="hl-1">(</span><span class="hl-5">123456789</span><span class="hl-1">); </span><span class="hl-6">// Date(123456789)</span>
3
+ </code><button type="button">Copy</button></pre>
4
+
5
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureDate</span><span class="hl-1">(</span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-2">Date</span><span class="hl-1">(</span><span class="hl-5">123456789</span><span class="hl-1">)); </span><span class="hl-6">// Date(123456789) -- same instance as given</span>
6
+ </code><button type="button">Copy</button></pre>
7
+
8
+ </div><div class="tsd-tag-See"><h4 class="tsd-anchor-link"><a id="See" class="tsd-anchor"></a>See<a href="#See" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="index.ensureTimestamp.html" class="tsd-kind-function">ensureTimestamp</a></p>
9
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="ensureDate" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ensure<wbr/>Date</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span><a href="#ensureDate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">date</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Date</span></span><div class="tsd-comment tsd-typography"><p>date value</p>
10
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Date</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/ensureDate.ts#L9">ensureDate.ts:9</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ensureError | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.ensureError.html">ensureError</a></li></ul><h1>Function ensureError</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Ensures given value is an instance of Error.</p>
2
+ <p>This is for simple use cases only, for maximum flexibility use <code>@ezez/errors</code> package.</p>
3
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureError</span><span class="hl-1">(</span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-2">Error</span><span class="hl-1">(</span><span class="hl-7">&quot;test&quot;</span><span class="hl-1">)); </span><span class="hl-6">// returns given Error instance (not modified)</span>
4
+ </code><button type="button">Copy</button></pre>
5
+
6
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureError</span><span class="hl-1">(</span><span class="hl-7">&quot;test&quot;</span><span class="hl-1">);</span><br/><span class="hl-6">// ^ returns new Error instance with error message: &quot;Expected error instance, got something else: test&quot;</span>
7
+ </code><button type="button">Copy</button></pre>
8
+
9
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-2" class="tsd-anchor"></a>Example<a href="#Example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureError</span><span class="hl-1">({});</span><br/><span class="hl-6">// ^ returns new Error instance with error message: &quot;Expected error instance, got something else: [object Object]&quot;</span>
10
+ </code><button type="button">Copy</button></pre>
11
+
12
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="ensureError" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ensure<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span><a href="#ensureError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">e</span>: <span class="tsd-signature-type">unknown</span></span><div class="tsd-comment tsd-typography"><p>value to check</p>
13
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Error</span></h4><p>Error - original error or new Error instance</p>
14
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/ensureError.ts#L13">ensureError.ts:13</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ensurePrefix | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.ensurePrefix.html">ensurePrefix</a></li></ul><h1>Function ensurePrefix</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Add prefix to string if it doesn't already have it</p>
2
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensurePrefix</span><span class="hl-1">(</span><span class="hl-7">&quot;1234bbcc&quot;</span><span class="hl-1">, </span><span class="hl-7">&quot;0x&quot;</span><span class="hl-1">) -&gt; </span><span class="hl-7">&quot;0x1234bbcc&quot;</span>
3
+ </code><button type="button">Copy</button></pre>
4
+
5
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensurePrefix</span><span class="hl-1">(</span><span class="hl-7">&quot;0x1234bbcc&quot;</span><span class="hl-1">, </span><span class="hl-7">&quot;0x&quot;</span><span class="hl-1">) -&gt; </span><span class="hl-7">&quot;0x1234bbcc&quot;</span>
6
+ </code><button type="button">Copy</button></pre>
7
+
8
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="ensurePrefix" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ensure<wbr/>Prefix</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span>, <span class="tsd-kind-parameter">prefix</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#ensurePrefix" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">string</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>string to add prefix to</p>
9
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">prefix</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>prefix to add</p>
10
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/ensurePrefix.ts#L9">ensurePrefix.ts:9</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ensureSuffix | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.ensureSuffix.html">ensureSuffix</a></li></ul><h1>Function ensureSuffix</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Add suffix to string if it does not already end with it</p>
2
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureSuffix</span><span class="hl-1">(</span><span class="hl-7">&quot;hello world&quot;</span><span class="hl-1">, </span><span class="hl-7">&quot;.&quot;</span><span class="hl-1">) -&gt; </span><span class="hl-7">&quot;hello world.&quot;</span>
3
+ </code><button type="button">Copy</button></pre>
4
+
5
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureSuffix</span><span class="hl-1">(</span><span class="hl-7">&quot;hello world.&quot;</span><span class="hl-1">, </span><span class="hl-7">&quot;.&quot;</span><span class="hl-1">) -&gt; </span><span class="hl-7">&quot;hello world.&quot;</span>
6
+ </code><button type="button">Copy</button></pre>
7
+
8
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="ensureSuffix" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ensure<wbr/>Suffix</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span>, <span class="tsd-kind-parameter">suffix</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#ensureSuffix" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">string</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>string to add suffix to</p>
9
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">suffix</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>suffix to add</p>
10
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/ensureSuffix.ts#L9">ensureSuffix.ts:9</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ensureTimestamp | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.ensureTimestamp.html">ensureTimestamp</a></li></ul><h1>Function ensureTimestamp</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Ensures that the given date value is a numeric timestamp.</p>
2
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureTimestamp</span><span class="hl-1">(</span><span class="hl-5">123456789</span><span class="hl-1">); </span><span class="hl-6">// 123456789</span>
3
+ </code><button type="button">Copy</button></pre>
4
+
5
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">ensureTimestamp</span><span class="hl-1">(</span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-2">Date</span><span class="hl-1">(</span><span class="hl-5">123456789</span><span class="hl-1">)); </span><span class="hl-6">// 123456789</span>
6
+ </code><button type="button">Copy</button></pre>
7
+
8
+ </div><div class="tsd-tag-See"><h4 class="tsd-anchor-link"><a id="See" class="tsd-anchor"></a>See<a href="#See" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="index.ensureDate.html" class="tsd-kind-function">ensureDate</a></p>
9
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="ensureTimestamp" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ensure<wbr/>Timestamp</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#ensureTimestamp" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">date</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Date</span></span><div class="tsd-comment tsd-typography"><p>date value</p>
10
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/ensureTimestamp.ts#L9">ensureTimestamp.ts:9</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,7 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>escapeRegExp | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.escapeRegExp.html">escapeRegExp</a></li></ul><h1>Function escapeRegExp</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Escapes a string to be used in a regular expression.
2
+ From: <a href="https://stackoverflow.com/a/3561711" target="_blank" class="external">https://stackoverflow.com/a/3561711</a></p>
3
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-8">badName</span><span class="hl-1"> = </span><span class="hl-7">&quot;([{^|&quot;</span><span class="hl-1">;</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-8">regex</span><span class="hl-1"> = </span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-2">RegExp</span><span class="hl-1">(</span><span class="hl-7">`^(maciek|</span><span class="hl-0">${</span><span class="hl-2">escapeRegExp</span><span class="hl-9">(</span><span class="hl-3">badName</span><span class="hl-9">)</span><span class="hl-0">}</span><span class="hl-7">)$`</span><span class="hl-1">); </span><span class="hl-6">// won&#39;t crash</span><br/><span class="hl-3">regex</span><span class="hl-1">.</span><span class="hl-2">test</span><span class="hl-1">(</span><span class="hl-3">badName</span><span class="hl-1">); </span><span class="hl-6">// true</span>
4
+ </code><button type="button">Copy</button></pre>
5
+
6
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="escapeRegExp" class="tsd-anchor"></a><span class="tsd-kind-call-signature">escape<wbr/>Reg<wbr/>Exp</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#escapeRegExp" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">string</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>string to escape</p>
7
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/escapeRegExp.ts#L12">escapeRegExp.ts:12</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,6 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>formatDate | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.formatDate.html">formatDate</a></li></ul><h1>Function formatDate</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>PHP's <code>strftime</code>-like date formatter.
2
+ IMPORTANT: Use Intl.DateTimeFormat everywhere possible. Use this only if you are 100% sure you want to have given
3
+ date format, not depending on any locale standards.</p>
4
+ <p>Important: this is work in progress. All locale-based values are not supported yet. Formats that heavily depend on
5
+ locale won't ever be supported.</p>
6
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="formatDate" class="tsd-anchor"></a><span class="tsd-kind-call-signature">format<wbr/>Date</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span>, <span class="tsd-kind-parameter">format</span>, <span class="tsd-kind-parameter">locale</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#formatDate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">date</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Date</span></span></li><li><span><span class="tsd-kind-parameter">format</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">locale</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;en-US&quot;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/formatDate.ts#L12">formatDate.ts:12</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>get | @ezez/utils - v4.2.0</title><meta name="description" content="Documentation for @ezez/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@ezez/utils - v4.2.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@ezez/utils</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.get.html">get</a></li></ul><h1>Function get</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Returns the value at given path of given object. If path is not found then default value is returned. No exceptions
2
+ are thrown when undefined/null value gets in the way.</p>
3
+ <p>This is still too dynamic in nature to get full TypeScript support. Properties are not typed, return type is unknown.
4
+ If your data access is statically known there is no need to use this function, just use <code>object.property</code> syntax with
5
+ optional chaining.</p>
6
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">get</span><span class="hl-1">(</span><span class="hl-3">object</span><span class="hl-1">, </span><span class="hl-7">&quot;deep.property&quot;</span><span class="hl-1">) </span><span class="hl-6">// equals to safe `object.deep.property`</span>
7
+ </code><button type="button">Copy</button></pre>
8
+
9
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">get</span><span class="hl-1">(</span><span class="hl-3">object</span><span class="hl-1">, [</span><span class="hl-7">&quot;deep&quot;</span><span class="hl-1">, </span><span class="hl-7">&quot;property&quot;</span><span class="hl-1">]) </span><span class="hl-6">// same as above</span>
10
+ </code><button type="button">Copy</button></pre>
11
+
12
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-2" class="tsd-anchor"></a>Example<a href="#Example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">get</span><span class="hl-1">(</span><span class="hl-3">object</span><span class="hl-1">, </span><span class="hl-7">&quot;deep[0].property&quot;</span><span class="hl-1">)</span><br/><span class="hl-6">// equals to:</span><br/><span class="hl-3">object</span><span class="hl-1">[</span><span class="hl-7">&quot;deep[0]&quot;</span><span class="hl-1">].</span><span class="hl-3">property</span><br/><span class="hl-6">// not:</span><br/><span class="hl-3">object</span><span class="hl-1">.</span><span class="hl-3">deep</span><span class="hl-1">[</span><span class="hl-5">0</span><span class="hl-1">].</span><span class="hl-3">property</span>
13
+ </code><button type="button">Copy</button></pre>
14
+
15
+ </div><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-3" class="tsd-anchor"></a>Example<a href="#Example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">get</span><span class="hl-1">(</span><span class="hl-3">object</span><span class="hl-1">, </span><span class="hl-7">&quot;very.deep.property&quot;</span><span class="hl-1">, </span><span class="hl-5">5</span><span class="hl-1">)</span><br/><span class="hl-6">// if object.very.deep has also `property` property then it value will be returned, even if undefined</span><br/><span class="hl-6">// else `5` will be returned</span>
16
+ </code><button type="button">Copy</button></pre>
17
+
18
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="get" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">source</span>, <span class="tsd-kind-parameter">property</span>, <span class="tsd-kind-parameter">defaultValue</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><a href="#get" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">source</span>: <a href="../interfaces/index.GetSource.html" class="tsd-signature-type tsd-kind-interface">GetSource</a></span><div class="tsd-comment tsd-typography"><p>source object to search in</p>
19
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">property</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>path to the expected value written as dot-separated property names or array
20
+ with property names. Use Array when your keys includes dots. Keys are treated literally, no parsing is done on keys.</p>
21
+ </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">defaultValue</span>: <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol"> = undefined</span></span><div class="tsd-comment tsd-typography"><p>value to return if path is not found. If path is found, but the value is undefined -
22
+ default value will NOT be used, use <code>get(...) || default</code> instead</p>
23
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</span></h4><ul>
24
+ <li>found value or default value</li>
25
+ </ul>
26
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dzek69/ezez-utils/blob/f2164aafe65a00d8295169f2afb280cc23a0dadd/src/get.ts#L33">get.ts:33</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@ezez/utils - v4.2.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>