@koine/utils 2.0.0-beta.132 → 2.0.0-beta.134

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 (493) hide show
  1. package/Defer.cjs.js +1 -20
  2. package/Defer.d.ts +14 -0
  3. package/Defer.esm.js +1 -20
  4. package/Emitter.cjs.js +1 -18
  5. package/Emitter.d.ts +20 -0
  6. package/Emitter.esm.js +1 -18
  7. package/accentsSets.cjs.js +1 -13
  8. package/accentsSets.d.ts +14 -0
  9. package/accentsSets.esm.js +1 -13
  10. package/addOrReplaceAtIdx.cjs.js +1 -7
  11. package/addOrReplaceAtIdx.d.ts +7 -0
  12. package/addOrReplaceAtIdx.esm.js +1 -7
  13. package/areEqual.cjs.js +1 -28
  14. package/areEqual.d.ts +15 -0
  15. package/areEqual.esm.js +1 -28
  16. package/arrayFilterFalsy.cjs.js +1 -6
  17. package/arrayFilterFalsy.d.ts +6 -0
  18. package/arrayFilterFalsy.esm.js +1 -6
  19. package/arrayFindLastIndex.cjs.js +1 -13
  20. package/arrayFindLastIndex.d.ts +13 -0
  21. package/arrayFindLastIndex.esm.js +1 -13
  22. package/arrayOfAll.cjs.js +1 -16
  23. package/arrayOfAll.d.ts +22 -0
  24. package/arrayOfAll.esm.js +1 -16
  25. package/arraySum.cjs.js +1 -6
  26. package/arraySum.d.ts +6 -0
  27. package/arraySum.esm.js +1 -6
  28. package/arrayToLookup.cjs.js +1 -5
  29. package/arrayToLookup.d.ts +5 -0
  30. package/arrayToLookup.esm.js +1 -5
  31. package/arrayUniqueByProperties.cjs.js +1 -8
  32. package/arrayUniqueByProperties.d.ts +8 -0
  33. package/arrayUniqueByProperties.esm.js +1 -8
  34. package/buildUrlQueryString.cjs.js +1 -10
  35. package/buildUrlQueryString.d.ts +9 -0
  36. package/buildUrlQueryString.esm.js +1 -10
  37. package/capitalize.cjs.js +1 -7
  38. package/capitalize.d.ts +7 -0
  39. package/capitalize.esm.js +1 -7
  40. package/changeCaseCamel.cjs.js +1 -7
  41. package/changeCaseCamel.d.ts +7 -0
  42. package/changeCaseCamel.esm.js +1 -7
  43. package/changeCaseCapital.cjs.js +1 -7
  44. package/changeCaseCapital.d.ts +7 -0
  45. package/changeCaseCapital.esm.js +1 -7
  46. package/changeCaseConstant.cjs.js +1 -7
  47. package/changeCaseConstant.d.ts +7 -0
  48. package/changeCaseConstant.esm.js +1 -7
  49. package/changeCaseDot.cjs.js +1 -7
  50. package/changeCaseDot.d.ts +7 -0
  51. package/changeCaseDot.esm.js +1 -7
  52. package/changeCaseHelpers.cjs.js +1 -32
  53. package/changeCaseHelpers.d.ts +22 -0
  54. package/changeCaseHelpers.esm.js +1 -32
  55. package/changeCaseKebab.cjs.js +1 -7
  56. package/changeCaseKebab.d.ts +7 -0
  57. package/changeCaseKebab.esm.js +1 -7
  58. package/changeCaseNone.cjs.js +1 -7
  59. package/changeCaseNone.d.ts +7 -0
  60. package/changeCaseNone.esm.js +1 -7
  61. package/changeCasePascal.cjs.js +1 -7
  62. package/changeCasePascal.d.ts +7 -0
  63. package/changeCasePascal.esm.js +1 -7
  64. package/changeCasePascalSnake.cjs.js +1 -7
  65. package/changeCasePascalSnake.d.ts +7 -0
  66. package/changeCasePascalSnake.esm.js +1 -7
  67. package/changeCasePath.cjs.js +1 -7
  68. package/changeCasePath.d.ts +7 -0
  69. package/changeCasePath.esm.js +1 -7
  70. package/changeCaseSentence.cjs.js +1 -7
  71. package/changeCaseSentence.d.ts +7 -0
  72. package/changeCaseSentence.esm.js +1 -7
  73. package/changeCaseSnake.cjs.js +1 -7
  74. package/changeCaseSnake.d.ts +7 -0
  75. package/changeCaseSnake.esm.js +1 -7
  76. package/changeCaseTrain.cjs.js +1 -7
  77. package/changeCaseTrain.d.ts +7 -0
  78. package/changeCaseTrain.esm.js +1 -7
  79. package/chunkByChunks.cjs.js +1 -5
  80. package/chunkByChunks.d.ts +5 -0
  81. package/chunkByChunks.esm.js +1 -5
  82. package/chunkBySize.cjs.js +1 -4
  83. package/chunkBySize.d.ts +4 -0
  84. package/chunkBySize.esm.js +1 -4
  85. package/clamp.cjs.js +1 -6
  86. package/clamp.d.ts +6 -0
  87. package/clamp.esm.js +1 -6
  88. package/clsx.cjs.js +1 -7
  89. package/clsx.d.ts +6 -0
  90. package/clsx.esm.js +1 -7
  91. package/convertRange.cjs.js +1 -14
  92. package/convertRange.d.ts +14 -0
  93. package/convertRange.esm.js +1 -14
  94. package/cookie.cjs.js +1 -44
  95. package/cookie.d.ts +45 -0
  96. package/cookie.esm.js +1 -44
  97. package/createPalette.cjs.js +1 -17
  98. package/createPalette.d.ts +12 -0
  99. package/createPalette.esm.js +1 -17
  100. package/debounce.cjs.js +1 -7
  101. package/debounce.d.ts +6 -0
  102. package/debounce.esm.js +1 -7
  103. package/debouncePromise.cjs.js +1 -15
  104. package/debouncePromise.d.ts +17 -0
  105. package/debouncePromise.esm.js +1 -15
  106. package/debounceRaf.cjs.js +1 -9
  107. package/debounceRaf.d.ts +6 -0
  108. package/debounceRaf.esm.js +1 -9
  109. package/decode.cjs.js +1 -4
  110. package/decode.d.ts +4 -0
  111. package/decode.esm.js +1 -4
  112. package/encode.cjs.js +1 -4
  113. package/encode.d.ts +4 -0
  114. package/encode.esm.js +1 -4
  115. package/ensureInt.cjs.js +1 -5
  116. package/ensureInt.d.ts +5 -0
  117. package/ensureInt.esm.js +1 -5
  118. package/errorToString.cjs.js +1 -6
  119. package/errorToString.d.ts +6 -0
  120. package/errorToString.esm.js +1 -6
  121. package/escapeRegExp.cjs.js +1 -7
  122. package/escapeRegExp.d.ts +7 -0
  123. package/escapeRegExp.esm.js +1 -7
  124. package/findDuplicatedIndexes.cjs.js +1 -3
  125. package/findDuplicatedIndexes.d.ts +3 -0
  126. package/findDuplicatedIndexes.esm.js +1 -3
  127. package/forin.cjs.js +1 -6
  128. package/forin.d.ts +6 -0
  129. package/forin.esm.js +1 -6
  130. package/gbToBytes.cjs.js +1 -5
  131. package/gbToBytes.d.ts +5 -0
  132. package/gbToBytes.esm.js +1 -5
  133. package/getEmptyArray.cjs.js +1 -6
  134. package/getEmptyArray.d.ts +6 -0
  135. package/getEmptyArray.esm.js +1 -6
  136. package/getKeys.cjs.js +1 -8
  137. package/getKeys.d.ts +8 -0
  138. package/getKeys.esm.js +1 -8
  139. package/getMediaQueryWidthResolvers.cjs.js +1 -27
  140. package/getMediaQueryWidthResolvers.d.ts +6 -0
  141. package/getMediaQueryWidthResolvers.esm.js +1 -27
  142. package/getMediaQueryWidthTailwindScreens.cjs.js +1 -6
  143. package/getMediaQueryWidthTailwindScreens.d.ts +4 -0
  144. package/getMediaQueryWidthTailwindScreens.esm.js +1 -6
  145. package/getNonce.cjs.js +1 -4
  146. package/getNonce.d.ts +4 -0
  147. package/getNonce.esm.js +1 -4
  148. package/getParamAmong.cjs.js +1 -11
  149. package/getParamAmong.d.ts +11 -0
  150. package/getParamAmong.esm.js +1 -11
  151. package/getParamAsInt.cjs.js +1 -10
  152. package/getParamAsInt.d.ts +10 -0
  153. package/getParamAsInt.esm.js +1 -10
  154. package/getParamAsString.cjs.js +1 -9
  155. package/getParamAsString.d.ts +9 -0
  156. package/getParamAsString.esm.js +1 -9
  157. package/getType.cjs.js +1 -13
  158. package/getType.d.ts +15 -0
  159. package/getType.esm.js +1 -13
  160. package/getUrlHashParams.cjs.js +1 -6
  161. package/getUrlHashParams.d.ts +6 -0
  162. package/getUrlHashParams.esm.js +1 -6
  163. package/getUrlHashPathname.cjs.js +1 -7
  164. package/getUrlHashPathname.d.ts +7 -0
  165. package/getUrlHashPathname.esm.js +1 -7
  166. package/getUrlPathnameParts.cjs.js +1 -10
  167. package/getUrlPathnameParts.d.ts +10 -0
  168. package/getUrlPathnameParts.esm.js +1 -10
  169. package/getUrlQueryParams.cjs.js +1 -12
  170. package/getUrlQueryParams.d.ts +10 -0
  171. package/getUrlQueryParams.esm.js +1 -12
  172. package/hashAny.cjs.js +1 -30
  173. package/hashAny.d.ts +17 -0
  174. package/hashAny.esm.js +1 -30
  175. package/imgEmptyPixel.cjs.js +1 -5
  176. package/imgEmptyPixel.d.ts +5 -0
  177. package/imgEmptyPixel.esm.js +1 -5
  178. package/index.d.ts +3 -0
  179. package/invariant.cjs.js +1 -17
  180. package/invariant.d.ts +17 -0
  181. package/invariant.esm.js +1 -17
  182. package/isAbsoluteUrl.cjs.js +1 -10
  183. package/isAbsoluteUrl.d.ts +9 -0
  184. package/isAbsoluteUrl.esm.js +1 -10
  185. package/isAnyObject.cjs.js +1 -5
  186. package/isAnyObject.d.ts +5 -0
  187. package/isAnyObject.esm.js +1 -5
  188. package/isArray.cjs.js +1 -5
  189. package/isArray.d.ts +5 -0
  190. package/isArray.esm.js +1 -5
  191. package/isBlob.cjs.js +1 -5
  192. package/isBlob.d.ts +5 -0
  193. package/isBlob.esm.js +1 -5
  194. package/isBoolean.cjs.js +1 -5
  195. package/isBoolean.d.ts +5 -0
  196. package/isBoolean.esm.js +1 -5
  197. package/isBrowser.cjs.js +1 -4
  198. package/isBrowser.d.ts +4 -0
  199. package/isBrowser.esm.js +1 -4
  200. package/isBrowserNow.cjs.js +1 -4
  201. package/isBrowserNow.d.ts +4 -0
  202. package/isBrowserNow.esm.js +1 -4
  203. package/isDate.cjs.js +1 -5
  204. package/isDate.d.ts +5 -0
  205. package/isDate.esm.js +1 -5
  206. package/isEmptyArray.cjs.js +1 -5
  207. package/isEmptyArray.d.ts +5 -0
  208. package/isEmptyArray.esm.js +1 -5
  209. package/isEmptyObject.cjs.js +1 -5
  210. package/isEmptyObject.d.ts +5 -0
  211. package/isEmptyObject.esm.js +1 -5
  212. package/isEmptyString.cjs.js +1 -5
  213. package/isEmptyString.d.ts +5 -0
  214. package/isEmptyString.esm.js +1 -5
  215. package/isError.cjs.js +1 -5
  216. package/isError.d.ts +5 -0
  217. package/isError.esm.js +1 -5
  218. package/isExternalUrl.cjs.js +1 -9
  219. package/isExternalUrl.d.ts +7 -0
  220. package/isExternalUrl.esm.js +1 -9
  221. package/isFile.cjs.js +1 -5
  222. package/isFile.d.ts +5 -0
  223. package/isFile.esm.js +1 -5
  224. package/isFloat.cjs.js +1 -5
  225. package/isFloat.d.ts +5 -0
  226. package/isFloat.esm.js +1 -5
  227. package/isFormData.cjs.js +1 -5
  228. package/isFormData.d.ts +5 -0
  229. package/isFormData.esm.js +1 -5
  230. package/isFullArray.cjs.js +1 -5
  231. package/isFullArray.d.ts +5 -0
  232. package/isFullArray.esm.js +1 -5
  233. package/isFullObject.cjs.js +1 -5
  234. package/isFullObject.d.ts +5 -0
  235. package/isFullObject.esm.js +1 -5
  236. package/isFullString.cjs.js +1 -5
  237. package/isFullString.d.ts +5 -0
  238. package/isFullString.esm.js +1 -5
  239. package/isFunction.cjs.js +1 -5
  240. package/isFunction.d.ts +5 -0
  241. package/isFunction.esm.js +1 -5
  242. package/isInt.cjs.js +1 -5
  243. package/isInt.d.ts +5 -0
  244. package/isInt.esm.js +1 -5
  245. package/isMap.cjs.js +1 -5
  246. package/isMap.d.ts +5 -0
  247. package/isMap.esm.js +1 -5
  248. package/isNaNValue.cjs.js +1 -5
  249. package/isNaNValue.d.ts +5 -0
  250. package/isNaNValue.esm.js +1 -5
  251. package/isNegativeNumber.cjs.js +1 -5
  252. package/isNegativeNumber.d.ts +5 -0
  253. package/isNegativeNumber.esm.js +1 -5
  254. package/isNull.cjs.js +1 -5
  255. package/isNull.d.ts +5 -0
  256. package/isNull.esm.js +1 -5
  257. package/isNullOrUndefined.cjs.js +1 -5
  258. package/isNullOrUndefined.d.ts +5 -0
  259. package/isNullOrUndefined.esm.js +1 -5
  260. package/isNumber.cjs.js +1 -7
  261. package/isNumber.d.ts +7 -0
  262. package/isNumber.esm.js +1 -7
  263. package/isNumericLiteral.cjs.js +1 -8
  264. package/isNumericLiteral.d.ts +8 -0
  265. package/isNumericLiteral.esm.js +1 -8
  266. package/isObject.cjs.js +1 -5
  267. package/isObject.d.ts +5 -0
  268. package/isObject.esm.js +1 -5
  269. package/isObjectLike.cjs.js +1 -7
  270. package/isObjectLike.d.ts +7 -0
  271. package/isObjectLike.esm.js +1 -7
  272. package/isObjectStringKeyed.cjs.js +1 -9
  273. package/isObjectStringKeyed.d.ts +9 -0
  274. package/isObjectStringKeyed.esm.js +1 -9
  275. package/isOneOf.cjs.js +1 -3
  276. package/isOneOf.d.ts +3 -0
  277. package/isOneOf.esm.js +1 -3
  278. package/isPlainObject.cjs.js +1 -5
  279. package/isPlainObject.d.ts +5 -0
  280. package/isPlainObject.esm.js +1 -5
  281. package/isPositiveNumber.cjs.js +1 -5
  282. package/isPositiveNumber.d.ts +5 -0
  283. package/isPositiveNumber.esm.js +1 -5
  284. package/isPrimitive.cjs.js +1 -5
  285. package/isPrimitive.d.ts +5 -0
  286. package/isPrimitive.esm.js +1 -5
  287. package/isPromise.cjs.js +1 -5
  288. package/isPromise.d.ts +5 -0
  289. package/isPromise.esm.js +1 -5
  290. package/isRegExp.cjs.js +1 -5
  291. package/isRegExp.d.ts +5 -0
  292. package/isRegExp.esm.js +1 -5
  293. package/isServer.cjs.js +1 -4
  294. package/isServer.d.ts +4 -0
  295. package/isServer.esm.js +1 -4
  296. package/isServerNow.cjs.js +1 -4
  297. package/isServerNow.d.ts +4 -0
  298. package/isServerNow.esm.js +1 -4
  299. package/isSet.cjs.js +1 -5
  300. package/isSet.d.ts +5 -0
  301. package/isSet.esm.js +1 -5
  302. package/isString.cjs.js +1 -5
  303. package/isString.d.ts +5 -0
  304. package/isString.esm.js +1 -5
  305. package/isSymbol.cjs.js +1 -5
  306. package/isSymbol.d.ts +5 -0
  307. package/isSymbol.esm.js +1 -5
  308. package/isType.cjs.js +1 -9
  309. package/isType.d.ts +8 -0
  310. package/isType.esm.js +1 -9
  311. package/isUndefined.cjs.js +1 -5
  312. package/isUndefined.d.ts +5 -0
  313. package/isUndefined.esm.js +1 -5
  314. package/isWeakMap.cjs.js +1 -5
  315. package/isWeakMap.d.ts +5 -0
  316. package/isWeakMap.esm.js +1 -5
  317. package/isWeakSet.cjs.js +1 -5
  318. package/isWeakSet.d.ts +5 -0
  319. package/isWeakSet.esm.js +1 -5
  320. package/kbToBytes.cjs.js +1 -5
  321. package/kbToBytes.d.ts +5 -0
  322. package/kbToBytes.esm.js +1 -5
  323. package/location.d.ts +3 -0
  324. package/lowercase.cjs.js +1 -5
  325. package/lowercase.d.ts +5 -0
  326. package/lowercase.esm.js +1 -5
  327. package/mapListBy.cjs.js +1 -5
  328. package/mapListBy.d.ts +5 -0
  329. package/mapListBy.esm.js +1 -5
  330. package/matchSorter.cjs.js +1 -92
  331. package/matchSorter.d.ts +10 -0
  332. package/matchSorter.esm.js +1 -92
  333. package/mbToBytes.cjs.js +1 -5
  334. package/mbToBytes.d.ts +5 -0
  335. package/mbToBytes.esm.js +1 -5
  336. package/mergeObjects.cjs.js +1 -8
  337. package/mergeObjects.d.ts +6 -0
  338. package/mergeObjects.esm.js +1 -8
  339. package/mergeUrlQueryParams.cjs.js +1 -5
  340. package/mergeUrlQueryParams.d.ts +5 -0
  341. package/mergeUrlQueryParams.esm.js +1 -5
  342. package/moveSortableArrayItemByKey.cjs.js +1 -7
  343. package/moveSortableArrayItemByKey.d.ts +7 -0
  344. package/moveSortableArrayItemByKey.esm.js +1 -7
  345. package/noop.cjs.js +1 -5
  346. package/noop.d.ts +5 -0
  347. package/noop.esm.js +1 -5
  348. package/normaliseUrl.cjs.js +1 -9
  349. package/normaliseUrl.d.ts +9 -0
  350. package/normaliseUrl.esm.js +1 -9
  351. package/normaliseUrlPathname.cjs.js +1 -8
  352. package/normaliseUrlPathname.d.ts +8 -0
  353. package/normaliseUrlPathname.esm.js +1 -8
  354. package/objectFlat.cjs.js +1 -8
  355. package/objectFlat.d.ts +8 -0
  356. package/objectFlat.esm.js +1 -8
  357. package/objectFlip.cjs.js +1 -4
  358. package/objectFlip.d.ts +4 -0
  359. package/objectFlip.esm.js +1 -4
  360. package/objectMergeWithDefaults.cjs.js +1 -10
  361. package/objectMergeWithDefaults.d.ts +10 -0
  362. package/objectMergeWithDefaults.esm.js +1 -10
  363. package/objectOmit.cjs.js +1 -9
  364. package/objectOmit.d.ts +9 -0
  365. package/objectOmit.esm.js +1 -9
  366. package/objectPick.cjs.js +1 -6
  367. package/objectPick.d.ts +6 -0
  368. package/objectPick.esm.js +1 -6
  369. package/objectSort.cjs.js +1 -8
  370. package/objectSort.d.ts +8 -0
  371. package/objectSort.esm.js +1 -8
  372. package/objectSortByKeysMatching.cjs.js +1 -9
  373. package/objectSortByKeysMatching.d.ts +9 -0
  374. package/objectSortByKeysMatching.esm.js +1 -9
  375. package/objectToArray.cjs.js +1 -6
  376. package/objectToArray.d.ts +6 -0
  377. package/objectToArray.esm.js +1 -6
  378. package/package.json +1 -1
  379. package/parseCookie.cjs.js +1 -13
  380. package/parseCookie.d.ts +8 -0
  381. package/parseCookie.esm.js +1 -13
  382. package/parseURL.cjs.js +1 -6
  383. package/parseURL.d.ts +6 -0
  384. package/parseURL.esm.js +1 -6
  385. package/quaranteneProps.cjs.js +1 -17
  386. package/quaranteneProps.d.ts +15 -0
  387. package/quaranteneProps.esm.js +1 -17
  388. package/randomInt.cjs.js +1 -5
  389. package/randomInt.d.ts +5 -0
  390. package/randomInt.esm.js +1 -5
  391. package/randomKey.cjs.js +1 -6
  392. package/randomKey.d.ts +6 -0
  393. package/randomKey.esm.js +1 -6
  394. package/readCookie.cjs.js +1 -5
  395. package/readCookie.d.ts +5 -0
  396. package/readCookie.esm.js +1 -5
  397. package/removeAccents.cjs.js +1 -3
  398. package/removeAccents.d.ts +3 -0
  399. package/removeAccents.esm.js +1 -3
  400. package/removeCookie.cjs.js +1 -3
  401. package/removeCookie.d.ts +3 -0
  402. package/removeCookie.esm.js +1 -3
  403. package/removeDuplicates.cjs.js +1 -8
  404. package/removeDuplicates.d.ts +8 -0
  405. package/removeDuplicates.esm.js +1 -8
  406. package/removeDuplicatesByKey.cjs.js +1 -6
  407. package/removeDuplicatesByKey.d.ts +6 -0
  408. package/removeDuplicatesByKey.esm.js +1 -6
  409. package/removeDuplicatesComparing.cjs.js +1 -3
  410. package/removeDuplicatesComparing.d.ts +3 -0
  411. package/removeDuplicatesComparing.esm.js +1 -3
  412. package/removeIndexesFromArray.cjs.js +1 -4
  413. package/removeIndexesFromArray.d.ts +3 -0
  414. package/removeIndexesFromArray.esm.js +1 -4
  415. package/removeTrailingSlash.cjs.js +1 -5
  416. package/removeTrailingSlash.d.ts +5 -0
  417. package/removeTrailingSlash.esm.js +1 -5
  418. package/removeUrlQueryParams.cjs.js +1 -5
  419. package/removeUrlQueryParams.d.ts +5 -0
  420. package/removeUrlQueryParams.esm.js +1 -5
  421. package/render.cjs.js +1 -52
  422. package/render.d.ts +40 -0
  423. package/render.esm.js +1 -52
  424. package/round.cjs.js +1 -11
  425. package/round.d.ts +11 -0
  426. package/round.esm.js +1 -11
  427. package/roundTo.cjs.js +1 -22
  428. package/roundTo.d.ts +6 -0
  429. package/roundTo.esm.js +1 -22
  430. package/serializeCookie.cjs.js +1 -13
  431. package/serializeCookie.d.ts +20 -0
  432. package/serializeCookie.esm.js +1 -13
  433. package/setCookie.cjs.js +1 -10
  434. package/setCookie.d.ts +3 -0
  435. package/setCookie.esm.js +1 -10
  436. package/shuffle.cjs.js +1 -15
  437. package/shuffle.d.ts +15 -0
  438. package/shuffle.esm.js +1 -15
  439. package/slugify.cjs.js +1 -19
  440. package/slugify.d.ts +10 -0
  441. package/slugify.esm.js +1 -19
  442. package/split.cjs.js +1 -6
  443. package/split.d.ts +6 -0
  444. package/split.esm.js +1 -6
  445. package/splitReverse.cjs.js +1 -6
  446. package/splitReverse.d.ts +6 -0
  447. package/splitReverse.esm.js +1 -6
  448. package/swapMap.cjs.js +1 -5
  449. package/swapMap.d.ts +5 -0
  450. package/swapMap.esm.js +1 -5
  451. package/throttle.cjs.js +1 -6
  452. package/throttle.d.ts +6 -0
  453. package/throttle.esm.js +1 -6
  454. package/titleCase.cjs.js +1 -5
  455. package/titleCase.d.ts +5 -0
  456. package/titleCase.esm.js +1 -5
  457. package/toNumber.cjs.js +1 -5
  458. package/toNumber.d.ts +5 -0
  459. package/toNumber.esm.js +1 -5
  460. package/toRgba.cjs.js +1 -5
  461. package/toRgba.d.ts +5 -0
  462. package/toRgba.esm.js +1 -5
  463. package/transformToUrlPathname.cjs.js +1 -9
  464. package/transformToUrlPathname.d.ts +9 -0
  465. package/transformToUrlPathname.esm.js +1 -9
  466. package/truncate.cjs.js +1 -5
  467. package/truncate.d.ts +5 -0
  468. package/truncate.esm.js +1 -5
  469. package/tryUntil.cjs.js +1 -12
  470. package/tryUntil.d.ts +9 -0
  471. package/tryUntil.esm.js +1 -12
  472. package/types.d.ts +27 -0
  473. package/uid.cjs.js +1 -5
  474. package/uid.d.ts +5 -0
  475. package/uid.esm.js +1 -5
  476. package/updateLinkParams.cjs.js +1 -7
  477. package/updateLinkParams.d.ts +7 -0
  478. package/updateLinkParams.esm.js +1 -7
  479. package/updateUrlQueryParams.cjs.js +1 -5
  480. package/updateUrlQueryParams.d.ts +5 -0
  481. package/updateUrlQueryParams.esm.js +1 -5
  482. package/uppercase.cjs.js +1 -6
  483. package/uppercase.d.ts +6 -0
  484. package/uppercase.esm.js +1 -6
  485. package/uuid.cjs.js +1 -6
  486. package/uuid.d.ts +6 -0
  487. package/uuid.esm.js +1 -6
  488. package/uuidNumeric.cjs.js +1 -4
  489. package/uuidNumeric.d.ts +4 -0
  490. package/uuidNumeric.esm.js +1 -4
  491. package/wait.cjs.js +1 -5
  492. package/wait.d.ts +5 -0
  493. package/wait.esm.js +1 -5
