@koine/utils 2.0.0-beta.7 → 2.0.0-beta.71

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 (456) hide show
  1. package/Defer.d.ts +0 -15
  2. package/Emitter.d.ts +2 -21
  3. package/README.md +4 -2
  4. package/accentSets.d.ts +1 -15
  5. package/addOrReplaceAtIdx.d.ts +1 -5
  6. package/areEqual.d.ts +2 -17
  7. package/arrayFilterFalsy.d.ts +1 -0
  8. package/arrayFindLastIndex.d.ts +1 -0
  9. package/arrayOfAll.d.ts +2 -28
  10. package/arraySum.d.ts +1 -7
  11. package/arrayToLookup.d.ts +1 -7
  12. package/arrayUniqueByProperties.d.ts +1 -0
  13. package/buildUrlQueryString.d.ts +2 -12
  14. package/capitalize.d.ts +1 -8
  15. package/changeCaseCamel.d.ts +2 -0
  16. package/changeCaseCapital.d.ts +2 -0
  17. package/changeCaseConstant.d.ts +2 -0
  18. package/changeCaseDot.d.ts +2 -0
  19. package/changeCaseHelpers.d.ts +19 -0
  20. package/changeCaseKebab.d.ts +2 -0
  21. package/changeCaseNone.d.ts +2 -0
  22. package/changeCasePascal.d.ts +2 -0
  23. package/changeCasePascalSnake.d.ts +2 -0
  24. package/changeCasePath.d.ts +2 -0
  25. package/changeCaseSentence.d.ts +2 -0
  26. package/changeCaseSnake.d.ts +2 -0
  27. package/changeCaseTrain.d.ts +2 -0
  28. package/chunkByChunks.d.ts +1 -7
  29. package/chunkBySize.d.ts +1 -6
  30. package/clamp.d.ts +1 -8
  31. package/clsx.d.ts +6 -9
  32. package/convertRange.d.ts +1 -14
  33. package/cookie.d.ts +1 -37
  34. package/createPalette.d.ts +2 -12
  35. package/debounce.d.ts +1 -8
  36. package/debouncePromise.d.ts +10 -11
  37. package/debounceRaf.d.ts +0 -8
  38. package/decode.d.ts +1 -6
  39. package/encode.d.ts +1 -6
  40. package/ensureInt.d.ts +1 -7
  41. package/env.d.ts +0 -0
  42. package/errorToString.d.ts +1 -7
  43. package/escapeRegExp.d.ts +1 -0
  44. package/findDuplicatedIndexes.d.ts +1 -5
  45. package/forin.d.ts +1 -7
  46. package/gbToBytes.d.ts +1 -7
  47. package/getEmptyArray.d.ts +1 -9
  48. package/getKeys.d.ts +1 -9
  49. package/getMediaQueryWidthResolvers.d.ts +1 -2
  50. package/getMediaQueryWidthTailwindScreens.d.ts +1 -2
  51. package/getNonce.d.ts +1 -6
  52. package/getParamAmong.d.ts +1 -12
  53. package/getParamAsInt.d.ts +1 -12
  54. package/getParamAsString.d.ts +1 -11
  55. package/getType.d.ts +4 -17
  56. package/getUrlHashParams.d.ts +1 -9
  57. package/getUrlHashPathname.d.ts +1 -9
  58. package/getUrlPathnameParts.d.ts +1 -12
  59. package/getUrlQueryParams.d.ts +1 -14
  60. package/imgEmptyPixel.d.ts +1 -7
  61. package/index.cjs.d.ts +1 -0
  62. package/index.cjs.default.js +1 -0
  63. package/index.cjs.js +497 -0
  64. package/index.cjs.mjs +2 -0
  65. package/index.d.ts +30 -6
  66. package/index.esm.js +340 -0
  67. package/invariant.d.ts +1 -19
  68. package/isAbsoluteUrl.d.ts +1 -0
  69. package/isAnyObject.d.ts +2 -8
  70. package/isArray.d.ts +1 -7
  71. package/isBlob.d.ts +1 -7
  72. package/isBoolean.d.ts +1 -7
  73. package/isBrowser.d.ts +1 -6
  74. package/isBrowserNow.d.ts +1 -6
  75. package/isDate.d.ts +1 -7
  76. package/isEmptyArray.d.ts +1 -7
  77. package/isEmptyObject.d.ts +4 -8
  78. package/isEmptyString.d.ts +1 -7
  79. package/isError.d.ts +1 -7
  80. package/isExternalUrl.d.ts +1 -9
  81. package/isFile.d.ts +1 -7
  82. package/isFloat.d.ts +1 -7
  83. package/isFormData.d.ts +1 -7
  84. package/isFullArray.d.ts +1 -7
  85. package/isFullObject.d.ts +2 -8
  86. package/isFullString.d.ts +1 -7
  87. package/isFunction.d.ts +2 -8
  88. package/isInt.d.ts +1 -7
  89. package/isMap.d.ts +1 -7
  90. package/isNaNValue.d.ts +1 -7
  91. package/isNegativeNumber.d.ts +1 -7
  92. package/isNull.d.ts +1 -7
  93. package/isNullOrUndefined.d.ts +1 -7
  94. package/isNumber.d.ts +1 -9
  95. package/isNumericLiteral.d.ts +1 -0
  96. package/isObject.d.ts +2 -8
  97. package/isObjectLike.d.ts +2 -10
  98. package/isObjectStringKeyed.d.ts +2 -0
  99. package/isOneOf.d.ts +1 -5
  100. package/isPlainObject.d.ts +2 -8
  101. package/isPositiveNumber.d.ts +1 -7
  102. package/isPrimitive.d.ts +1 -7
  103. package/isPromise.d.ts +1 -7
  104. package/isRegExp.d.ts +1 -7
  105. package/isServer.d.ts +1 -6
  106. package/isServerNow.d.ts +1 -6
  107. package/isSet.d.ts +1 -7
  108. package/isString.d.ts +1 -7
  109. package/isSymbol.d.ts +1 -7
  110. package/isType.d.ts +2 -11
  111. package/isUndefined.d.ts +1 -7
  112. package/isWeakMap.d.ts +1 -7
  113. package/isWeakSet.d.ts +1 -7
  114. package/kbToBytes.d.ts +1 -7
  115. package/location.d.ts +0 -3
  116. package/lowercase.d.ts +1 -7
  117. package/mapListBy.d.ts +1 -7
  118. package/matchSorter.d.ts +2 -10
  119. package/mbToBytes.d.ts +1 -7
  120. package/mergeObjects.d.ts +1 -7
  121. package/mergeUrlQueryParams.d.ts +2 -9
  122. package/moveSortableArrayItemByKey.d.ts +1 -9
  123. package/noop.d.ts +1 -7
  124. package/normaliseUrl.d.ts +1 -11
  125. package/normaliseUrlPathname.d.ts +1 -10
  126. package/objectFlat.d.ts +3 -0
  127. package/objectFlip.d.ts +1 -0
  128. package/objectMergeWithDefaults.d.ts +5 -0
  129. package/objectOmit.d.ts +1 -11
  130. package/objectPick.d.ts +1 -8
  131. package/objectSort.d.ts +3 -0
  132. package/objectSortByKeysMatching.d.ts +3 -0
  133. package/objectToArray.d.ts +1 -0
  134. package/package.json +15 -7
  135. package/parseCookie.d.ts +2 -11
  136. package/parseURL.d.ts +1 -8
  137. package/quaranteneProps.d.ts +2 -17
  138. package/randomInt.d.ts +1 -7
  139. package/randomKey.d.ts +1 -8
  140. package/readCookie.d.ts +0 -1
  141. package/removeAccents.d.ts +2 -6
  142. package/removeCookie.d.ts +1 -9
  143. package/removeDuplicates.d.ts +0 -0
  144. package/removeDuplicatesByKey.d.ts +1 -8
  145. package/removeDuplicatesComparing.d.ts +1 -5
  146. package/removeIndexesFromArray.d.ts +1 -5
  147. package/removeTrailingSlash.d.ts +1 -7
  148. package/removeUrlQueryParams.d.ts +1 -8
  149. package/render.d.ts +2 -41
  150. package/round.d.ts +2 -0
  151. package/roundTo.d.ts +1 -8
  152. package/serializeCookie.d.ts +2 -27
  153. package/setCookie.d.ts +1 -9
  154. package/shuffle.d.ts +1 -16
  155. package/slugify.d.ts +1 -11
  156. package/split.d.ts +1 -2
  157. package/splitReverse.d.ts +4 -0
  158. package/swapMap.d.ts +1 -7
  159. package/throttle.d.ts +1 -8
  160. package/titleCase.d.ts +1 -7
  161. package/toNumber.d.ts +1 -5
  162. package/toRgba.d.ts +1 -5
  163. package/transformToUrlPathname.d.ts +1 -11
  164. package/truncate.d.ts +1 -7
  165. package/tryUntil.d.ts +1 -8
  166. package/types.d.ts +1 -18
  167. package/typings.d.ts +33 -5
  168. package/uid.d.ts +1 -7
  169. package/updateLinkParams.d.ts +2 -10
  170. package/updateUrlQueryParams.d.ts +2 -9
  171. package/uppercase.d.ts +1 -7
  172. package/uuid.d.ts +1 -8
  173. package/uuidNumeric.d.ts +1 -6
  174. package/wait.d.ts +1 -7
  175. package/without.d.ts +0 -0
  176. package/Defer.js +0 -35
  177. package/Defer.mjs +0 -27
  178. package/Emitter.js +0 -53
  179. package/Emitter.mjs +0 -35
  180. package/accentSets.js +0 -133
  181. package/accentSets.mjs +0 -122
  182. package/addOrReplaceAtIdx.js +0 -40
  183. package/addOrReplaceAtIdx.mjs +0 -22
  184. package/areEqual.js +0 -75
  185. package/areEqual.mjs +0 -71
  186. package/arrayOfAll.js +0 -45
  187. package/arrayOfAll.mjs +0 -27
  188. package/arraySum.js +0 -24
  189. package/arraySum.mjs +0 -6
  190. package/arrayToLookup.js +0 -29
  191. package/arrayToLookup.mjs +0 -11
  192. package/buildUrlQueryString.js +0 -39
  193. package/buildUrlQueryString.mjs +0 -28
  194. package/capitalize.js +0 -28
  195. package/capitalize.mjs +0 -10
  196. package/changeUrlPath.d.ts +0 -10
  197. package/changeUrlPath.js +0 -29
  198. package/changeUrlPath.mjs +0 -17
  199. package/chunkByChunks.js +0 -52
  200. package/chunkByChunks.mjs +0 -34
  201. package/chunkBySize.js +0 -29
  202. package/chunkBySize.mjs +0 -11
  203. package/clamp.js +0 -27
  204. package/clamp.mjs +0 -9
  205. package/clsx.js +0 -59
  206. package/clsx.mjs +0 -46
  207. package/convertRange.js +0 -33
  208. package/convertRange.mjs +0 -15
  209. package/cookie.js +0 -21
  210. package/cookie.mjs +0 -11
  211. package/createPalette.js +0 -34
  212. package/createPalette.mjs +0 -25
  213. package/debounce.js +0 -39
  214. package/debounce.mjs +0 -21
  215. package/debouncePromise.js +0 -21
  216. package/debouncePromise.mjs +0 -8
  217. package/debounceRaf.js +0 -40
  218. package/debounceRaf.mjs +0 -22
  219. package/decode.js +0 -27
  220. package/decode.mjs +0 -9
  221. package/encode.js +0 -27
  222. package/encode.mjs +0 -9
  223. package/ensureInt.js +0 -24
  224. package/ensureInt.mjs +0 -6
  225. package/env.js +0 -3
  226. package/env.mjs +0 -2
  227. package/errorToString.js +0 -22
  228. package/errorToString.mjs +0 -7
  229. package/findDuplicatedIndexes.js +0 -31
  230. package/findDuplicatedIndexes.mjs +0 -13
  231. package/forin.js +0 -28
  232. package/forin.mjs +0 -10
  233. package/gbToBytes.js +0 -24
  234. package/gbToBytes.mjs +0 -6
  235. package/getEmptyArray.js +0 -29
  236. package/getEmptyArray.mjs +0 -16
  237. package/getKeys.js +0 -26
  238. package/getKeys.mjs +0 -8
  239. package/getMediaQueryWidthResolvers.js +0 -81
  240. package/getMediaQueryWidthResolvers.mjs +0 -63
  241. package/getMediaQueryWidthTailwindScreens.js +0 -51
  242. package/getMediaQueryWidthTailwindScreens.mjs +0 -33
  243. package/getNonce.js +0 -23
  244. package/getNonce.mjs +0 -8
  245. package/getParamAmong.js +0 -25
  246. package/getParamAmong.mjs +0 -15
  247. package/getParamAsInt.js +0 -28
  248. package/getParamAsInt.mjs +0 -18
  249. package/getParamAsString.js +0 -24
  250. package/getParamAsString.mjs +0 -13
  251. package/getType.js +0 -30
  252. package/getType.mjs +0 -17
  253. package/getUrlHashParams.js +0 -27
  254. package/getUrlHashParams.mjs +0 -14
  255. package/getUrlHashPathname.js +0 -29
  256. package/getUrlHashPathname.mjs +0 -11
  257. package/getUrlPathnameParts.js +0 -25
  258. package/getUrlPathnameParts.mjs +0 -15
  259. package/getUrlQueryParams.js +0 -36
  260. package/getUrlQueryParams.mjs +0 -27
  261. package/imgEmptyPixel.js +0 -24
  262. package/imgEmptyPixel.mjs +0 -6
  263. package/index.js +0 -532
  264. package/index.mjs +0 -132
  265. package/invariant.js +0 -50
  266. package/invariant.mjs +0 -32
  267. package/isAnyObject.js +0 -24
  268. package/isAnyObject.mjs +0 -9
  269. package/isArray.js +0 -24
  270. package/isArray.mjs +0 -9
  271. package/isBlob.js +0 -24
  272. package/isBlob.mjs +0 -9
  273. package/isBoolean.js +0 -24
  274. package/isBoolean.mjs +0 -9
  275. package/isBrowser.js +0 -23
  276. package/isBrowser.mjs +0 -5
  277. package/isBrowserNow.js +0 -22
  278. package/isBrowserNow.mjs +0 -6
  279. package/isDate.js +0 -24
  280. package/isDate.mjs +0 -9
  281. package/isEmptyArray.js +0 -24
  282. package/isEmptyArray.mjs +0 -9
  283. package/isEmptyObject.js +0 -24
  284. package/isEmptyObject.mjs +0 -9
  285. package/isEmptyString.js +0 -26
  286. package/isEmptyString.mjs +0 -8
  287. package/isError.js +0 -24
  288. package/isError.mjs +0 -9
  289. package/isExternalUrl.js +0 -32
  290. package/isExternalUrl.mjs +0 -19
  291. package/isFile.js +0 -24
  292. package/isFile.mjs +0 -9
  293. package/isFloat.js +0 -24
  294. package/isFloat.mjs +0 -9
  295. package/isFormData.js +0 -24
  296. package/isFormData.mjs +0 -9
  297. package/isFullArray.js +0 -24
  298. package/isFullArray.mjs +0 -9
  299. package/isFullObject.js +0 -24
  300. package/isFullObject.mjs +0 -9
  301. package/isFullString.js +0 -24
  302. package/isFullString.mjs +0 -9
  303. package/isFunction.js +0 -22
  304. package/isFunction.mjs +0 -8
  305. package/isInt.js +0 -24
  306. package/isInt.mjs +0 -9
  307. package/isMap.js +0 -24
  308. package/isMap.mjs +0 -9
  309. package/isNaNValue.js +0 -24
  310. package/isNaNValue.mjs +0 -9
  311. package/isNegativeNumber.js +0 -24
  312. package/isNegativeNumber.mjs +0 -9
  313. package/isNull.js +0 -24
  314. package/isNull.mjs +0 -9
  315. package/isNullOrUndefined.js +0 -24
  316. package/isNullOrUndefined.mjs +0 -9
  317. package/isNumber.js +0 -24
  318. package/isNumber.mjs +0 -11
  319. package/isObject.js +0 -24
  320. package/isObject.mjs +0 -9
  321. package/isObjectLike.js +0 -24
  322. package/isObjectLike.mjs +0 -11
  323. package/isOneOf.js +0 -22
  324. package/isOneOf.mjs +0 -4
  325. package/isPlainObject.js +0 -25
  326. package/isPlainObject.mjs +0 -10
  327. package/isPositiveNumber.js +0 -24
  328. package/isPositiveNumber.mjs +0 -9
  329. package/isPrimitive.js +0 -29
  330. package/isPrimitive.mjs +0 -14
  331. package/isPromise.js +0 -24
  332. package/isPromise.mjs +0 -9
  333. package/isRegExp.js +0 -24
  334. package/isRegExp.mjs +0 -9
  335. package/isServer.js +0 -23
  336. package/isServer.mjs +0 -7
  337. package/isServerNow.js +0 -22
  338. package/isServerNow.mjs +0 -6
  339. package/isSet.js +0 -24
  340. package/isSet.mjs +0 -9
  341. package/isString.js +0 -24
  342. package/isString.mjs +0 -9
  343. package/isSymbol.js +0 -24
  344. package/isSymbol.mjs +0 -9
  345. package/isType.js +0 -32
  346. package/isType.mjs +0 -20
  347. package/isUndefined.js +0 -24
  348. package/isUndefined.mjs +0 -9
  349. package/isWeakMap.js +0 -24
  350. package/isWeakMap.mjs +0 -9
  351. package/isWeakSet.js +0 -24
  352. package/isWeakSet.mjs +0 -9
  353. package/kbToBytes.js +0 -24
  354. package/kbToBytes.mjs +0 -6
  355. package/location.js +0 -6
  356. package/location.mjs +0 -3
  357. package/lowercase.js +0 -24
  358. package/lowercase.mjs +0 -6
  359. package/mapListBy.js +0 -29
  360. package/mapListBy.mjs +0 -11
  361. package/matchSorter.js +0 -373
  362. package/matchSorter.mjs +0 -352
  363. package/mbToBytes.js +0 -24
  364. package/mbToBytes.mjs +0 -6
  365. package/mergeObjects.js +0 -39
  366. package/mergeObjects.mjs +0 -34
  367. package/mergeUrlQueryParams.js +0 -32
  368. package/mergeUrlQueryParams.mjs +0 -18
  369. package/moveSortableArrayItemByKey.js +0 -35
  370. package/moveSortableArrayItemByKey.mjs +0 -17
  371. package/noop.js +0 -24
  372. package/noop.mjs +0 -6
  373. package/normaliseUrl.js +0 -24
  374. package/normaliseUrl.mjs +0 -13
  375. package/normaliseUrlPathname.js +0 -24
  376. package/normaliseUrlPathname.mjs +0 -12
  377. package/objectOmit.js +0 -35
  378. package/objectOmit.mjs +0 -17
  379. package/objectPick.js +0 -32
  380. package/objectPick.mjs +0 -14
  381. package/parseCookie.js +0 -55
  382. package/parseCookie.mjs +0 -44
  383. package/parseURL.js +0 -37
  384. package/parseURL.mjs +0 -19
  385. package/quaranteneProps.js +0 -49
  386. package/quaranteneProps.mjs +0 -31
  387. package/randomInt.js +0 -26
  388. package/randomInt.mjs +0 -8
  389. package/randomKey.js +0 -28
  390. package/randomKey.mjs +0 -10
  391. package/readCookie.js +0 -51
  392. package/readCookie.mjs +0 -33
  393. package/removeAccents.js +0 -28
  394. package/removeAccents.mjs +0 -12
  395. package/removeCookie.js +0 -28
  396. package/removeCookie.mjs +0 -16
  397. package/removeDuplicates.js +0 -13
  398. package/removeDuplicates.mjs +0 -12
  399. package/removeDuplicatesByKey.js +0 -36
  400. package/removeDuplicatesByKey.mjs +0 -18
  401. package/removeDuplicatesComparing.js +0 -25
  402. package/removeDuplicatesComparing.mjs +0 -9
  403. package/removeIndexesFromArray.js +0 -31
  404. package/removeIndexesFromArray.mjs +0 -13
  405. package/removeTrailingSlash.js +0 -26
  406. package/removeTrailingSlash.mjs +0 -8
  407. package/removeUrlQueryParams.js +0 -33
  408. package/removeUrlQueryParams.mjs +0 -19
  409. package/render.js +0 -93
  410. package/render.mjs +0 -110
  411. package/roundTo.js +0 -50
  412. package/roundTo.mjs +0 -32
  413. package/serializeCookie.js +0 -102
  414. package/serializeCookie.mjs +0 -98
  415. package/setCookie.js +0 -68
  416. package/setCookie.mjs +0 -55
  417. package/shuffle.js +0 -50
  418. package/shuffle.mjs +0 -32
  419. package/slugify.js +0 -35
  420. package/slugify.mjs +0 -25
  421. package/split.js +0 -22
  422. package/split.mjs +0 -4
  423. package/swapMap.js +0 -30
  424. package/swapMap.mjs +0 -12
  425. package/throttle.js +0 -38
  426. package/throttle.mjs +0 -20
  427. package/titleCase.js +0 -24
  428. package/titleCase.mjs +0 -6
  429. package/toNumber.js +0 -23
  430. package/toNumber.mjs +0 -7
  431. package/toRgba.js +0 -32
  432. package/toRgba.mjs +0 -14
  433. package/transformToUrlPathname.js +0 -24
  434. package/transformToUrlPathname.mjs +0 -13
  435. package/truncate.js +0 -24
  436. package/truncate.mjs +0 -6
  437. package/tryUntil.js +0 -42
  438. package/tryUntil.mjs +0 -24
  439. package/types.js +0 -5
  440. package/types.mjs +0 -2
  441. package/uid.js +0 -24
  442. package/uid.mjs +0 -10
  443. package/updateLinkParams.js +0 -26
  444. package/updateLinkParams.mjs +0 -13
  445. package/updateUrlQueryParams.js +0 -28
  446. package/updateUrlQueryParams.mjs +0 -14
  447. package/uppercase.js +0 -24
  448. package/uppercase.mjs +0 -6
  449. package/uuid.js +0 -28
  450. package/uuid.mjs +0 -10
  451. package/uuidNumeric.js +0 -23
  452. package/uuidNumeric.mjs +0 -5
  453. package/wait.js +0 -24
  454. package/wait.mjs +0 -6
  455. package/without.js +0 -55
  456. package/without.mjs +0 -54
