@koine/utils 2.0.0-beta.38 → 2.0.0-beta.39

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 (642) hide show
  1. package/Defer.d.ts +0 -1
  2. package/Emitter.d.ts +2 -3
  3. package/README.md +48 -0
  4. package/accentSets.d.ts +1 -2
  5. package/addOrReplaceAtIdx.d.ts +1 -2
  6. package/areEqual.d.ts +2 -2
  7. package/arrayFilterFalsy.d.ts +1 -2
  8. package/arrayOfAll.d.ts +1 -2
  9. package/arraySum.d.ts +1 -2
  10. package/arrayToLookup.d.ts +1 -2
  11. package/arrayUniqueByProperties.d.ts +1 -2
  12. package/buildUrlQueryString.d.ts +2 -3
  13. package/capitalize.d.ts +1 -2
  14. package/changeCaseCamel.d.ts +2 -3
  15. package/changeCaseCapital.d.ts +2 -3
  16. package/changeCaseConstant.d.ts +2 -3
  17. package/changeCaseDot.d.ts +2 -3
  18. package/changeCaseHelpers.d.ts +7 -7
  19. package/changeCaseKebab.d.ts +2 -3
  20. package/changeCaseNone.d.ts +2 -3
  21. package/changeCasePascal.d.ts +2 -3
  22. package/changeCasePascalSnake.d.ts +2 -3
  23. package/changeCasePath.d.ts +2 -3
  24. package/changeCaseSentence.d.ts +2 -3
  25. package/changeCaseSnake.d.ts +2 -3
  26. package/changeCaseTrain.d.ts +2 -3
  27. package/chunkByChunks.d.ts +1 -2
  28. package/chunkBySize.d.ts +1 -2
  29. package/clamp.d.ts +1 -2
  30. package/clsx.d.ts +2 -2
  31. package/convertRange.d.ts +1 -2
  32. package/cookie.d.ts +1 -1
  33. package/createPalette.d.ts +2 -2
  34. package/debounce.d.ts +1 -2
  35. package/debouncePromise.d.ts +1 -2
  36. package/debounceRaf.d.ts +0 -1
  37. package/decode.d.ts +1 -2
  38. package/encode.d.ts +1 -2
  39. package/ensureInt.d.ts +1 -2
  40. package/errorToString.d.ts +1 -2
  41. package/findDuplicatedIndexes.d.ts +1 -2
  42. package/forin.d.ts +1 -2
  43. package/gbToBytes.d.ts +1 -2
  44. package/getEmptyArray.d.ts +1 -2
  45. package/getKeys.d.ts +1 -2
  46. package/getMediaQueryWidthResolvers.d.ts +1 -2
  47. package/getMediaQueryWidthTailwindScreens.d.ts +2 -3
  48. package/getNonce.d.ts +1 -2
  49. package/getParamAmong.d.ts +1 -2
  50. package/getParamAsInt.d.ts +1 -2
  51. package/getParamAsString.d.ts +1 -2
  52. package/getType.d.ts +1 -2
  53. package/getUrlHashParams.d.ts +1 -3
  54. package/getUrlHashPathname.d.ts +1 -2
  55. package/getUrlPathnameParts.d.ts +1 -2
  56. package/getUrlQueryParams.d.ts +1 -3
  57. package/imgEmptyPixel.d.ts +1 -2
  58. package/index.cjs.d.ts +1 -0
  59. package/index.cjs.default.js +1 -0
  60. package/index.cjs.js +473 -0
  61. package/index.cjs.mjs +2 -0
  62. package/index.d.ts +149 -149
  63. package/index.esm.js +324 -0
  64. package/invariant.d.ts +1 -2
  65. package/isAnyObject.d.ts +2 -3
  66. package/isArray.d.ts +1 -2
  67. package/isBlob.d.ts +1 -2
  68. package/isBoolean.d.ts +1 -2
  69. package/isBrowser.d.ts +1 -2
  70. package/isBrowserNow.d.ts +1 -2
  71. package/isDate.d.ts +1 -2
  72. package/isEmptyArray.d.ts +1 -2
  73. package/isEmptyObject.d.ts +4 -3
  74. package/isEmptyString.d.ts +1 -2
  75. package/isError.d.ts +1 -2
  76. package/isExternalUrl.d.ts +1 -2
  77. package/isFile.d.ts +1 -2
  78. package/isFloat.d.ts +1 -2
  79. package/isFormData.d.ts +1 -2
  80. package/isFullArray.d.ts +1 -2
  81. package/isFullObject.d.ts +2 -3
  82. package/isFullString.d.ts +1 -2
  83. package/isFunction.d.ts +2 -3
  84. package/isInt.d.ts +1 -2
  85. package/isMap.d.ts +1 -2
  86. package/isNaNValue.d.ts +1 -2
  87. package/isNegativeNumber.d.ts +1 -2
  88. package/isNull.d.ts +1 -2
  89. package/isNullOrUndefined.d.ts +1 -2
  90. package/isNumber.d.ts +1 -2
  91. package/isNumericLiteral.d.ts +1 -2
  92. package/isObject.d.ts +2 -3
  93. package/isObjectLike.d.ts +2 -3
  94. package/isOneOf.d.ts +1 -2
  95. package/isPlainObject.d.ts +2 -3
  96. package/isPositiveNumber.d.ts +1 -2
  97. package/isPrimitive.d.ts +1 -2
  98. package/isPromise.d.ts +1 -2
  99. package/isRegExp.d.ts +1 -2
  100. package/isServer.d.ts +1 -2
  101. package/isServerNow.d.ts +1 -2
  102. package/isSet.d.ts +1 -2
  103. package/isString.d.ts +1 -2
  104. package/isSymbol.d.ts +1 -2
  105. package/isType.d.ts +2 -3
  106. package/isUndefined.d.ts +1 -2
  107. package/isWeakMap.d.ts +1 -2
  108. package/isWeakSet.d.ts +1 -2
  109. package/kbToBytes.d.ts +1 -2
  110. package/lowercase.d.ts +1 -2
  111. package/mapListBy.d.ts +1 -2
  112. package/matchSorter.d.ts +2 -3
  113. package/mbToBytes.d.ts +1 -2
  114. package/mergeObjects.d.ts +1 -1
  115. package/mergeUrlQueryParams.d.ts +2 -3
  116. package/moveSortableArrayItemByKey.d.ts +1 -2
  117. package/noop.d.ts +1 -2
  118. package/normaliseUrl.d.ts +1 -2
  119. package/normaliseUrlPathname.d.ts +1 -2
  120. package/objectFlat.d.ts +1 -2
  121. package/objectFlip.d.ts +1 -2
  122. package/objectOmit.d.ts +1 -2
  123. package/objectPick.d.ts +1 -2
  124. package/objectToArray.d.ts +1 -2
  125. package/package.json +10 -646
  126. package/parseCookie.d.ts +2 -3
  127. package/parseURL.d.ts +1 -2
  128. package/quaranteneProps.d.ts +2 -2
  129. package/randomInt.d.ts +1 -2
  130. package/randomKey.d.ts +1 -2
  131. package/readCookie.d.ts +0 -1
  132. package/removeAccents.d.ts +2 -3
  133. package/removeCookie.d.ts +2 -3
  134. package/removeDuplicatesByKey.d.ts +1 -2
  135. package/removeDuplicatesComparing.d.ts +1 -2
  136. package/removeIndexesFromArray.d.ts +1 -2
  137. package/removeTrailingSlash.d.ts +1 -2
  138. package/removeUrlQueryParams.d.ts +1 -2
  139. package/render.d.ts +2 -2
  140. package/round.d.ts +2 -3
  141. package/roundTo.d.ts +1 -2
  142. package/serializeCookie.d.ts +2 -3
  143. package/setCookie.d.ts +2 -3
  144. package/shuffle.d.ts +1 -2
  145. package/slugify.d.ts +1 -2
  146. package/split.d.ts +1 -2
  147. package/swapMap.d.ts +1 -2
  148. package/throttle.d.ts +1 -2
  149. package/titleCase.d.ts +1 -2
  150. package/toNumber.d.ts +1 -2
  151. package/toRgba.d.ts +1 -2
  152. package/transformToUrlPathname.d.ts +1 -2
  153. package/truncate.d.ts +1 -2
  154. package/tryUntil.d.ts +1 -2
  155. package/uid.d.ts +1 -2
  156. package/updateLinkParams.d.ts +2 -3
  157. package/updateUrlQueryParams.d.ts +2 -3
  158. package/uppercase.d.ts +1 -2
  159. package/uuid.d.ts +1 -2
  160. package/uuidNumeric.d.ts +1 -2
  161. package/wait.d.ts +1 -2
  162. package/Defer.js +0 -11
  163. package/Emitter.js +0 -20
  164. package/accentSets.js +0 -30
  165. package/addOrReplaceAtIdx.js +0 -16
  166. package/areEqual.js +0 -58
  167. package/arrayFilterFalsy.js +0 -4
  168. package/arrayOfAll.js +0 -6
  169. package/arraySum.js +0 -4
  170. package/arrayToLookup.js +0 -8
  171. package/arrayUniqueByProperties.js +0 -8
  172. package/buildUrlQueryString.js +0 -21
  173. package/capitalize.js +0 -5
  174. package/changeCaseCamel.js +0 -21
  175. package/changeCaseCapital.js +0 -14
  176. package/changeCaseConstant.js +0 -10
  177. package/changeCaseDot.js +0 -6
  178. package/changeCaseHelpers.js +0 -82
  179. package/changeCaseKebab.js +0 -6
  180. package/changeCaseNone.js +0 -10
  181. package/changeCasePascal.js +0 -13
  182. package/changeCasePascalSnake.js +0 -6
  183. package/changeCasePath.js +0 -6
  184. package/changeCaseSentence.js +0 -19
  185. package/changeCaseSnake.js +0 -6
  186. package/changeCaseTrain.js +0 -6
  187. package/changeUrlPath.d.ts +0 -2
  188. package/changeUrlPath.js +0 -10
  189. package/chunkByChunks.js +0 -32
  190. package/chunkBySize.js +0 -8
  191. package/cjs/Defer.d.ts +0 -6
  192. package/cjs/Defer.js +0 -15
  193. package/cjs/Emitter.d.ts +0 -7
  194. package/cjs/Emitter.js +0 -24
  195. package/cjs/accentSets.d.ts +0 -3
  196. package/cjs/accentSets.js +0 -33
  197. package/cjs/addOrReplaceAtIdx.d.ts +0 -2
  198. package/cjs/addOrReplaceAtIdx.js +0 -20
  199. package/cjs/areEqual.d.ts +0 -4
  200. package/cjs/areEqual.js +0 -62
  201. package/cjs/arrayFilterFalsy.d.ts +0 -2
  202. package/cjs/arrayFilterFalsy.js +0 -8
  203. package/cjs/arrayOfAll.d.ts +0 -2
  204. package/cjs/arrayOfAll.js +0 -10
  205. package/cjs/arraySum.d.ts +0 -2
  206. package/cjs/arraySum.js +0 -8
  207. package/cjs/arrayToLookup.d.ts +0 -2
  208. package/cjs/arrayToLookup.js +0 -12
  209. package/cjs/arrayUniqueByProperties.d.ts +0 -2
  210. package/cjs/arrayUniqueByProperties.js +0 -12
  211. package/cjs/buildUrlQueryString.d.ts +0 -3
  212. package/cjs/buildUrlQueryString.js +0 -25
  213. package/cjs/capitalize.d.ts +0 -2
  214. package/cjs/capitalize.js +0 -9
  215. package/cjs/changeCaseCamel.d.ts +0 -3
  216. package/cjs/changeCaseCamel.js +0 -25
  217. package/cjs/changeCaseCapital.d.ts +0 -3
  218. package/cjs/changeCaseCapital.js +0 -18
  219. package/cjs/changeCaseConstant.d.ts +0 -3
  220. package/cjs/changeCaseConstant.js +0 -14
  221. package/cjs/changeCaseDot.d.ts +0 -3
  222. package/cjs/changeCaseDot.js +0 -10
  223. package/cjs/changeCaseHelpers.d.ts +0 -19
  224. package/cjs/changeCaseHelpers.js +0 -92
  225. package/cjs/changeCaseKebab.d.ts +0 -3
  226. package/cjs/changeCaseKebab.js +0 -10
  227. package/cjs/changeCaseNone.d.ts +0 -3
  228. package/cjs/changeCaseNone.js +0 -14
  229. package/cjs/changeCasePascal.d.ts +0 -3
  230. package/cjs/changeCasePascal.js +0 -17
  231. package/cjs/changeCasePascalSnake.d.ts +0 -3
  232. package/cjs/changeCasePascalSnake.js +0 -10
  233. package/cjs/changeCasePath.d.ts +0 -3
  234. package/cjs/changeCasePath.js +0 -10
  235. package/cjs/changeCaseSentence.d.ts +0 -3
  236. package/cjs/changeCaseSentence.js +0 -23
  237. package/cjs/changeCaseSnake.d.ts +0 -3
  238. package/cjs/changeCaseSnake.js +0 -10
  239. package/cjs/changeCaseTrain.d.ts +0 -3
  240. package/cjs/changeCaseTrain.js +0 -10
  241. package/cjs/chunkByChunks.d.ts +0 -2
  242. package/cjs/chunkByChunks.js +0 -36
  243. package/cjs/chunkBySize.d.ts +0 -2
  244. package/cjs/chunkBySize.js +0 -12
  245. package/cjs/clamp.d.ts +0 -2
  246. package/cjs/clamp.js +0 -8
  247. package/cjs/clsx.d.ts +0 -6
  248. package/cjs/clsx.js +0 -44
  249. package/cjs/convertRange.d.ts +0 -2
  250. package/cjs/convertRange.js +0 -8
  251. package/cjs/cookie.d.ts +0 -18
  252. package/cjs/cookie.js +0 -4
  253. package/cjs/createPalette.d.ts +0 -10
  254. package/cjs/createPalette.js +0 -16
  255. package/cjs/debounce.d.ts +0 -2
  256. package/cjs/debounce.js +0 -26
  257. package/cjs/debouncePromise.d.ts +0 -11
  258. package/cjs/debouncePromise.js +0 -69
  259. package/cjs/debounceRaf.d.ts +0 -2
  260. package/cjs/debounceRaf.js +0 -21
  261. package/cjs/decode.d.ts +0 -2
  262. package/cjs/decode.js +0 -10
  263. package/cjs/encode.d.ts +0 -2
  264. package/cjs/encode.js +0 -10
  265. package/cjs/ensureInt.d.ts +0 -2
  266. package/cjs/ensureInt.js +0 -8
  267. package/cjs/env.d.ts +0 -0
  268. package/cjs/env.js +0 -1
  269. package/cjs/errorToString.d.ts +0 -2
  270. package/cjs/errorToString.js +0 -9
  271. package/cjs/findDuplicatedIndexes.d.ts +0 -2
  272. package/cjs/findDuplicatedIndexes.js +0 -15
  273. package/cjs/forin.d.ts +0 -2
  274. package/cjs/forin.js +0 -10
  275. package/cjs/gbToBytes.d.ts +0 -2
  276. package/cjs/gbToBytes.js +0 -6
  277. package/cjs/getEmptyArray.d.ts +0 -2
  278. package/cjs/getEmptyArray.js +0 -12
  279. package/cjs/getKeys.d.ts +0 -2
  280. package/cjs/getKeys.js +0 -5
  281. package/cjs/getMediaQueryWidthResolvers.d.ts +0 -10
  282. package/cjs/getMediaQueryWidthResolvers.js +0 -44
  283. package/cjs/getMediaQueryWidthTailwindScreens.d.ts +0 -5
  284. package/cjs/getMediaQueryWidthTailwindScreens.js +0 -31
  285. package/cjs/getNonce.d.ts +0 -2
  286. package/cjs/getNonce.js +0 -9
  287. package/cjs/getParamAmong.d.ts +0 -2
  288. package/cjs/getParamAmong.js +0 -11
  289. package/cjs/getParamAsInt.d.ts +0 -2
  290. package/cjs/getParamAsInt.js +0 -14
  291. package/cjs/getParamAsString.d.ts +0 -2
  292. package/cjs/getParamAsString.js +0 -9
  293. package/cjs/getType.d.ts +0 -7
  294. package/cjs/getType.js +0 -8
  295. package/cjs/getUrlHashParams.d.ts +0 -3
  296. package/cjs/getUrlHashParams.js +0 -14
  297. package/cjs/getUrlHashPathname.d.ts +0 -2
  298. package/cjs/getUrlHashPathname.js +0 -10
  299. package/cjs/getUrlPathnameParts.d.ts +0 -2
  300. package/cjs/getUrlPathnameParts.js +0 -14
  301. package/cjs/getUrlQueryParams.d.ts +0 -3
  302. package/cjs/getUrlQueryParams.js +0 -29
  303. package/cjs/imgEmptyPixel.d.ts +0 -2
  304. package/cjs/imgEmptyPixel.js +0 -5
  305. package/cjs/index.d.ts +0 -150
  306. package/cjs/index.js +0 -297
  307. package/cjs/invariant.d.ts +0 -2
  308. package/cjs/invariant.js +0 -21
  309. package/cjs/isAnyObject.d.ts +0 -3
  310. package/cjs/isAnyObject.js +0 -9
  311. package/cjs/isArray.d.ts +0 -2
  312. package/cjs/isArray.js +0 -9
  313. package/cjs/isBlob.d.ts +0 -2
  314. package/cjs/isBlob.js +0 -9
  315. package/cjs/isBoolean.d.ts +0 -2
  316. package/cjs/isBoolean.js +0 -9
  317. package/cjs/isBrowser.d.ts +0 -2
  318. package/cjs/isBrowser.js +0 -5
  319. package/cjs/isBrowserNow.d.ts +0 -2
  320. package/cjs/isBrowserNow.js +0 -7
  321. package/cjs/isDate.d.ts +0 -2
  322. package/cjs/isDate.js +0 -9
  323. package/cjs/isEmptyArray.d.ts +0 -2
  324. package/cjs/isEmptyArray.js +0 -9
  325. package/cjs/isEmptyObject.d.ts +0 -4
  326. package/cjs/isEmptyObject.js +0 -9
  327. package/cjs/isEmptyString.d.ts +0 -2
  328. package/cjs/isEmptyString.js +0 -8
  329. package/cjs/isError.d.ts +0 -2
  330. package/cjs/isError.js +0 -9
  331. package/cjs/isExternalUrl.d.ts +0 -2
  332. package/cjs/isExternalUrl.js +0 -16
  333. package/cjs/isFile.d.ts +0 -2
  334. package/cjs/isFile.js +0 -9
  335. package/cjs/isFloat.d.ts +0 -2
  336. package/cjs/isFloat.js +0 -9
  337. package/cjs/isFormData.d.ts +0 -2
  338. package/cjs/isFormData.js +0 -9
  339. package/cjs/isFullArray.d.ts +0 -2
  340. package/cjs/isFullArray.js +0 -9
  341. package/cjs/isFullObject.d.ts +0 -3
  342. package/cjs/isFullObject.js +0 -9
  343. package/cjs/isFullString.d.ts +0 -2
  344. package/cjs/isFullString.js +0 -9
  345. package/cjs/isFunction.d.ts +0 -3
  346. package/cjs/isFunction.js +0 -8
  347. package/cjs/isInt.d.ts +0 -2
  348. package/cjs/isInt.js +0 -9
  349. package/cjs/isMap.d.ts +0 -2
  350. package/cjs/isMap.js +0 -9
  351. package/cjs/isNaNValue.d.ts +0 -2
  352. package/cjs/isNaNValue.js +0 -9
  353. package/cjs/isNegativeNumber.d.ts +0 -2
  354. package/cjs/isNegativeNumber.js +0 -9
  355. package/cjs/isNull.d.ts +0 -2
  356. package/cjs/isNull.js +0 -9
  357. package/cjs/isNullOrUndefined.d.ts +0 -2
  358. package/cjs/isNullOrUndefined.js +0 -8
  359. package/cjs/isNumber.d.ts +0 -2
  360. package/cjs/isNumber.js +0 -9
  361. package/cjs/isNumericLiteral.d.ts +0 -2
  362. package/cjs/isNumericLiteral.js +0 -8
  363. package/cjs/isObject.d.ts +0 -3
  364. package/cjs/isObject.js +0 -9
  365. package/cjs/isObjectLike.d.ts +0 -3
  366. package/cjs/isObjectLike.js +0 -9
  367. package/cjs/isOneOf.d.ts +0 -6
  368. package/cjs/isOneOf.js +0 -14
  369. package/cjs/isPlainObject.d.ts +0 -3
  370. package/cjs/isPlainObject.js +0 -12
  371. package/cjs/isPositiveNumber.d.ts +0 -2
  372. package/cjs/isPositiveNumber.js +0 -9
  373. package/cjs/isPrimitive.d.ts +0 -2
  374. package/cjs/isPrimitive.js +0 -19
  375. package/cjs/isPromise.d.ts +0 -2
  376. package/cjs/isPromise.js +0 -9
  377. package/cjs/isRegExp.d.ts +0 -2
  378. package/cjs/isRegExp.js +0 -9
  379. package/cjs/isServer.d.ts +0 -2
  380. package/cjs/isServer.js +0 -6
  381. package/cjs/isServerNow.d.ts +0 -2
  382. package/cjs/isServerNow.js +0 -7
  383. package/cjs/isSet.d.ts +0 -2
  384. package/cjs/isSet.js +0 -9
  385. package/cjs/isString.d.ts +0 -2
  386. package/cjs/isString.js +0 -9
  387. package/cjs/isSymbol.d.ts +0 -2
  388. package/cjs/isSymbol.js +0 -9
  389. package/cjs/isType.d.ts +0 -3
  390. package/cjs/isType.js +0 -17
  391. package/cjs/isUndefined.d.ts +0 -2
  392. package/cjs/isUndefined.js +0 -9
  393. package/cjs/isWeakMap.d.ts +0 -2
  394. package/cjs/isWeakMap.js +0 -9
  395. package/cjs/isWeakSet.d.ts +0 -2
  396. package/cjs/isWeakSet.js +0 -9
  397. package/cjs/kbToBytes.d.ts +0 -2
  398. package/cjs/kbToBytes.js +0 -6
  399. package/cjs/location.d.ts +0 -1
  400. package/cjs/location.js +0 -2
  401. package/cjs/lowercase.d.ts +0 -2
  402. package/cjs/lowercase.js +0 -8
  403. package/cjs/mapListBy.d.ts +0 -2
  404. package/cjs/mapListBy.js +0 -13
  405. package/cjs/matchSorter.d.ts +0 -54
  406. package/cjs/matchSorter.js +0 -259
  407. package/cjs/mbToBytes.d.ts +0 -2
  408. package/cjs/mbToBytes.js +0 -6
  409. package/cjs/mergeObjects.d.ts +0 -1
  410. package/cjs/mergeObjects.js +0 -37
  411. package/cjs/mergeUrlQueryParams.d.ts +0 -3
  412. package/cjs/mergeUrlQueryParams.js +0 -20
  413. package/cjs/moveSortableArrayItemByKey.d.ts +0 -2
  414. package/cjs/moveSortableArrayItemByKey.js +0 -14
  415. package/cjs/noop.d.ts +0 -2
  416. package/cjs/noop.js +0 -6
  417. package/cjs/normaliseUrl.d.ts +0 -2
  418. package/cjs/normaliseUrl.js +0 -10
  419. package/cjs/normaliseUrlPathname.d.ts +0 -2
  420. package/cjs/normaliseUrlPathname.js +0 -10
  421. package/cjs/objectFlat.d.ts +0 -4
  422. package/cjs/objectFlat.js +0 -21
  423. package/cjs/objectFlip.d.ts +0 -2
  424. package/cjs/objectFlip.js +0 -15
  425. package/cjs/objectOmit.d.ts +0 -2
  426. package/cjs/objectOmit.js +0 -14
  427. package/cjs/objectPick.d.ts +0 -2
  428. package/cjs/objectPick.js +0 -13
  429. package/cjs/objectToArray.d.ts +0 -2
  430. package/cjs/objectToArray.js +0 -8
  431. package/cjs/package.json +0 -9
  432. package/cjs/parseCookie.d.ts +0 -3
  433. package/cjs/parseCookie.js +0 -38
  434. package/cjs/parseURL.d.ts +0 -11
  435. package/cjs/parseURL.js +0 -18
  436. package/cjs/quaranteneProps.d.ts +0 -7
  437. package/cjs/quaranteneProps.js +0 -20
  438. package/cjs/randomInt.d.ts +0 -2
  439. package/cjs/randomInt.js +0 -8
  440. package/cjs/randomKey.d.ts +0 -2
  441. package/cjs/randomKey.js +0 -9
  442. package/cjs/readCookie.d.ts +0 -3
  443. package/cjs/readCookie.js +0 -38
  444. package/cjs/removeAccents.d.ts +0 -3
  445. package/cjs/removeAccents.js +0 -17
  446. package/cjs/removeCookie.d.ts +0 -3
  447. package/cjs/removeCookie.js +0 -12
  448. package/cjs/removeDuplicates.d.ts +0 -0
  449. package/cjs/removeDuplicates.js +0 -1
  450. package/cjs/removeDuplicatesByKey.d.ts +0 -2
  451. package/cjs/removeDuplicatesByKey.js +0 -18
  452. package/cjs/removeDuplicatesComparing.d.ts +0 -2
  453. package/cjs/removeDuplicatesComparing.js +0 -11
  454. package/cjs/removeIndexesFromArray.d.ts +0 -2
  455. package/cjs/removeIndexesFromArray.js +0 -14
  456. package/cjs/removeTrailingSlash.d.ts +0 -2
  457. package/cjs/removeTrailingSlash.js +0 -9
  458. package/cjs/removeUrlQueryParams.d.ts +0 -2
  459. package/cjs/removeUrlQueryParams.js +0 -19
  460. package/cjs/render.d.ts +0 -13
  461. package/cjs/render.js +0 -123
  462. package/cjs/round.d.ts +0 -3
  463. package/cjs/round.js +0 -10
  464. package/cjs/roundTo.d.ts +0 -2
  465. package/cjs/roundTo.js +0 -16
  466. package/cjs/serializeCookie.d.ts +0 -3
  467. package/cjs/serializeCookie.js +0 -74
  468. package/cjs/setCookie.d.ts +0 -3
  469. package/cjs/setCookie.js +0 -47
  470. package/cjs/shuffle.d.ts +0 -2
  471. package/cjs/shuffle.js +0 -22
  472. package/cjs/slugify.d.ts +0 -2
  473. package/cjs/slugify.js +0 -18
  474. package/cjs/split.d.ts +0 -3
  475. package/cjs/split.js +0 -6
  476. package/cjs/swapMap.d.ts +0 -2
  477. package/cjs/swapMap.js +0 -13
  478. package/cjs/throttle.d.ts +0 -3
  479. package/cjs/throttle.js +0 -24
  480. package/cjs/titleCase.d.ts +0 -2
  481. package/cjs/titleCase.js +0 -10
  482. package/cjs/toNumber.d.ts +0 -2
  483. package/cjs/toNumber.js +0 -9
  484. package/cjs/toRgba.d.ts +0 -2
  485. package/cjs/toRgba.js +0 -13
  486. package/cjs/transformToUrlPathname.d.ts +0 -2
  487. package/cjs/transformToUrlPathname.js +0 -11
  488. package/cjs/truncate.d.ts +0 -2
  489. package/cjs/truncate.js +0 -12
  490. package/cjs/tryUntil.d.ts +0 -2
  491. package/cjs/tryUntil.js +0 -19
  492. package/cjs/types.d.ts +0 -10
  493. package/cjs/types.js +0 -2
  494. package/cjs/uid.d.ts +0 -2
  495. package/cjs/uid.js +0 -11
  496. package/cjs/updateLinkParams.d.ts +0 -3
  497. package/cjs/updateLinkParams.js +0 -11
  498. package/cjs/updateUrlQueryParams.d.ts +0 -3
  499. package/cjs/updateUrlQueryParams.js +0 -16
  500. package/cjs/uppercase.d.ts +0 -2
  501. package/cjs/uppercase.js +0 -8
  502. package/cjs/uuid.d.ts +0 -2
  503. package/cjs/uuid.js +0 -11
  504. package/cjs/uuidNumeric.d.ts +0 -2
  505. package/cjs/uuidNumeric.js +0 -6
  506. package/cjs/wait.d.ts +0 -2
  507. package/cjs/wait.js +0 -8
  508. package/cjs/without.d.ts +0 -0
  509. package/cjs/without.js +0 -1
  510. package/clamp.js +0 -4
  511. package/clsx.js +0 -40
  512. package/convertRange.js +0 -4
  513. package/cookie.js +0 -1
  514. package/createPalette.js +0 -12
  515. package/debounce.js +0 -22
  516. package/debouncePromise.js +0 -65
  517. package/debounceRaf.js +0 -17
  518. package/decode.js +0 -6
  519. package/encode.js +0 -6
  520. package/ensureInt.js +0 -4
  521. package/env.js +0 -1
  522. package/errorToString.js +0 -5
  523. package/findDuplicatedIndexes.js +0 -11
  524. package/forin.js +0 -6
  525. package/gbToBytes.js +0 -2
  526. package/getEmptyArray.js +0 -8
  527. package/getKeys.js +0 -2
  528. package/getMediaQueryWidthResolvers.js +0 -40
  529. package/getMediaQueryWidthTailwindScreens.js +0 -27
  530. package/getNonce.js +0 -5
  531. package/getParamAmong.js +0 -7
  532. package/getParamAsInt.js +0 -10
  533. package/getParamAsString.js +0 -5
  534. package/getType.js +0 -4
  535. package/getUrlHashParams.js +0 -10
  536. package/getUrlHashPathname.js +0 -6
  537. package/getUrlPathnameParts.js +0 -10
  538. package/getUrlQueryParams.js +0 -25
  539. package/imgEmptyPixel.js +0 -2
  540. package/index.js +0 -146
  541. package/invariant.js +0 -17
  542. package/isAnyObject.js +0 -5
  543. package/isArray.js +0 -5
  544. package/isBlob.js +0 -5
  545. package/isBoolean.js +0 -5
  546. package/isBrowser.js +0 -2
  547. package/isBrowserNow.js +0 -3
  548. package/isDate.js +0 -5
  549. package/isEmptyArray.js +0 -5
  550. package/isEmptyObject.js +0 -5
  551. package/isEmptyString.js +0 -4
  552. package/isError.js +0 -5
  553. package/isExternalUrl.js +0 -12
  554. package/isFile.js +0 -5
  555. package/isFloat.js +0 -5
  556. package/isFormData.js +0 -5
  557. package/isFullArray.js +0 -5
  558. package/isFullObject.js +0 -5
  559. package/isFullString.js +0 -5
  560. package/isFunction.js +0 -4
  561. package/isInt.js +0 -5
  562. package/isMap.js +0 -5
  563. package/isNaNValue.js +0 -5
  564. package/isNegativeNumber.js +0 -5
  565. package/isNull.js +0 -5
  566. package/isNullOrUndefined.js +0 -5
  567. package/isNumber.js +0 -5
  568. package/isNumericLiteral.js +0 -4
  569. package/isObject.js +0 -5
  570. package/isObjectLike.js +0 -5
  571. package/isOneOf.js +0 -10
  572. package/isPlainObject.js +0 -8
  573. package/isPositiveNumber.js +0 -5
  574. package/isPrimitive.js +0 -15
  575. package/isPromise.js +0 -5
  576. package/isRegExp.js +0 -5
  577. package/isServer.js +0 -3
  578. package/isServerNow.js +0 -3
  579. package/isSet.js +0 -5
  580. package/isString.js +0 -5
  581. package/isSymbol.js +0 -5
  582. package/isType.js +0 -13
  583. package/isUndefined.js +0 -5
  584. package/isWeakMap.js +0 -5
  585. package/isWeakSet.js +0 -5
  586. package/kbToBytes.js +0 -2
  587. package/location.js +0 -1
  588. package/lowercase.js +0 -4
  589. package/mapListBy.js +0 -9
  590. package/matchSorter.js +0 -255
  591. package/mbToBytes.js +0 -2
  592. package/mergeObjects.js +0 -33
  593. package/mergeUrlQueryParams.js +0 -16
  594. package/moveSortableArrayItemByKey.js +0 -10
  595. package/noop.js +0 -2
  596. package/normaliseUrl.js +0 -6
  597. package/normaliseUrlPathname.js +0 -6
  598. package/objectFlat.js +0 -17
  599. package/objectFlip.js +0 -11
  600. package/objectOmit.js +0 -10
  601. package/objectPick.js +0 -9
  602. package/objectToArray.js +0 -4
  603. package/parseCookie.js +0 -34
  604. package/parseURL.js +0 -14
  605. package/quaranteneProps.js +0 -16
  606. package/randomInt.js +0 -4
  607. package/randomKey.js +0 -5
  608. package/readCookie.js +0 -34
  609. package/removeAccents.js +0 -13
  610. package/removeCookie.js +0 -8
  611. package/removeDuplicates.js +0 -1
  612. package/removeDuplicatesByKey.js +0 -14
  613. package/removeDuplicatesComparing.js +0 -7
  614. package/removeIndexesFromArray.js +0 -10
  615. package/removeTrailingSlash.js +0 -5
  616. package/removeUrlQueryParams.js +0 -15
  617. package/render.js +0 -119
  618. package/round.js +0 -6
  619. package/roundTo.js +0 -12
  620. package/serializeCookie.js +0 -70
  621. package/setCookie.js +0 -43
  622. package/shuffle.js +0 -18
  623. package/slugify.js +0 -14
  624. package/split.js +0 -2
  625. package/swapMap.js +0 -9
  626. package/throttle.js +0 -20
  627. package/titleCase.js +0 -6
  628. package/toNumber.js +0 -5
  629. package/toRgba.js +0 -9
  630. package/transformToUrlPathname.js +0 -7
  631. package/truncate.js +0 -8
  632. package/tryUntil.js +0 -15
  633. package/types.js +0 -1
  634. package/typings.d.ts +0 -35
  635. package/uid.js +0 -7
  636. package/updateLinkParams.js +0 -7
  637. package/updateUrlQueryParams.js +0 -12
  638. package/uppercase.js +0 -4
  639. package/uuid.js +0 -7
  640. package/uuidNumeric.js +0 -2
  641. package/wait.js +0 -4
  642. package/without.js +0 -1