package/Defer.cjs.js CHANGED
@@ -2,26 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * @category async
7
- */// PromiseConstructor["resolve"];
8
- // PromiseConstructor["reject"];
9
- // then: Promise<T>["then"];
10
- // finally: Promise<T>["finally"]
11
- /**
12
- * @category async
13
- * @see https://stackoverflow.com/a/37673534/1938970
14
- * @example
15
- *
16
- * ```ts
17
- * const deferred = Defer();
18
- * deferred.resolve();
19
- * deferred.then(handleSuccess, handleError);
20
- * ```
21
- */function Defer(){let e=this||{},t=e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r;});// if (p.finally) {
22
- // self.finally = p.finally.bind(p);
23
- // }
24
- return e.then=t.then.bind(t),e.catch=t.catch.bind(t),e}
5
+ function Defer(){let e=this||{},t=e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r;});return e.then=t.then.bind(t),e.catch=t.catch.bind(t),e}
25
6
 
26
7
  exports.Defer = Defer;
27
8
  exports.default = Defer;
package/Defer.d.ts CHANGED
@@ -1,8 +1,22 @@
1
+ /**
2
+ * @category async
3
+ */
1
4
  export type Deferred<T> = Promise<T> & {
2
5
  resolve: (value: T | PromiseLike<T>) => void;
3
6
  reject: (value: T | PromiseLike<T>) => void;
4
7
  catch: Promise<T>["catch"];
5
8
  };