package/Defer.d.ts CHANGED
@@ -1,20 +1,5 @@
1
- /**
2
- * @category async
3
- */
4
1
  export type Deferred<T> = Promise<T> & {
5
2
  resolve: PromiseConstructor["resolve"];
6
3
  reject: PromiseConstructor["reject"];
7
4
  };
8
- /**
9
- * @category async
10
- * @see https://stackoverflow.com/a/37673534/1938970
11
- * @example
12
- *
13
- * ```ts
14
- * const deferred = Defer();
15
- * deferred.resolve();
16
- * deferred.then(handleSuccess, handleError);
17
- * ```
18
- */
19
5
  export declare function Defer<T>(): Deferred<T>;
20
- export default Defer;
package/Emitter.d.ts CHANGED
@@ -1,25 +1,6 @@
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
- export declare function Emitter<EventMap extends {
1
+ export declare let Emitter: <EventMap extends {
14
2
  [key: string]: any;
15
- }>(namespace: string): {
16
- /**
17
- * Register an event handler for the given type.
18
- */
3
+ }>(namespace: string) => {
19
4
  on<EventName extends keyof EventMap>(name: EventName, handler: (data?: EventMap[EventName] | undefined) => any): void;
20
- /**
21
- * Invoke all handlers for the given type.
22
- */
23
5
  emit<EventName_1 extends keyof EventMap>(name: EventName_1, data?: EventMap[EventName_1] | undefined): void;
24
6
  };
25
- export default Emitter;
package/README.md CHANGED
@@ -16,9 +16,11 @@ Libraries to encapsulate and re-export from here, the selection is based on:
16
16
  - [mesqueeb/copy-anything](https://github.com/mesqueeb/copy-anything)
17
17
  - [mesqueeb/flatten-anything](https://github.com/mesqueeb/flatten-anything)
18
18
 
19
- To considerç
19
+ To consider:
20
+
20
21
  - [dlv](https://www.npmjs.com/package/dlv)
21
- - [dset](https://github.com/lukeed/dset)
22
+ - [lukeed/dset](https://github.com/lukeed/dset)
23
+ - [angus-c/just](https://github.com/angus-c/just)
22
24
 
23
25
  About ts utilities types @see:
24
26
 
package/accentSets.d.ts CHANGED
@@ -1,16 +1,2 @@
1
- /**
2
- * First value is the `to`, second is `from`, from *which* chars do we translates *to*
3
- *
4
- * @category text
5
- */
6
1
  export type AccentsSet = [string, string];
7
- /**
8
- * Accent sets
9
- *
10
- * @category text
11
- * @see https://gist.github.com/mathewbyrne/1280286#gistcomment-3498021
12
- * @see https://gist.github.com/eek/9c4887e80b3ede05c0e39fee4dce3747 for usage
13
- * of [normalize](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
14
- */
15
- export declare const accentsSets: AccentsSet[];
16
- export default accentsSets;
2
+ export declare let accentsSets: AccentsSet[];
@@ -1,5 +1 @@
1
- /**
2
- * @category array
3
- */
4
- export declare function addOrReplaceAtIdx<T>(list: T[], newItem: T, newIdx?: number): T[];
5
- export default addOrReplaceAtIdx;
1
+ export declare let addOrReplaceAtIdx: <T>(list: T[], newItem: T, newIdx?: number) => T[];
package/areEqual.d.ts CHANGED
@@ -1,19 +1,4 @@
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 objects
17
- */
18
- export declare function areEqual(a: Comparable, b?: Comparable): boolean;
19
- export default areEqual;
3
+ export declare let areEqual: (a: Comparable, b?: Comparable) => boolean;
4
+ export {};
@@ -0,0 +1 @@
1
+ export declare let arrayFilterFalsy: <T extends unknown[]>(list?: T | null | undefined) => Exclude<NonNullable<T>[number], false | "" | 0 | undefined>[];
@@ -0,0 +1 @@
1
+ export declare let arrayFindLastIndex: <T>(array: T[], predicate: (value: T, index: number, obj: T[]) => boolean) => number;
package/arrayOfAll.d.ts CHANGED
@@ -1,28 +1,2 @@
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
- *
9
- * ```
10
- * type Fruit = "pear" | "apple" | "orange";
11
- *
12
- * const arrayOfAllFruits = arrayOfAll<Fruit>();
13
- *
14
- * const allFruits = arrayOfAllFruits([
15
- * "pear",
16
- * "apple",
17
- * "orange"
18
- * ]); // ts compiler ok
19
- *
20
- * const allFruits = arrayOfAllFruits([
21
- * "pear",
22
- * "apple",
23
- * ]); // ts compiler fails
24
- * ```
25
- *
26
- */
27
- export declare const arrayOfAll: <T>() => <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : "Invalid")) => U & ([T] extends [U[number]] ? unknown : "Invalid");
28
- export default arrayOfAll;
1
+ export declare let arrayOfAll: <T>() => <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : "Invalid")) => U & ([T] extends [U[number]] ? unknown : "Invalid");
2
+ export type ArrayOfAll<List extends unknown[], Union> = List[number] extends Union ? Union extends List[number] ? true : "Incomplete" : "Incomplete";
package/arraySum.d.ts CHANGED
@@ -1,7 +1 @@
1
- /**
2
- * Sum array of numbers
3
- *
4
- * @category array | math
5
- */
6
- export declare const arraySum: (numbers: number[]) => number;
7
- export default arraySum;
1
+ export declare let arraySum: (numbers: number[]) => number;
@@ -1,7 +1 @@
1
- /**
2
- * Maps a simple flat array to a lookup dictionary object
3
- *
4
- * @category array
5
- */
6
- export declare function arrayToLookup<T extends string | number | symbol>(array?: T[]): Record<T, 1>;
7
- export default arrayToLookup;
1
+ export declare let arrayToLookup: <T extends string | number | symbol>(array?: T[]) => Record<T, 1>;
@@ -0,0 +1 @@
1
+ export declare let arrayUniqueByProperties: <T extends any[]>(array: T, keys: (keyof T[number])[]) => T;
@@ -1,12 +1,2 @@
1
- import { type AnyQueryParams } from "./location";
2
- /**
3
- * Get clean query string for URL
4
- *
5
- * It returns the query string **with** the initial `?`
6
- *
7
- * TODO: at some point replace with `URLSearchParams`, @see [caniuse](https://caniuse.com/?search=URLSearchParams)
8
- *
9
- * @category location
10
- */
11
- export declare function buildUrlQueryString<T extends AnyQueryParams>(params: T): string;
12
- export default buildUrlQueryString;
1
+ import type { AnyQueryParams } from "./location";
2
+ export declare let buildUrlQueryString: <T extends AnyQueryParams>(params: T) => string;
package/capitalize.d.ts CHANGED
@@ -1,8 +1 @@
1
- /**
2
- * Capitalize first letter of the given string.
3
- *
4
- * @category text
5
- * @see https://stackoverflow.com/a/11409944/1938970
6
- */
7
- export declare function capitalize<T extends string>(string?: null | T): Capitalize<T>;
8
- export default capitalize;
1
+ export declare let capitalize: <T extends string>(string?: T | null | undefined) => Capitalize<T>;
@@ -0,0 +1,2 @@
1
+ import { type PascalCaseOptions } from "./changeCaseHelpers";
2
+ export declare let changeCaseCamel: (input: string, options?: PascalCaseOptions) => string;
@@ -0,0 +1,2 @@
1
+ import { type Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseCapital: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import { type Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseConstant: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import type { Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseDot: (input: string, options?: Options) => string;
@@ -0,0 +1,19 @@
1
+ export type Locale = string[] | string | false | undefined;
2
+ export interface PascalCaseOptions extends Options {
3
+ mergeAmbiguousCharacters?: boolean;
4
+ }
5
+ export interface Options {
6
+ locale?: Locale;
7
+ split?: (value: string) => string[];
8
+ separateNumbers?: boolean;
9
+ delimiter?: string;
10
+ prefixCharacters?: string;
11
+ suffixCharacters?: string;
12
+ }
13
+ export declare let split: (value: string) => string[];
14
+ export declare let splitSeparateNumbers: (value: string) => string[];
15
+ export declare let lowerFactory: (locale: Locale) => (input: string) => string;
16
+ export declare let upperFactory: (locale: Locale) => (input: string) => string;
17
+ export declare let capitalCaseTransformFactory: (lower: (input: string) => string, upper: (input: string) => string) => (word: string) => string;
18
+ export declare let pascalCaseTransformFactory: (lower: (input: string) => string, upper: (input: string) => string) => (word: string, index: number) => string;
19
+ export declare let splitPrefixSuffix: (input: string, options?: Options) => [string, string[], string];
@@ -0,0 +1,2 @@
1
+ import type { Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseKebab: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import { type Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseNone: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import { type PascalCaseOptions } from "./changeCaseHelpers";
2
+ export declare let changeCasePascal: (input: string, options?: PascalCaseOptions) => string;
@@ -0,0 +1,2 @@
1
+ import type { Options } from "./changeCaseHelpers";
2
+ export declare let changeCasePascalSnake: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import type { Options } from "./changeCaseHelpers";
2
+ export declare let changeCasePath: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import { type Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseSentence: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import type { Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseSnake: (input: string, options?: Options) => string;
@@ -0,0 +1,2 @@
1
+ import type { Options } from "./changeCaseHelpers";
2
+ export declare let changeCaseTrain: (input: string, options?: Options) => string;
@@ -1,7 +1 @@
1
- /**
2
- * TODO: untested
3
- * @category array
4
- * @see https://stackoverflow.com/a/8189268/1938970
5
- */
6
- export declare function chunkByChunks<T>(arr: T[], nrOfChunks: number, balanced?: boolean): T[][];
7
- export default chunkByChunks;
1
+ export declare let chunkByChunks: <T>(arr: T[], nrOfChunks: number, balanced?: boolean) => T[][];
package/chunkBySize.d.ts CHANGED
@@ -1,6 +1 @@
1
- /**
2
- * @category array
3
- * @see https://stackoverflow.com/a/40682136/1938970
4
- */
5
- export declare function chunkBySize<T>(arr: T[], size: number): T[][];
6
- export default chunkBySize;
1
+ export declare let chunkBySize: <T>(arr: T[], size: number) => T[][];
package/clamp.d.ts CHANGED
@@ -1,8 +1 @@
1
- /**
2
- * Returns a number whose value is limited to the given range.
3
- *
4
- * @category math
5
- * @see https://stackoverflow.com/a/11409944/1938970
6
- */
7
- export declare function clamp(num: number, min: number, max: number): number;
8
- export default clamp;
1
+ export declare let clamp: (num: number, min: number, max: number) => number;
package/clsx.d.ts CHANGED
@@ -1,9 +1,6 @@
1
- import type { ClassValue } from "clsx";
2
- /**
3
- * Class names utility
4
- *
5
- * @borrows [lukeed/clsx](https://github.com/lukeed/clsx)
6
- * @license [MIT: Luke Edwards](https://github.com/lukeed/clsx/blob/master/license)
7
- */
8
- export declare const clsx: (...args: ClassValue[]) => string;
9
- export default clsx;
1
+ type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
2
+ type ClassDictionary = Record<string, any>;
3
+ type ClassArray = ClassValue[];
4
+ export type ClsxClassValue = ClassValue;
5
+ export declare let clsx: (...args: ClassValue[]) => string;
6
+ export {};
package/convertRange.d.ts CHANGED
@@ -1,14 +1 @@
1
- /**
2
- * Convert range of a number
3
- *
4
- * e.g. converting number 5 in a scale/range from 0 10 to a scale/range from 50
5
- * to 100 would return 75
6
- * ```
7
- * convertRange(5, [0, 10], [50, 100]);
8
- * ```
9
- *
10
- * @category math
11
- * @see https://stackoverflow.com/a/14224813
12
- */
13
- export declare function convertRange(num: number, r1: number[], r2: number[]): number;
14
- export default convertRange;
1
+ export declare let convertRange: (num: number, r1: number[], r2: number[]) => number;
package/cookie.d.ts CHANGED
@@ -1,44 +1,8 @@
1
- /**
2
- * @file
3
- *
4
- * @category cookie
5
- *
6
- * All cookie related code is inspired and adapted from:
7
- * - [js-cookie](https://github.com/js-cookie/js-cookie)
8
- * - [cookie](https://github.com/jshttp/cookie)
9
- */
10
1
  type CookieAttributes = {
11
- /**
12
- * Define when the cookie will be removed. Value can be a Number
13
- * which will be interpreted as days from time of creation or a
14
- * Date instance. If omitted, the cookie becomes a session cookie.
15
- */
16
2
  expires?: number | Date | undefined;
17
- /**
18
- * Define the path where the cookie is available. Defaults to '/'
19
- *
20
- * @default "/"
21
- */
22
3
  path?: string | undefined;
23
- /**
24
- * Define the domain where the cookie is available. Defaults to
25
- * the domain of the page where the cookie was created.
26
- */
27
4
  domain?: string | undefined;
28
- /**
29
- * A Boolean indicating if the cookie transmission requires a
30
- * secure protocol (https).
31
- *
32
- * @default "true"
33
- */
34
5
  secure?: boolean | undefined;
35
- /**
36
- * Asserts that a cookie must not be sent with cross-origin requests,
37
- * providing some protection against cross-site request forgery
38
- * attacks (CSRF)
39
- *
40
- * @default "strict"
41
- */
42
6
  sameSite?: "strict" | "Strict" | "lax" | "Lax" | "none" | "None" | undefined;
43
7
  };
44
8
  export type CookieAttributesServer = CookieAttributes & {
@@ -48,7 +12,7 @@ export type CookieAttributesServer = CookieAttributes & {
48
12
  decode?: (input: string) => string;
49
13
  };
50
14
  export type CookieAttributesClient = CookieAttributes;
51
- export declare const defaultAttributesClient: {
15
+ export declare let defaultAttributesClient: {
52
16
  path: string;
53
17
  };
54
18
  export {};
@@ -6,15 +6,5 @@ type PaletteMapPair<T extends PaletteShade> = {
6
6
  type PaletteMap<T extends PaletteShades> = {
7
7
  [PS in T[number] as keyof PaletteMapPair<PS>]: PaletteMapPair<PS>[keyof PaletteMapPair<PS>];
8
8
  };
9
- /**
10
- * Create palette, this is primarily thought to improve the reuse of a palette
11
- * definition between TailwindCSS and straight ES imports
12
- *
13
- * @category styling|tailwind|colours
14
- *
15
- * @returns An array with: 1) A flat palette map 2) A TailwindCSS ready palette
16
- * object 3) A flat array of colors (no special sorting, same order as the `shades`
17
- * given as argument)
18
- */
19
- export declare const createPalette: <TName extends string, TShades extends PaletteShades, TColor = TShades[number][1], TMap = PaletteMap<TShades>>(name: TName, shades: TShades) => readonly [TMap, Record<`${TName}-${TShades[number][0]}`, string>, TColor[]];
20
- export default createPalette;
9
+ export declare let createPalette: <TName extends string, TShades extends PaletteShades, TColor = TShades[number][1], TMap = PaletteMap<TShades>>(name: TName, shades: TShades) => readonly [TMap, Record<`${TName}-${TShades[number][0]}`, string>, TColor[]];
10
+ export {};
package/debounce.d.ts CHANGED
@@ -1,8 +1 @@
1
- /**
2
- * Debounce function (with `setTimeout`)
3
- *
4
- * @category function
5
- * @borrows [davidwalsh/debounce](https://davidwalsh.name/javascript-debounce-function)
6
- */
7
- export declare function debounce<T extends (...args: any[]) => any>(fn: T, wait?: number, immediate?: boolean): (this: unknown, ...args: Parameters<T>) => void;
8
- export default debounce;
1
+ export declare let debounce: <T extends (...args: any[]) => any>(fn: T, wait?: number, immediate?: boolean) => (this: unknown, ...args: Parameters<T>) => void;
@@ -1,11 +1,10 @@
1
- import { debounce as tsDebounce } from "ts-debounce";
2
- export { type Options as DebounceOptions } from "ts-debounce";
3
- export { type DebouncedFunction } from "ts-debounce";
4
- /**
5
- * Debounce function (with `Promise`)
6
- *
7
- * @category function
8
- * @borrows [chodorowicz/ts-debounce](https://github.com/chodorowicz/ts-debounce)
9
- */
10
- export declare const debouncePromise: typeof tsDebounce;
11
- export default debouncePromise;
1
+ export type DebounceOptions<Result> = {
2
+ isImmediate?: boolean;
3
+ maxWait?: number;
4
+ callback?: (data: Result) => void;
5
+ };
6
+ export interface DebouncedFunction<Args extends any[], F extends (...args: Args) => any> {
7
+ (this: ThisParameterType<F>, ...args: Args & Parameters<F>): Promise<ReturnType<F>>;
8
+ cancel: (reason?: any) => void;
9
+ }
10
+ export declare let debouncePromise: <Args extends any[], F extends (...args: Args) => any>(func: F, waitMilliseconds?: number, options?: DebounceOptions<ReturnType<F>>) => DebouncedFunction<Args, F>;
package/debounceRaf.d.ts CHANGED
@@ -1,9 +1 @@
1
- /**
2
- * Debounce function (with `requestAnimationFrame`)
3
- *
4
- * (c) 2021 Chris Ferdinandi, MIT License, https://gomakethings.com
5
- * @category function
6
- * @borrows [vanillajstoolkit/debounce](https://vanillajstoolkit.com/helpers/debounce/)
7
- */
8
1
  export declare function debounceRaf<T extends (...args: any[]) => any>(this: unknown, fn: T): (this: unknown, ...args: Parameters<T>) => void;
9
- export default debounceRaf;
package/decode.d.ts CHANGED
@@ -1,6 +1 @@
1
- /**
2
- * @category security
3
- * @see https://stackoverflow.com/a/22405578/9122820
4
- */
5
- export declare function decode<TReturn extends string>(str: string): TReturn;
6
- export default decode;
1
+ export declare let decode: <TReturn extends string>(str: string) => TReturn;
package/encode.d.ts CHANGED
@@ -1,6 +1 @@
1
- /**
2
- * @category security
3
- * @see https://stackoverflow.com/a/22405578/9122820
4
- */
5
- export declare function encode<TReturn extends string>(str: string): TReturn;
6
- export default encode;
1
+ export declare let encode: <TReturn extends string>(str: string) => TReturn;
package/ensureInt.d.ts CHANGED
@@ -1,7 +1 @@
1
- /**
2
- * Ensure input to be an integer
3
- *
4
- * @category cast
5
- */
6
- export declare const ensureInt: (input: string | number) => number;
7
- export default ensureInt;
1
+ export declare let ensureInt: (input: string | number) => number;
package/env.d.ts CHANGED
File without changes
@@ -1,7 +1 @@
1
- /**
2
- * Ensure to transform a JavaScript `Error` into a string (uses its `message`)
3
- *
4
- * @category Error
5
- */
6
- export declare const errorToString: (e: unknown) => string;
7
- export default errorToString;
1
+ export declare let errorToString: (e: unknown) => string;
@@ -0,0 +1 @@
1
+ export declare let escapeRegExp: (text: string) => string;
@@ -1,5 +1 @@
1
- /**
2
- * @category array
3
- */
4
- export declare function findDuplicatedIndexes(arr: any[]): Record<number, true>;
5
- export default findDuplicatedIndexes;
1
+ export declare let findDuplicatedIndexes: (arr: any[]) => Record<number, true>;
package/forin.d.ts CHANGED
@@ -1,7 +1 @@
1
- /**
2
- * To easily get typed native `for in`
3
- *
4
- * @category objects
5
- */
6
- export declare function forin<T>(object: T, cb: <K extends keyof T>(key: K, value: T[K]) => void): void;
7
- export default forin;
1
+ export declare let forin: <T>(object: T, cb: <K extends keyof T>(key: K, value: T[K]) => void) => void;
package/gbToBytes.d.ts CHANGED
@@ -1,7 +1 @@
1
- /**
2
- * Gigabytes to bytes
3
- *
4
- * @category format
5
- */
6
- export declare const gbToBytes: (bytes: number) => number;
7
- export default gbToBytes;
1
+ export declare let gbToBytes: (bytes: number) => number;
@@ -1,9 +1 @@
1
- /**
2
- *
3
- * Returns an array of undefined values of the desired length, useful to build
4
- * skeleton UIs.
5
- *
6
- * @category array
7
- */
8
- export declare function getEmptyArray(length: number | string): undefined[];
9
- export default getEmptyArray;
1
+ export declare let getEmptyArray: (length: number | string) => undefined[];
package/getKeys.d.ts CHANGED
@@ -1,9 +1 @@
1
- /**
2
- * Type safe replacement for `Object.keys(myObject)` to iterate over a record
3
- * without loosing the key's types in simple `string`s.
4
- *
5
- * @category objects
6
- * @see https://stackoverflow.com/a/59459000/1938970
7
- */
8
- export declare const getKeys: <T extends object>(obj: T) => (keyof T)[];
9
- export default getKeys;
1
+ export declare let getKeys: <T extends object>(obj: T) => (keyof T)[];
@@ -1,5 +1,5 @@
1
1
  export type GetMediaQueryWidthResolversBreakpoints = Record<string, number>;
2
- export declare function getMediaQueryWidthResolvers<TBreakpointsConfig extends GetMediaQueryWidthResolversBreakpoints>(customBreakpoints: TBreakpointsConfig): {
2
+ export declare let getMediaQueryWidthResolvers: <TBreakpointsConfig extends GetMediaQueryWidthResolversBreakpoints>(customBreakpoints: TBreakpointsConfig) => {
3
3
  max: (br: Extract<keyof TBreakpointsConfig, string>) => string;
4
4
  min: (br: Extract<keyof TBreakpointsConfig, string>) => string;
5
5
  down: (br: Extract<keyof TBreakpointsConfig, string>) => string;
@@ -7,4 +7,3 @@ export declare function getMediaQueryWidthResolvers<TBreakpointsConfig extends G
7
7
  between: (br1: Extract<keyof TBreakpointsConfig, string>, br2?: Extract<keyof TBreakpointsConfig, string> | undefined) => string;
8
8
  only: (br: Extract<keyof TBreakpointsConfig, string>) => string;
9
9
  };
10
- export default getMediaQueryWidthResolvers;
@@ -1,5 +1,4 @@
1
1
  import { type GetMediaQueryWidthResolversBreakpoints } from "./getMediaQueryWidthResolvers";
2
- export declare function getMediaQueryWidthTailwindScreens(breakpoints: GetMediaQueryWidthResolversBreakpoints): Record<string, {
2
+ export declare let getMediaQueryWidthTailwindScreens: (breakpoints: GetMediaQueryWidthResolversBreakpoints) => Record<string, {
3
3
  raw: string;
4
4
  }>;
5
- export default getMediaQueryWidthTailwindScreens;
package/getNonce.d.ts CHANGED
@@ -1,6 +1 @@
1
- /**
2
- * @category security
3
- * @see https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/nonce.ts
4
- */
5
- export declare function getNonce(): string | null;
6
- export default getNonce;
1
+ export declare let getNonce: () => string | null;
@@ -1,12 +1 @@
1
- /**
2
- * Get query parameter as `string` treating the `ParsedUrlQuery` result of
3
- * [`querystring`](https://nodejs.org/api/querystring.html) (used in next.js
4
- * router and elsewhere)
5
- *
6
- * @category location
7
- *
8
- * @param {string} [raw] - The _raw_ query parameter
9
- * @param {string[]} [allowedValues=[]] - The list of values (as strings) that the parameter can have, if not one of them `null` is returned
10
- */
11
- export declare function getParamAmong<T extends string[]>(raw?: string | string[], allowedValues?: T): T[number] | null;
12
- export default getParamAmong;
1
+ export declare let getParamAmong: <T extends string[]>(raw?: string | string[], allowedValues?: T) => T[number] | null;
@@ -1,12 +1 @@
1
- /**
2
- * Get query parameter as `int`eger treating the `ParsedUrlQuery` result of
3
- * [`querystring`](https://nodejs.org/api/querystring.html) (used in next.js
4
- * router and elsewhere)
5
- *
6
- * @category location
7
- *
8
- * @param {string} [raw] - The _raw_ query parameter
9
- * @param {number} [fallback] - Fallback number, we return `null` if not provided
10
- */
11
- export declare function getParamAsInt<TFallback extends number | null | undefined>(raw?: string | string[], fallback?: TFallback): number | TFallback;
12
- export default getParamAsInt;
1
+ export declare let getParamAsInt: <TFallback extends number | null | undefined>(raw?: string | string[], fallback?: TFallback) => number | TFallback;
@@ -1,11 +1 @@
1
- /**
2
- * Get query parameter as `string` treating the `ParsedUrlQuery` result of
3
- * [`querystring`](https://nodejs.org/api/querystring.html) (used in next.js
4
- * router and elsewhere)
5
- *
6
- * @category location
7
- *
8
- * @param {string} [raw] - The _raw_ query parameter
9
- */
10
- export declare function getParamAsString(raw?: string | string[]): string;
11
- export default getParamAsString;
1
+ export declare let getParamAsString: (raw?: string | string[]) => string;