@@ -1,6 +0,0 @@
1
- import { __assign } from "tslib";
2
- import changeCaseCapital from "./changeCaseCapital.js";
3
- export var changeCaseTrain = function (input, options) {
4
- return changeCaseCapital(input, __assign({ delimiter: "-" }, options));
5
- };
6
- export default changeCaseTrain;
@@ -1,2 +0,0 @@
1
- export declare function changeUrlPath(pathname: string, state?: object, replace?: boolean): string;
2
- export default changeUrlPath;
package/changeUrlPath.js DELETED
@@ -1,10 +0,0 @@
1
- import isBrowser from "./isBrowser.js";
2
- import normaliseUrlPathname from "./normaliseUrlPathname.js";
3
- export function changeUrlPath(pathname, state, replace) {
4
- var path = normaliseUrlPathname("/".concat(pathname, "/"));
5
- if (isBrowser) {
6
- history[replace ? "replaceState" : "pushState"](state, "", path);
7
- }
8
- return path;
9
- }
10
- export default changeUrlPath;
package/chunkByChunks.js DELETED
@@ -1,32 +0,0 @@
1
- export function chunkByChunks(arr, nrOfChunks, balanced) {
2
- if (nrOfChunks < 2)
3
- return [arr];
4
- var len = arr.length;
5
- var output = [];
6
- var i = 0;
7
- var size;
8
- if (len % nrOfChunks === 0) {
9
- size = Math.floor(len / nrOfChunks);
10
- while (i < len) {
11
- output.push(arr.slice(i, (i += size)));
12
- }
13
- }
14
- else if (balanced) {
15
- while (i < len) {
16
- size = Math.ceil((len - i) / nrOfChunks--);
17
- output.push(arr.slice(i, (i += size)));
18
- }
19
- }
20
- else {
21
- nrOfChunks--;
22
- size = Math.floor(len / nrOfChunks);
23
- if (len % size === 0)
24
- size--;
25
- while (i < size * nrOfChunks) {
26
- output.push(arr.slice(i, (i += size)));
27
- }
28
- output.push(arr.slice(size * nrOfChunks));
29
- }
30
- return output;
31
- }
32
- export default chunkByChunks;
package/chunkBySize.js DELETED
@@ -1,8 +0,0 @@
1
- export function chunkBySize(arr, size) {
2
- var output = [];
3
- for (var i = 0; i < arr.length; i += size) {
4
- output.push(arr.slice(i, i + size));
5
- }
6
- return output;
7
- }
8
- export default chunkBySize;
package/cjs/Defer.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export type Deferred<T> = Promise<T> & {
2
- resolve: PromiseConstructor["resolve"];
3
- reject: PromiseConstructor["reject"];
4
- };
5
- export declare function Defer<T>(): Deferred<T>;
6
- export default Defer;
package/cjs/Defer.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Defer = void 0;
4
- function Defer() {
5
- var self = this || {};
6
- var p = (self.promise = new Promise(function (resolve, reject) {
7
- self.resolve = resolve;
8
- self.reject = reject;
9
- }));
10
- self.then = p.then.bind(p);
11
- self.catch = p.catch.bind(p);
12
- return self;
13
- }
14
- exports.Defer = Defer;
15
- exports.default = Defer;
package/cjs/Emitter.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export declare function Emitter<EventMap extends {
2
- [key: string]: any;
3
- }>(namespace: string): {
4
- on<EventName extends keyof EventMap>(name: EventName, handler: (data?: EventMap[EventName] | undefined) => any): void;
5
- emit<EventName_1 extends keyof EventMap>(name: EventName_1, data?: EventMap[EventName_1] | undefined): void;
6
- };
7
- export default Emitter;
package/cjs/Emitter.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Emitter = void 0;
4
- function Emitter(namespace) {
5
- var all = new Map();
6
- return {
7
- on: function (name, handler) {
8
- var handlers = all.get("".concat(namespace, ".").concat(String(name)));
9
- var added = handlers && handlers.push(handler);
10
- if (!added) {
11
- all.set("".concat(namespace, ".").concat(String(name)), [handler]);
12
- }
13
- },
14
- emit: function (name, data) {
15
- (all.get("".concat(namespace, ".").concat(String(name))) || [])
16
- .slice()
17
- .map(function (handler) {
18
- handler(data);
19
- });
20
- },
21
- };
22
- }
23
- exports.Emitter = Emitter;
24
- exports.default = Emitter;
@@ -1,3 +0,0 @@
1
- export type AccentsSet = [string, string];
2
- export declare const accentsSets: AccentsSet[];
3
- export default accentsSets;
package/cjs/accentSets.js DELETED
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.accentsSets = void 0;
4
- exports.accentsSets = [
5
- ["a", "ÀÁÂÃÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶ"],
6
- ["ae", "Ä"],
7
- ["c", "ÇĆĈČ"],
8
- ["d", "ÐĎĐÞ"],
9
- ["e", "ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ"],
10
- ["g", "ĜĞĢǴ"],
11
- ["h", "ĤḦ"],
12
- ["i", "ÌÍÎÏĨĪĮİỈỊ"],
13
- ["j", "Ĵ"],
14
- ["ij", "IJ"],
15
- ["k", "Ķ"],
16
- ["l", "ĹĻĽŁ"],
17
- ["m", "Ḿ"],
18
- ["n", "ÑŃŅŇ"],
19
- ["o", "ÒÓÔÕØŌŎŐỌỎỐỒỔỖỘỚỜỞỠỢǪǬƠ"],
20
- ["oe", "΅"],
21
- ["p", "ṕ"],
22
- ["r", "ŔŖŘ"],
23
- ["s", "ŚŜŞŠ"],
24
- ["ss", "ß"],
25
- ["t", "ŢŤ"],
26
- ["u", "ÙÚÛŨŪŬŮŰŲỤỦỨỪỬỮỰƯ"],
27
- ["ue", "Ü"],
28
- ["w", "ẂŴẀẄ"],
29
- ["x", "ẍ"],
30
- ["y", "ÝŶŸỲỴỶỸ"],
31
- ["z", "ŹŻŽ"],
32
- ];
33
- exports.default = exports.accentsSets;
@@ -1,2 +0,0 @@
1
- export declare function addOrReplaceAtIdx<T>(list: T[], newItem: T, newIdx?: number): T[];
2
- export default addOrReplaceAtIdx;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addOrReplaceAtIdx = void 0;
4
- var tslib_1 = require("tslib");
5
- function addOrReplaceAtIdx(list, newItem, newIdx) {
6
- if (list.length === 0) {
7
- return [newItem];
8
- }
9
- if (typeof newIdx === "undefined" || list.length - 1 < newIdx) {
10
- return tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(list), false), [newItem], false);
11
- }
12
- return list.map(function (item, idx) {
13
- if (idx === newIdx) {
14
- return newItem;
15
- }
16
- return item;
17
- });
18
- }
19
- exports.addOrReplaceAtIdx = addOrReplaceAtIdx;
20
- exports.default = addOrReplaceAtIdx;
package/cjs/areEqual.d.ts DELETED
@@ -1,4 +0,0 @@
1
- type ComparablePrimitive = string | number | boolean;
2
- type Comparable = ComparablePrimitive | object | Record<string, ComparablePrimitive> | Array<ComparablePrimitive>;
3
- export declare function areEqual(a: Comparable, b?: Comparable): boolean;
4
- export default areEqual;
package/cjs/areEqual.js DELETED
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.areEqual = void 0;
4
- var tslib_1 = require("tslib");
5
- var isArray_1 = require("./isArray");
6
- var isObject_1 = require("./isObject");
7
- function areEqualArrays(a, b) {
8
- if (!b)
9
- return false;
10
- if (a.length !== b.length)
11
- return false;
12
- for (var i = 0; i < a.length; i++) {
13
- if (!areEqual(a[i], b[i]))
14
- return false;
15
- }
16
- return true;
17
- }
18
- function areEqualObjects(a, b) {
19
- var e_1, _a;
20
- if (!b)
21
- return false;
22
- var aKeys = Object.keys(a);
23
- try {
24
- for (var aKeys_1 = tslib_1.__values(aKeys), aKeys_1_1 = aKeys_1.next(); !aKeys_1_1.done; aKeys_1_1 = aKeys_1.next()) {
25
- var _key = aKeys_1_1.value;
26
- var key = _key;
27
- if (!areEqual(a[key], b[key])) {
28
- return false;
29
- }
30
- }
31
- }
32
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
33
- finally {
34
- try {
35
- if (aKeys_1_1 && !aKeys_1_1.done && (_a = aKeys_1.return)) _a.call(aKeys_1);
36
- }
37
- finally { if (e_1) throw e_1.error; }
38
- }
39
- return true;
40
- }
41
- function areEqual(a, b) {
42
- if (!a && !b) {
43
- return true;
44
- }
45
- if (!b && a !== b) {
46
- return false;
47
- }
48
- var areObjects = (0, isObject_1.isObject)(a) && (0, isObject_1.isObject)(b);
49
- if (areObjects && !areEqualObjects(a, b)) {
50
- return false;
51
- }
52
- var areArrays = (0, isArray_1.isArray)(a) && (0, isArray_1.isArray)(b);
53
- if (areArrays && !areEqualArrays(a, b)) {
54
- return false;
55
- }
56
- if (!areObjects && !areArrays && a !== b) {
57
- return false;
58
- }
59
- return true;
60
- }
61
- exports.areEqual = areEqual;
62
- exports.default = areEqual;
@@ -1,2 +0,0 @@
1
- export declare function arrayFilterFalsy<T extends unknown[]>(list?: null | T): Exclude<NonNullable<T>[number], false | "" | 0 | undefined>[];
2
- export default arrayFilterFalsy;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.arrayFilterFalsy = void 0;
4
- function arrayFilterFalsy(list) {
5
- return (list ? list.filter(function (r) { return !!r; }) : []);
6
- }
7
- exports.arrayFilterFalsy = arrayFilterFalsy;
8
- exports.default = arrayFilterFalsy;
@@ -1,2 +0,0 @@
1
- export declare const arrayOfAll: <T>() => <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : "Invalid")) => U & ([T] extends [U[number]] ? unknown : "Invalid");
2
- export default arrayOfAll;
package/cjs/arrayOfAll.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.arrayOfAll = void 0;
4
- var arrayOfAll = function () {
5
- return function (array) {
6
- return array;
7
- };
8
- };
9
- exports.arrayOfAll = arrayOfAll;
10
- exports.default = exports.arrayOfAll;
package/cjs/arraySum.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const arraySum: (numbers: number[]) => number;
2
- export default arraySum;
package/cjs/arraySum.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.arraySum = void 0;
4
- var arraySum = function (numbers) {
5
- return numbers.reduce(function (sum, current) { return sum + current; }, 0);
6
- };
7
- exports.arraySum = arraySum;
8
- exports.default = exports.arraySum;
@@ -1,2 +0,0 @@
1
- export declare function arrayToLookup<T extends string | number | symbol>(array?: T[]): Record<T, 1>;
2
- export default arrayToLookup;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.arrayToLookup = void 0;
4
- function arrayToLookup(array) {
5
- if (array === void 0) { array = []; }
6
- return array.reduce(function (obj, item) {
7
- obj[item] = 1;
8
- return obj;
9
- }, {});
10
- }
11
- exports.arrayToLookup = arrayToLookup;
12
- exports.default = arrayToLookup;
@@ -1,2 +0,0 @@
1
- export declare const arrayUniqueByProperties: <T extends any[]>(array: T, keys: (keyof T[number])[]) => T;
2
- export default arrayUniqueByProperties;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.arrayUniqueByProperties = void 0;
4
- var arrayUniqueByProperties = function (array, keys) {
5
- return array.filter(function (item, idx, arr) {
6
- return arr.findIndex(function (itemWith) {
7
- return keys.every(function (k) { return itemWith[k] === item[k]; });
8
- }) === idx;
9
- });
10
- };
11
- exports.arrayUniqueByProperties = arrayUniqueByProperties;
12
- exports.default = exports.arrayUniqueByProperties;
@@ -1,3 +0,0 @@
1
- import { type AnyQueryParams } from "./location";
2
- export declare function buildUrlQueryString<T extends AnyQueryParams>(params: T): string;
3
- export default buildUrlQueryString;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildUrlQueryString = void 0;
4
- var isArray_1 = require("./isArray");
5
- var isNull_1 = require("./isNull");
6
- var isUndefined_1 = require("./isUndefined");
7
- function buildUrlQueryString(params) {
8
- var output = "";
9
- if (!params)
10
- return output;
11
- for (var key in params) {
12
- var value = params[key];
13
- if ((0, isArray_1.default)(value)) {
14
- for (var i = 0; i < value.length; i++) {
15
- output += "".concat(key, "=").concat(encodeURIComponent(value[i] + ""), "&");
16
- }
17
- }
18
- else if (!(0, isNull_1.default)(value) && !(0, isUndefined_1.default)(value)) {
19
- output += "".concat(key, "=").concat(encodeURIComponent(value + ""), "&");
20
- }
21
- }
22
- return output ? "?".concat(output.replace(/&+$/, "")) : "";
23
- }
24
- exports.buildUrlQueryString = buildUrlQueryString;
25
- exports.default = buildUrlQueryString;
@@ -1,2 +0,0 @@
1
- export declare const capitalize: <T extends string>(string?: T | null | undefined) => Capitalize<T>;
2
- export default capitalize;
package/cjs/capitalize.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.capitalize = void 0;
4
- var capitalize = function (string) {
5
- return ((string || "").charAt(0).toUpperCase() +
6
- (string || "").slice(1));
7
- };
8
- exports.capitalize = capitalize;
9
- exports.default = exports.capitalize;
@@ -1,3 +0,0 @@
1
- import { type PascalCaseOptions } from "./changeCaseHelpers";
2
- export declare const changeCaseCamel: (input: string, options?: PascalCaseOptions) => string;
3
- export default changeCaseCamel;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.changeCaseCamel = void 0;
4
- var tslib_1 = require("tslib");
5
- var changeCaseHelpers_1 = require("./changeCaseHelpers");
6
- var changeCaseCamel = function (input, options) {
7
- var _a;
8
- var _b = tslib_1.__read((0, changeCaseHelpers_1.splitPrefixSuffix)(input, options), 3), prefix = _b[0], words = _b[1], suffix = _b[2];
9
- var lower = (0, changeCaseHelpers_1.lowerFactory)(options === null || options === void 0 ? void 0 : options.locale);
10
- var upper = (0, changeCaseHelpers_1.upperFactory)(options === null || options === void 0 ? void 0 : options.locale);
11
- var transform = (options === null || options === void 0 ? void 0 : options.mergeAmbiguousCharacters)
12
- ? (0, changeCaseHelpers_1.capitalCaseTransformFactory)(lower, upper)
13
- : (0, changeCaseHelpers_1.pascalCaseTransformFactory)(lower, upper);
14
- return (prefix +
15
- words
16
- .map(function (word, index) {
17
- if (index === 0)
18
- return lower(word);
19
- return transform(word, index);
20
- })
21
- .join((_a = options === null || options === void 0 ? void 0 : options.delimiter) !== null && _a !== void 0 ? _a : "") +
22
- suffix);
23
- };
24
- exports.changeCaseCamel = changeCaseCamel;
25
- exports.default = exports.changeCaseCamel;
@@ -1,3 +0,0 @@
1
- import { type Options } from "./changeCaseHelpers";
2
- export declare const changeCaseCapital: (input: string, options?: Options) => string;
3
- export default changeCaseCapital;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.changeCaseCapital = void 0;
4
- var tslib_1 = require("tslib");
5
- var changeCaseHelpers_1 = require("./changeCaseHelpers");
6
- var changeCaseCapital = function (input, options) {
7
- var _a;
8
- var _b = tslib_1.__read((0, changeCaseHelpers_1.splitPrefixSuffix)(input, options), 3), prefix = _b[0], words = _b[1], suffix = _b[2];
9
- var lower = (0, changeCaseHelpers_1.lowerFactory)(options === null || options === void 0 ? void 0 : options.locale);
10
- var upper = (0, changeCaseHelpers_1.upperFactory)(options === null || options === void 0 ? void 0 : options.locale);
11
- return (prefix +
12
- words
13
- .map((0, changeCaseHelpers_1.capitalCaseTransformFactory)(lower, upper))
14
- .join((_a = options === null || options === void 0 ? void 0 : options.delimiter) !== null && _a !== void 0 ? _a : " ") +
15
- suffix);
16
- };
17
- exports.changeCaseCapital = changeCaseCapital;
18
- exports.default = exports.changeCaseCapital;
@@ -1,3 +0,0 @@
1
- import { type Options } from "./changeCaseHelpers";
2
- export declare const changeCaseConstant: (input: string, options?: Options) => string;
3
- export default changeCaseConstant;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.changeCaseConstant = void 0;
4
- var tslib_1 = require("tslib");
5
- var changeCaseHelpers_1 = require("./changeCaseHelpers");
6
- var changeCaseConstant = function (input, options) {
7
- var _a;
8
- var _b = tslib_1.__read((0, changeCaseHelpers_1.splitPrefixSuffix)(input, options), 3), prefix = _b[0], words = _b[1], suffix = _b[2];
9
- return (prefix +
10
- words.map((0, changeCaseHelpers_1.upperFactory)(options === null || options === void 0 ? void 0 : options.locale)).join((_a = options === null || options === void 0 ? void 0 : options.delimiter) !== null && _a !== void 0 ? _a : "_") +
11
- suffix);
12
- };
13
- exports.changeCaseConstant = changeCaseConstant;
14
- exports.default = exports.changeCaseConstant;
@@ -1,3 +0,0 @@
1
- import type { Options } from "./changeCaseHelpers";
2
- export declare const changeCaseDot: (input: string, options?: Options) => string;
3
- export default changeCaseDot;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.changeCaseDot = void 0;
4
- var tslib_1 = require("tslib");
5
- var changeCaseNone_1 = require("./changeCaseNone");
6
- var changeCaseDot = function (input, options) {
7
- return (0, changeCaseNone_1.changeCaseNone)(input, tslib_1.__assign({ delimiter: "." }, options));
8
- };
9
- exports.changeCaseDot = changeCaseDot;
10
- exports.default = exports.changeCaseDot;
@@ -1,19 +0,0 @@
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 function split(value: string): string[];
14
- export declare function splitSeparateNumbers(value: string): string[];
15
- export declare function lowerFactory(locale: Locale): (input: string) => string;
16
- export declare function upperFactory(locale: Locale): (input: string) => string;
17
- export declare function capitalCaseTransformFactory(lower: (input: string) => string, upper: (input: string) => string): (word: string) => string;
18
- export declare function pascalCaseTransformFactory(lower: (input: string) => string, upper: (input: string) => string): (word: string, index: number) => string;
19
- export declare function splitPrefixSuffix(input: string, options?: Options): [string, string[], string];
@@ -1,92 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.splitPrefixSuffix = exports.pascalCaseTransformFactory = exports.capitalCaseTransformFactory = exports.upperFactory = exports.lowerFactory = exports.splitSeparateNumbers = exports.split = void 0;
4
- var SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
5
- var SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
6
- var SPLIT_SEPARATE_NUMBER_RE = /(\d)\p{Ll}|(\p{L})\d/u;
7
- var DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
8
- var SPLIT_REPLACE_VALUE = "$1\0$2";
9
- var DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
10
- function split(value) {
11
- var result = value.trim();
12
- result = result
13
- .replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE)
14
- .replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
15
- result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
16
- var start = 0;
17
- var end = result.length;
18
- while (result.charAt(start) === "\0")
19
- start++;
20
- if (start === end)
21
- return [];
22
- while (result.charAt(end - 1) === "\0")
23
- end--;
24
- return result.slice(start, end).split(/\0/g);
25
- }
26
- exports.split = split;
27
- function splitSeparateNumbers(value) {
28
- var _a;
29
- var words = split(value);
30
- for (var i = 0; i < words.length; i++) {
31
- var word = words[i];
32
- var match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
33
- if (match) {
34
- var offset = match.index + ((_a = match[1]) !== null && _a !== void 0 ? _a : match[2]).length;
35
- words.splice(i, 1, word.slice(0, offset), word.slice(offset));
36
- }
37
- }
38
- return words;
39
- }
40
- exports.splitSeparateNumbers = splitSeparateNumbers;
41
- function lowerFactory(locale) {
42
- return locale === false
43
- ? function (input) { return input.toLowerCase(); }
44
- : function (input) { return input.toLocaleLowerCase(locale); };
45
- }
46
- exports.lowerFactory = lowerFactory;
47
- function upperFactory(locale) {
48
- return locale === false
49
- ? function (input) { return input.toUpperCase(); }
50
- : function (input) { return input.toLocaleUpperCase(locale); };
51
- }
52
- exports.upperFactory = upperFactory;
53
- function capitalCaseTransformFactory(lower, upper) {
54
- return function (word) { return "".concat(upper(word[0])).concat(lower(word.slice(1))); };
55
- }
56
- exports.capitalCaseTransformFactory = capitalCaseTransformFactory;
57
- function pascalCaseTransformFactory(lower, upper) {
58
- return function (word, index) {
59
- var char0 = word[0];
60
- var initial = index > 0 && char0 >= "0" && char0 <= "9" ? "_" + char0 : upper(char0);
61
- return initial + lower(word.slice(1));
62
- };
63
- }
64
- exports.pascalCaseTransformFactory = pascalCaseTransformFactory;
65
- function splitPrefixSuffix(input, options) {
66
- var _a, _b, _c;
67
- if (options === void 0) { options = {}; }
68
- var splitFn = (_a = options.split) !== null && _a !== void 0 ? _a : (options.separateNumbers ? splitSeparateNumbers : split);
69
- var prefixCharacters = (_b = options.prefixCharacters) !== null && _b !== void 0 ? _b : DEFAULT_PREFIX_SUFFIX_CHARACTERS;
70
- var suffixCharacters = (_c = options.suffixCharacters) !== null && _c !== void 0 ? _c : DEFAULT_PREFIX_SUFFIX_CHARACTERS;
71
- var prefixIndex = 0;
72
- var suffixIndex = input.length;
73
- while (prefixIndex < input.length) {
74
- var char = input.charAt(prefixIndex);
75
- if (!prefixCharacters.includes(char))
76
- break;
77
- prefixIndex++;
78
- }
79
- while (suffixIndex > prefixIndex) {
80
- var index = suffixIndex - 1;
81
- var char = input.charAt(index);
82
- if (!suffixCharacters.includes(char))
83
- break;
84
- suffixIndex = index;
85
- }
86
- return [
87
- input.slice(0, prefixIndex),
88
- splitFn(input.slice(prefixIndex, suffixIndex)),
89
- input.slice(suffixIndex),
90
- ];
91
- }
92
- exports.splitPrefixSuffix = splitPrefixSuffix;
@@ -1,3 +0,0 @@
1
- import type { Options } from "./changeCaseHelpers";
2
- export declare const changeCaseKebab: (input: string, options?: Options) => string;
3
- export default changeCaseKebab;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.changeCaseKebab = void 0;
4
- var tslib_1 = require("tslib");
5
- var changeCaseNone_1 = require("./changeCaseNone");
6
- var changeCaseKebab = function (input, options) {
7
- return (0, changeCaseNone_1.changeCaseNone)(input, tslib_1.__assign({ delimiter: "-" }, options));
8
- };
9
- exports.changeCaseKebab = changeCaseKebab;
10
- exports.default = exports.changeCaseKebab;
@@ -1,3 +0,0 @@
1
- import { type Options } from "./changeCaseHelpers";
2
- export declare const changeCaseNone: (input: string, options?: Options) => string;
3
- export default changeCaseNone;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.changeCaseNone = void 0;
4
- var tslib_1 = require("tslib");
5
- var changeCaseHelpers_1 = require("./changeCaseHelpers");
6
- var changeCaseNone = function (input, options) {
7
- var _a;
8
- var _b = tslib_1.__read((0, changeCaseHelpers_1.splitPrefixSuffix)(input, options), 3), prefix = _b[0], words = _b[1], suffix = _b[2];
9
- return (prefix +
10
- words.map((0, changeCaseHelpers_1.lowerFactory)(options === null || options === void 0 ? void 0 : options.locale)).join((_a = options === null || options === void 0 ? void 0 : options.delimiter) !== null && _a !== void 0 ? _a : " ") +
11
- suffix);
12
- };
13
- exports.changeCaseNone = changeCaseNone;
14
- exports.default = exports.changeCaseNone;
@@ -1,3 +0,0 @@
1
- import { PascalCaseOptions } from "./changeCaseHelpers";
2
- export declare const changeCasePascal: (input: string, options?: PascalCaseOptions) => string;
3
- export default changeCasePascal;