9
+ /**
10
+ * @category async
11
+ * @see https://stackoverflow.com/a/37673534/1938970
12
+ * @example
13
+ *
14
+ * ```ts
15
+ * const deferred = Defer();
16
+ * deferred.resolve();
17
+ * deferred.then(handleSuccess, handleError);
18
+ * ```
19
+ */
6
20
  export declare function Defer<T>(this: Promise<T> & {
7
21
  promise: Promise<T>;
8
22
  resolve: (value: T | PromiseLike<T>) => void;
package/Defer.esm.js CHANGED
@@ -1,22 +1,3 @@
1
- /**
2
- * @category async
3
- */// PromiseConstructor["resolve"];
4
- // PromiseConstructor["reject"];
5
- // then: Promise<T>["then"];
6
- // finally: Promise<T>["finally"]
7
- /**
8
- * @category async
9
- * @see https://stackoverflow.com/a/37673534/1938970
10
- * @example
11
- *
12
- * ```ts
13
- * const deferred = Defer();
14
- * deferred.resolve();
15
- * deferred.then(handleSuccess, handleError);
16
- * ```
17
- */function Defer(){let e=this||{},t=e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r;});// if (p.finally) {
18
- // self.finally = p.finally.bind(p);
19
- // }
20
- return e.then=t.then.bind(t),e.catch=t.catch.bind(t),e}
1
+ function Defer(){let e=this||{},t=e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r;});return e.then=t.then.bind(t),e.catch=t.catch.bind(t),e}
21
2
 
22
3
  export { Defer, Defer as default };
package/Emitter.cjs.js CHANGED
@@ -2,24 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * Emitter super simple class
7
- *
8
- * Events will be prefixed with the given `namespace` plus a `.` so:
9
- * `{namespace}.myevent`
10
- *
11
- * Adapted from https://github.com/developit/mitt
12
- *
13
- * Regarding typescript support see:
14
- * - https://stackoverflow.com/q/53299743/1938970
15
- * - https://github.com/Microsoft/TypeScript/pull/26349
16
- *
17
- * @category impl
18
- */let Emitter=t=>{let e=new Map;return {/**
19
- * Register an event handler for the given type.
20
- */on(r,i){let n=e.get(`${t}.${String(r)}`);n&&n.push(i)||e.set(`${t}.${String(r)}`,[i]);},/**
21
- * Invoke all handlers for the given type.
22
- */emit(r,i){(e.get(`${t}.${String(r)}`)||[]).slice().forEach(t=>{t(i);});}}};
5
+ let Emitter=t=>{let e=new Map;return {on(r,i){let n=e.get(`${t}.${String(r)}`);n&&n.push(i)||e.set(`${t}.${String(r)}`,[i]);},emit(r,i){(e.get(`${t}.${String(r)}`)||[]).slice().forEach(t=>{t(i);});}}};
23
6
 
24
7
  exports.Emitter = Emitter;
25
8
  exports.default = Emitter;
package/Emitter.d.ts CHANGED
@@ -1,7 +1,27 @@
1
+ /**
2
+ * Emitter super simple class
3
+ *
4
+ * Events will be prefixed with the given `namespace` plus a `.` so:
5
+ * `{namespace}.myevent`
6
+ *
7
+ * Adapted from https://github.com/developit/mitt
8
+ *
9
+ * Regarding typescript support see:
10
+ * - https://stackoverflow.com/q/53299743/1938970
11
+ * - https://github.com/Microsoft/TypeScript/pull/26349
12
+ *
13
+ * @category impl
14
+ */
1
15
  export declare let Emitter: <EventMap extends {
2
16
  [key: string]: any;
3
17
  }>(namespace: string) => {
18
+ /**
19
+ * Register an event handler for the given type.
20
+ */
4
21
  on<EventName extends keyof EventMap>(name: EventName, handler: (data?: EventMap[EventName]) => any): void;
22
+ /**
23
+ * Invoke all handlers for the given type.
24
+ */
5
25
  emit<EventName extends keyof EventMap>(name: EventName, data?: EventMap[EventName]): void;
6
26
  };
7
27
  export default Emitter;
package/Emitter.esm.js CHANGED
@@ -1,20 +1,3 @@
1
- /**
2
- * Emitter super simple class
3
- *
4
- * Events will be prefixed with the given `namespace` plus a `.` so:
5
- * `{namespace}.myevent`
6
- *
7
- * Adapted from https://github.com/developit/mitt
8
- *
9
- * Regarding typescript support see:
10
- * - https://stackoverflow.com/q/53299743/1938970
11
- * - https://github.com/Microsoft/TypeScript/pull/26349
12
- *
13
- * @category impl
14
- */let Emitter=t=>{let e=new Map;return {/**
15
- * Register an event handler for the given type.
16
- */on(r,i){let n=e.get(`${t}.${String(r)}`);n&&n.push(i)||e.set(`${t}.${String(r)}`,[i]);},/**
17
- * Invoke all handlers for the given type.
18
- */emit(r,i){(e.get(`${t}.${String(r)}`)||[]).slice().forEach(t=>{t(i);});}}};
1
+ let Emitter=t=>{let e=new Map;return {on(r,i){let n=e.get(`${t}.${String(r)}`);n&&n.push(i)||e.set(`${t}.${String(r)}`,[i]);},emit(r,i){(e.get(`${t}.${String(r)}`)||[]).slice().forEach(t=>{t(i);});}}};
19
2
 
20
3
  export { Emitter, Emitter as default };
@@ -2,19 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * First value is the `to`, second is `from`, from *which* chars do we translates *to*
7
- *
8
- * @category text
9
- *//**
10
- * Accent sets
11
- *
12
- * @category text
13
- * @resources
14
- * - https://gist.github.com/mathewbyrne/1280286#gistcomment-3498021
15
- * - https://gist.github.com/eek/9c4887e80b3ede05c0e39fee4dce3747 for usage
16
- * of [normalize](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
17
- */let accentsSets=[["a","ÀÁÂÃÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶ"],["ae","Ä"],["c","ÇĆĈČ"],["d","ÐĎĐÞ"],["e","ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ"],["g","ĜĞĢǴ"],["h","ĤḦ"],["i","ÌÍÎÏĨĪĮİỈỊ"],["j","Ĵ"],["ij","IJ"],["k","Ķ"],["l","ĹĻĽŁ"],["m","Ḿ"],["n","ÑŃŅŇ"],["o","ÒÓÔÕØŌŎŐỌỎỐỒỔỖỘỚỜỞỠỢǪǬƠ"],["oe","ŒÖ"],["p","ṕ"],["r","ŔŖŘ"],["s","ŚŜŞŠ"],["ss","ß"],["t","ŢŤ"],["u","ÙÚÛŨŪŬŮŰŲỤỦỨỪỬỮỰƯ"],["ue","Ü"],["w","ẂŴẀẄ"],["x","ẍ"],["y","ÝŶŸỲỴỶỸ"],["z","ŹŻŽ"]];
5
+ let accentsSets=[["a","ÀÁÂÃÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶ"],["ae","Ä"],["c","ÇĆĈČ"],["d","ÐĎĐÞ"],["e","ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ"],["g","ĜĞĢǴ"],["h","ĤḦ"],["i","ÌÍÎÏĨĪĮİỈỊ"],["j","Ĵ"],["ij","IJ"],["k","Ķ"],["l","ĹĻĽŁ"],["m","Ḿ"],["n","ÑŃŅŇ"],["o","ÒÓÔÕØŌŎŐỌỎỐỒỔỖỘỚỜỞỠỢǪǬƠ"],["oe","ŒÖ"],["p","ṕ"],["r","ŔŖŘ"],["s","ŚŜŞŠ"],["ss","ß"],["t","ŢŤ"],["u","ÙÚÛŨŪŬŮŰŲỤỦỨỪỬỮỰƯ"],["ue","Ü"],["w","ẂŴẀẄ"],["x","ẍ"],["y","ÝŶŸỲỴỶỸ"],["z","ŹŻŽ"]];
18
6
 
19
7
  exports.accentsSets = accentsSets;
20
8
  exports.default = accentsSets;
package/accentsSets.d.ts CHANGED
@@ -1,3 +1,17 @@
1
+ /**
2
+ * First value is the `to`, second is `from`, from *which* chars do we translates *to*
3
+ *
4
+ * @category text
5
+ */
1
6
  export type AccentsSet = [string, string];
7
+ /**
8
+ * Accent sets
9
+ *
10
+ * @category text
11
+ * @resources
12
+ * - https://gist.github.com/mathewbyrne/1280286#gistcomment-3498021
13
+ * - https://gist.github.com/eek/9c4887e80b3ede05c0e39fee4dce3747 for usage
14
+ * of [normalize](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
15
+ */
2
16
  export declare let accentsSets: AccentsSet[];
3
17
  export default accentsSets;
@@ -1,15 +1,3 @@
1
- /**
2
- * First value is the `to`, second is `from`, from *which* chars do we translates *to*
3
- *
4
- * @category text
5
- *//**
6
- * Accent sets
7
- *
8
- * @category text
9
- * @resources
10
- * - https://gist.github.com/mathewbyrne/1280286#gistcomment-3498021
11
- * - https://gist.github.com/eek/9c4887e80b3ede05c0e39fee4dce3747 for usage
12
- * of [normalize](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
13
- */let accentsSets=[["a","ÀÁÂÃÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶ"],["ae","Ä"],["c","ÇĆĈČ"],["d","ÐĎĐÞ"],["e","ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ"],["g","ĜĞĢǴ"],["h","ĤḦ"],["i","ÌÍÎÏĨĪĮİỈỊ"],["j","Ĵ"],["ij","IJ"],["k","Ķ"],["l","ĹĻĽŁ"],["m","Ḿ"],["n","ÑŃŅŇ"],["o","ÒÓÔÕØŌŎŐỌỎỐỒỔỖỘỚỜỞỠỢǪǬƠ"],["oe","ŒÖ"],["p","ṕ"],["r","ŔŖŘ"],["s","ŚŜŞŠ"],["ss","ß"],["t","ŢŤ"],["u","ÙÚÛŨŪŬŮŰŲỤỦỨỪỬỮỰƯ"],["ue","Ü"],["w","ẂŴẀẄ"],["x","ẍ"],["y","ÝŶŸỲỴỶỸ"],["z","ŹŻŽ"]];
1
+ let accentsSets=[["a","ÀÁÂÃÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶ"],["ae","Ä"],["c","ÇĆĈČ"],["d","ÐĎĐÞ"],["e","ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ"],["g","ĜĞĢǴ"],["h","ĤḦ"],["i","ÌÍÎÏĨĪĮİỈỊ"],["j","Ĵ"],["ij","IJ"],["k","Ķ"],["l","ĹĻĽŁ"],["m","Ḿ"],["n","ÑŃŅŇ"],["o","ÒÓÔÕØŌŎŐỌỎỐỒỔỖỘỚỜỞỠỢǪǬƠ"],["oe","ŒÖ"],["p","ṕ"],["r","ŔŖŘ"],["s","ŚŜŞŠ"],["ss","ß"],["t","ŢŤ"],["u","ÙÚÛŨŪŬŮŰŲỤỦỨỪỬỮỰƯ"],["ue","Ü"],["w","ẂŴẀẄ"],["x","ẍ"],["y","ÝŶŸỲỴỶỸ"],["z","ŹŻŽ"]];
14
2
 
15
3
  export { accentsSets, accentsSets as default };
@@ -2,13 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * Add or replace an item in the given array, it returns a new array (immutable).
7
- * Typescript wise this is meant to keep the same type on the newly returned
8
- * array, therefore the `newItem` must match the type of the `list` items.
9
- *
10
- * @category array
11
- */let addOrReplaceAtIdx=(e,d,t)=>0===e.length?[d]:void 0===t||e.length-1<t?[...e,d]:e.map((e,a)=>a===t?d:e);
5
+ let addOrReplaceAtIdx=(e,d,t)=>0===e.length?[d]:void 0===t||e.length-1<t?[...e,d]:e.map((e,a)=>a===t?d:e);
12
6
 
13
7
  exports.addOrReplaceAtIdx = addOrReplaceAtIdx;
14
8
  exports.default = addOrReplaceAtIdx;
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Add or replace an item in the given array, it returns a new array (immutable).
3
+ * Typescript wise this is meant to keep the same type on the newly returned
4
+ * array, therefore the `newItem` must match the type of the `list` items.
5
+ *
6
+ * @category array
7
+ */
1
8
  export declare let addOrReplaceAtIdx: <T>(list: T[], newItem: T, newIdx?: number) => T[];
2
9
  export default addOrReplaceAtIdx;
@@ -1,9 +1,3 @@
1
- /**
2
- * Add or replace an item in the given array, it returns a new array (immutable).
3
- * Typescript wise this is meant to keep the same type on the newly returned
4
- * array, therefore the `newItem` must match the type of the `list` items.
5
- *
6
- * @category array
7
- */let addOrReplaceAtIdx=(e,d,t)=>0===e.length?[d]:void 0===t||e.length-1<t?[...e,d]:e.map((e,a)=>a===t?d:e);
1
+ let addOrReplaceAtIdx=(e,d,t)=>0===e.length?[d]:void 0===t||e.length-1<t?[...e,d]:e.map((e,a)=>a===t?d:e);
8
2
 
9
3
  export { addOrReplaceAtIdx, addOrReplaceAtIdx as default };
package/areEqual.cjs.js CHANGED
@@ -5,34 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var isArray = require('./isArray.cjs.js');
6
6
  var isObject = require('./isObject.cjs.js');
7
7
 
8
- /**
9
- */let t=(r,e)=>{if(!e||r.length!==e.length)return !1;for(let t=0;t<r.length;t++)if(!areEqual(r[t],e[t]))return !1;return !0},/**
10
- * NOTE: Since we do not care about `undefined` values we do not check for equal
11
- * `Object.keys().length` equality
12
- */u=(r,e)=>{if(!e)return !1;// const bKeys = Object.keys(b);
13
- // if (aKeys.length !== bKeys.length) {
14
- // return false;
15
- // }
16
- for(let t of Object.keys(r))if(!areEqual(r[t],e[t]))return !1;return !0};/**
17
- * A simple and quick deep equal objects utility. This is meant to be used
18
- * solely to deduplicate requests payload and perform comparison on JSON ready
19
- * objects made of primitives `string`, `number` and `boolean`s.
20
- *
21
- * It support nested `object`s and `array`s only.
22
- *
23
- * NB: `undefined` and `null` values do not count in the comparison as they are
24
- * usually meant to be ignored in JSON requestBody payloads.
25
- *
26
- * According to very rudimentary tests this function takes on average between
27
- * 0.15 ms and 2ms to compare two averaged sizes requet body payloads.
28
- *
29
- * @category object
30
- */let areEqual=(l,f)=>{if(!l&&!f)// console.log(`areEqual took ${performance.now() - t0} ms`);
31
- return !0;// const t0 = performance.now();
32
- if(!f&&l!==f)// console.log(`areEqual took ${performance.now() - t0} ms`);
33
- return !1;let n=isObject.isObject(l)&&isObject.isObject(f);if(n&&!u(l,f))// console.log(`areEqual took ${performance.now() - t0} ms`);
34
- return !1;let i=isArray.isArray(l)&&isArray.isArray(f);return !!(!i||t(l,f))&&// console.log(`areEqual took ${performance.now() - t0} ms`);
35
- (!!n||!!i||l===f)};// console.log(`areEqual took ${performance.now() - t0} ms`);
8
+ let t=(r,e)=>{if(!e||r.length!==e.length)return !1;for(let t=0;t<r.length;t++)if(!areEqual(r[t],e[t]))return !1;return !0},u=(r,e)=>{if(!e)return !1;for(let t of Object.keys(r))if(!areEqual(r[t],e[t]))return !1;return !0};let areEqual=(l,f)=>{if(!l&&!f)return !0;if(!f&&l!==f)return !1;let n=isObject.isObject(l)&&isObject.isObject(f);if(n&&!u(l,f))return !1;let i=isArray.isArray(l)&&isArray.isArray(f);return !!(!i||t(l,f))&&(!!n||!!i||l===f)};
36
9
 
37
10
  exports.areEqual = areEqual;
38
11
  exports.default = areEqual;
package/areEqual.d.ts CHANGED
@@ -1,4 +1,19 @@
1
1
  type ComparablePrimitive = string | number | boolean;
2
2
  type Comparable = ComparablePrimitive | object | Record<string, ComparablePrimitive> | Array<ComparablePrimitive>;
3
+ /**
4
+ * A simple and quick deep equal objects utility. This is meant to be used
5
+ * solely to deduplicate requests payload and perform comparison on JSON ready
6
+ * objects made of primitives `string`, `number` and `boolean`s.
7
+ *
8
+ * It support nested `object`s and `array`s only.
9
+ *
10
+ * NB: `undefined` and `null` values do not count in the comparison as they are
11
+ * usually meant to be ignored in JSON requestBody payloads.
12
+ *
13
+ * According to very rudimentary tests this function takes on average between
14
+ * 0.15 ms and 2ms to compare two averaged sizes requet body payloads.
15
+ *
16
+ * @category object
17
+ */
3
18
  export declare let areEqual: (a: Comparable, b?: Comparable) => boolean;
4
19
  export default areEqual;
package/areEqual.esm.js CHANGED
@@ -1,33 +1,6 @@
1
1
  import { isArray } from './isArray.esm.js';
2
2
  import { isObject } from './isObject.esm.js';
3
3
 
4
- /**
5
- */let t=(r,e)=>{if(!e||r.length!==e.length)return !1;for(let t=0;t<r.length;t++)if(!areEqual(r[t],e[t]))return !1;return !0},/**
6
- * NOTE: Since we do not care about `undefined` values we do not check for equal
7
- * `Object.keys().length` equality
8
- */u=(r,e)=>{if(!e)return !1;// const bKeys = Object.keys(b);
9
- // if (aKeys.length !== bKeys.length) {
10
- // return false;
11
- // }
12
- for(let t of Object.keys(r))if(!areEqual(r[t],e[t]))return !1;return !0};/**
13
- * A simple and quick deep equal objects utility. This is meant to be used
14
- * solely to deduplicate requests payload and perform comparison on JSON ready
15
- * objects made of primitives `string`, `number` and `boolean`s.
16
- *
17
- * It support nested `object`s and `array`s only.
18
- *
19
- * NB: `undefined` and `null` values do not count in the comparison as they are
20
- * usually meant to be ignored in JSON requestBody payloads.
21
- *
22
- * According to very rudimentary tests this function takes on average between
23
- * 0.15 ms and 2ms to compare two averaged sizes requet body payloads.
24
- *
25
- * @category object
26
- */let areEqual=(l,f)=>{if(!l&&!f)// console.log(`areEqual took ${performance.now() - t0} ms`);
27
- return !0;// const t0 = performance.now();
28
- if(!f&&l!==f)// console.log(`areEqual took ${performance.now() - t0} ms`);
29
- return !1;let n=isObject(l)&&isObject(f);if(n&&!u(l,f))// console.log(`areEqual took ${performance.now() - t0} ms`);
30
- return !1;let i=isArray(l)&&isArray(f);return !!(!i||t(l,f))&&// console.log(`areEqual took ${performance.now() - t0} ms`);
31
- (!!n||!!i||l===f)};// console.log(`areEqual took ${performance.now() - t0} ms`);
4
+ let t=(r,e)=>{if(!e||r.length!==e.length)return !1;for(let t=0;t<r.length;t++)if(!areEqual(r[t],e[t]))return !1;return !0},u=(r,e)=>{if(!e)return !1;for(let t of Object.keys(r))if(!areEqual(r[t],e[t]))return !1;return !0};let areEqual=(l,f)=>{if(!l&&!f)return !0;if(!f&&l!==f)return !1;let n=isObject(l)&&isObject(f);if(n&&!u(l,f))return !1;let i=isArray(l)&&isArray(f);return !!(!i||t(l,f))&&(!!n||!!i||l===f)};
32
5
 
33
6
  export { areEqual, areEqual as default };
@@ -2,12 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * Given a list it returns it filtered without any falsy values (`null`,
7
- * `undefined`, `false`, `0`, `""`). It "adjusts" the returned type as well.
8
- *
9
- * @category array
10
- */let arrayFilterFalsy=r=>r?r.filter(r=>!!r):[];
5
+ let arrayFilterFalsy=r=>r?r.filter(r=>!!r):[];
11
6
 
12
7
  exports.arrayFilterFalsy = arrayFilterFalsy;
13
8
  exports.default = arrayFilterFalsy;
@@ -1,2 +1,8 @@
1
+ /**
2
+ * Given a list it returns it filtered without any falsy values (`null`,
3
+ * `undefined`, `false`, `0`, `""`). It "adjusts" the returned type as well.
4
+ *
5
+ * @category array
6
+ */
1
7
  export declare let arrayFilterFalsy: <T extends unknown[]>(list?: null | T) => Exclude<NonNullable<T>[number], undefined | false | 0 | "">[];
2
8
  export default arrayFilterFalsy;
@@ -1,8 +1,3 @@
1
- /**
2
- * Given a list it returns it filtered without any falsy values (`null`,
3
- * `undefined`, `false`, `0`, `""`). It "adjusts" the returned type as well.
4
- *
5
- * @category array
6
- */let arrayFilterFalsy=r=>r?r.filter(r=>!!r):[];
1
+ let arrayFilterFalsy=r=>r?r.filter(r=>!!r):[];
7
2
 
8
3
  export { arrayFilterFalsy, arrayFilterFalsy as default };
@@ -2,19 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * Returns the index of the last element in the array where predicate is true, and -1
7
- * otherwise.
8
- *
9
- * @borrows [SO's answer by Nico Timmerman](https://stackoverflow.com/a/53187807/1938970)
10
- *
11
- * @category array
12
- *
13
- * @param array The source array to search in
14
- * @param predicate find calls predicate once for each element of the array, in descending
15
- * order, until it finds one where predicate returns true. If such an element is found,
16
- * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
17
- */let arrayFindLastIndex=(r,e)=>{let t=r.length;for(;t--;)if(e(r[t],t,r))return t;return -1};
5
+ let arrayFindLastIndex=(r,e)=>{let t=r.length;for(;t--;)if(e(r[t],t,r))return t;return -1};
18
6
 
19
7
  exports.arrayFindLastIndex = arrayFindLastIndex;
20
8
  exports.default = arrayFindLastIndex;
@@ -1,2 +1,15 @@
1
+ /**
2
+ * Returns the index of the last element in the array where predicate is true, and -1
3
+ * otherwise.
4
+ *
5
+ * @borrows [SO's answer by Nico Timmerman](https://stackoverflow.com/a/53187807/1938970)
6
+ *
7
+ * @category array
8
+ *
9
+ * @param array The source array to search in
10
+ * @param predicate find calls predicate once for each element of the array, in descending
11
+ * order, until it finds one where predicate returns true. If such an element is found,
12
+ * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
13
+ */
1
14
  export declare let arrayFindLastIndex: <T>(array: Array<T>, predicate: (value: T, index: number, obj: T[]) => boolean) => number;
2
15
  export default arrayFindLastIndex;
@@ -1,15 +1,3 @@
1
- /**
2
- * Returns the index of the last element in the array where predicate is true, and -1
3
- * otherwise.
4
- *
5
- * @borrows [SO's answer by Nico Timmerman](https://stackoverflow.com/a/53187807/1938970)
6
- *
7
- * @category array
8
- *
9
- * @param array The source array to search in
10
- * @param predicate find calls predicate once for each element of the array, in descending
11
- * order, until it finds one where predicate returns true. If such an element is found,
12
- * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
13
- */let arrayFindLastIndex=(r,e)=>{let t=r.length;for(;t--;)if(e(r[t],t,r))return t;return -1};
1
+ let arrayFindLastIndex=(r,e)=>{let t=r.length;for(;t--;)if(e(r[t],t,r))return t;return -1};
14
2
 
15
3
  export { arrayFindLastIndex, arrayFindLastIndex as default };
package/arrayOfAll.cjs.js CHANGED
@@ -2,22 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * Ensure an array contains all desired values
7
- *
8
- * @category array
9
- * @borrows [SO comment by `CertainPerformance`](https://stackoverflow.com/a/60132060/1938970)
10
- *
11
- * @usage
12
- * ```ts
13
- * type Fruit = "pear" | "apple" | "orange";
14
- *
15
- * const arrayOfAllFruits = arrayOfAll<Fruit>();
16
- *
17
- * const allFruits = arrayOfAllFruits([ "pear", "apple", "orange" ]); // ts compiler ok
18
- * const allFruits = arrayOfAllFruits([ "pear", "apple" ]); // ts compiler fails
19
- * ```
20
- */let arrayOfAll=()=>l=>l;
5
+ let arrayOfAll=()=>l=>l;
21
6
 
22
7
  exports.arrayOfAll = arrayOfAll;
23
8
  exports.default = arrayOfAll;
package/arrayOfAll.d.ts CHANGED
@@ -1,3 +1,25 @@
1
+ /**
2
+ * Ensure an array contains all desired values
3
+ *
4
+ * @category array
5
+ * @borrows [SO comment by `CertainPerformance`](https://stackoverflow.com/a/60132060/1938970)
6
+ *
7
+ * @usage
8
+ * ```ts
9
+ * type Fruit = "pear" | "apple" | "orange";
10
+ *
11
+ * const arrayOfAllFruits = arrayOfAll<Fruit>();
12
+ *
13
+ * const allFruits = arrayOfAllFruits([ "pear", "apple", "orange" ]); // ts compiler ok
14
+ * const allFruits = arrayOfAllFruits([ "pear", "apple" ]); // ts compiler fails
15
+ * ```
16
+ */
1
17
  export declare let arrayOfAll: <T>() => <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : "Invalid")) => U & ([T] extends [U[number]] ? unknown : "Invalid");
18
+ /**
19
+ * @usage
20
+ * ```ts
21
+ * type Check_AreAllListed = AssertTrue<ArrayOfAll<typeof myList, MyUnion>>;
22
+ * ```
23
+ */
2
24
  export type ArrayOfAll<List extends unknown[], Union> = List[number] extends Union ? Union extends List[number] ? true : "Incomplete" : "Incomplete";
3
25
  export default arrayOfAll;
package/arrayOfAll.esm.js CHANGED
@@ -1,18 +1,3 @@
1
- /**
2
- * Ensure an array contains all desired values
3
- *
4
- * @category array
5
- * @borrows [SO comment by `CertainPerformance`](https://stackoverflow.com/a/60132060/1938970)
6
- *
7
- * @usage
8
- * ```ts
9
- * type Fruit = "pear" | "apple" | "orange";
10
- *
11
- * const arrayOfAllFruits = arrayOfAll<Fruit>();
12
- *
13
- * const allFruits = arrayOfAllFruits([ "pear", "apple", "orange" ]); // ts compiler ok
14
- * const allFruits = arrayOfAllFruits([ "pear", "apple" ]); // ts compiler fails
15
- * ```
16
- */let arrayOfAll=()=>l=>l;
1
+ let arrayOfAll=()=>l=>l;
17
2
 
18
3
  export { arrayOfAll, arrayOfAll as default };
package/arraySum.cjs.js CHANGED
@@ -2,12 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * Sum array of numbers
7
- *
8
- * @category array
9
- * @category math
10
- */let arraySum=r=>r.reduce((r,e)=>r+e,0);
5
+ let arraySum=r=>r.reduce((r,e)=>r+e,0);
11
6
 
12
7
  exports.arraySum = arraySum;
13
8
  exports.default = arraySum;
package/arraySum.d.ts CHANGED
@@ -1,2 +1,8 @@
1
+ /**
2
+ * Sum array of numbers
3
+ *
4
+ * @category array
5
+ * @category math
6
+ */
1
7
  export declare let arraySum: (numbers: number[]) => number;
2
8
  export default arraySum;
package/arraySum.esm.js CHANGED
@@ -1,8 +1,3 @@
1
- /**
2
- * Sum array of numbers
3
- *
4
- * @category array
5
- * @category math
6
- */let arraySum=r=>r.reduce((r,e)=>r+e,0);
1
+ let arraySum=r=>r.reduce((r,e)=>r+e,0);
7
2
 
8
3
  export { arraySum, arraySum as default };
@@ -2,11 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * Maps a simple flat array to a lookup dictionary object
7
- *
8
- * @category array
9
- */let arrayToLookup=(o=[])=>o.reduce((o,r)=>(o[r]=1,o),{});
5
+ let arrayToLookup=(o=[])=>o.reduce((o,r)=>(o[r]=1,o),{});
10
6
 
11
7
  exports.arrayToLookup = arrayToLookup;
12
8
  exports.default = arrayToLookup;
@@ -1,2 +1,7 @@
1
+ /**
2
+ * Maps a simple flat array to a lookup dictionary object
3
+ *
4
+ * @category array
5
+ */
1
6
  export declare let arrayToLookup: <T extends string | number | symbol>(array?: T[]) => Record<T, 1>;
2
7
  export default arrayToLookup;
@@ -1,7 +1,3 @@
1
- /**
2
- * Maps a simple flat array to a lookup dictionary object
3
- *
4
- * @category array
5
- */let arrayToLookup=(o=[])=>o.reduce((o,r)=>(o[r]=1,o),{});
1
+ let arrayToLookup=(o=[])=>o.reduce((o,r)=>(o[r]=1,o),{});
6
2
 
7
3
  export { arrayToLookup, arrayToLookup as default };
@@ -2,14 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /**
6
- * @borrows [SO answer](https://stackoverflow.com/a/56757215/1938970)
7
- *
8
- * @category array
9
- * @param array The array to filter
10
- * @param keys The keys to compare in each array item
11
- * @returns The filtered array
12
- */let arrayUniqueByProperties=(e,r)=>e.filter((e,t,i)=>i.findIndex(t=>r.every(r=>t[r]===e[r]))===t);
5
+ let arrayUniqueByProperties=(e,r)=>e.filter((e,t,i)=>i.findIndex(t=>r.every(r=>t[r]===e[r]))===t);
13
6
 
14
7
  exports.arrayUniqueByProperties = arrayUniqueByProperties;
15
8
  exports.default = arrayUniqueByProperties;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * @borrows [SO answer](https://stackoverflow.com/a/56757215/1938970)
3
+ *
4
+ * @category array
5
+ * @param array The array to filter
6
+ * @param keys The keys to compare in each array item
7
+ * @returns The filtered array
8
+ */
1
9
  export declare let arrayUniqueByProperties: <T extends any[]>(array: T, keys: (keyof T[number])[]) => T;
2
10
  export default arrayUniqueByProperties;
@@ -1,10 +1,3 @@
1
- /**
2
- * @borrows [SO answer](https://stackoverflow.com/a/56757215/1938970)
3
- *
4
- * @category array
5
- * @param array The array to filter
6
- * @param keys The keys to compare in each array item
7
- * @returns The filtered array
8
- */let arrayUniqueByProperties=(e,r)=>e.filter((e,t,i)=>i.findIndex(t=>r.every(r=>t[r]===e[r]))===t);
1
+ let arrayUniqueByProperties=(e,r)=>e.filter((e,t,i)=>i.findIndex(t=>r.every(r=>t[r]===e[r]))===t);
9
2
 
10
3
  export { arrayUniqueByProperties, arrayUniqueByProperties as default };
@@ -6,16 +6,7 @@ var isArray = require('./isArray.cjs.js');
6
6
  var isNull = require('./isNull.cjs.js');
7
7
  var isUndefined = require('./isUndefined.cjs.js');
8
8
 
9
- /**
10
- * Get clean query string for URL
11
- *
12
- * It returns the query string **with** the initial `?`
13
- *
14
- * TODO: at some point replace with `URLSearchParams`, @see [caniuse](https://caniuse.com/?search=URLSearchParams)
15
- *
16
- * @category location
17
- */let buildUrlQueryString=o=>{let l="";if(!o)return l;for(let i in o){let n=o[i];if(isArray.isArray(n))for(let e=0;e<n.length;e++)l+=`${i}=${encodeURIComponent(n[e]+"")}&`;else isNull.isNull(n)||isUndefined.isUndefined(n)||(l+=`${i}=${encodeURIComponent(n+"")}&`);}// removes the last &
18
- return l?`?${l.replace(/&+$/,"")}`:""};
9
+ let buildUrlQueryString=o=>{let l="";if(!o)return l;for(let i in o){let n=o[i];if(isArray.isArray(n))for(let e=0;e<n.length;e++)l+=`${i}=${encodeURIComponent(n[e]+"")}&`;else isNull.isNull(n)||isUndefined.isUndefined(n)||(l+=`${i}=${encodeURIComponent(n+"")}&`);}return l?`?${l.replace(/&+$/,"")}`:""};
19
10
 
20
11
  exports.buildUrlQueryString = buildUrlQueryString;
21
12
  exports.default = buildUrlQueryString;