es-toolkit 1.13.1-dev.332 → 1.13.1-dev.334

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 (735) hide show
  1. package/dist/_chunk/index-CwRt_M.js +47 -0
  2. package/dist/_chunk/index-CwRt_M.js.map +1 -0
  3. package/dist/_chunk/isPlainObject-bK22pA.js +24 -0
  4. package/dist/_chunk/isPlainObject-bK22pA.js.map +1 -0
  5. package/dist/_chunk/randomInt-CF7bZK.js +20 -0
  6. package/dist/_chunk/randomInt-CF7bZK.js.map +1 -0
  7. package/dist/_chunk/union-CdQeDK.js +13 -0
  8. package/dist/_chunk/union-CdQeDK.js.map +1 -0
  9. package/dist/array/chunk.mjs +16 -8
  10. package/dist/array/chunk.mjs.map +1 -1
  11. package/dist/array/compact.mjs +12 -8
  12. package/dist/array/compact.mjs.map +1 -1
  13. package/dist/array/countBy.mjs +11 -8
  14. package/dist/array/countBy.mjs.map +1 -1
  15. package/dist/array/difference.mjs +7 -8
  16. package/dist/array/difference.mjs.map +1 -1
  17. package/dist/array/differenceBy.mjs +9 -8
  18. package/dist/array/differenceBy.mjs.map +1 -1
  19. package/dist/array/differenceWith.mjs +10 -8
  20. package/dist/array/differenceWith.mjs.map +1 -1
  21. package/dist/array/drop.mjs +7 -8
  22. package/dist/array/drop.mjs.map +1 -1
  23. package/dist/array/dropRight.mjs +10 -8
  24. package/dist/array/dropRight.mjs.map +1 -1
  25. package/dist/array/dropRightWhile.mjs +11 -8
  26. package/dist/array/dropRightWhile.mjs.map +1 -1
  27. package/dist/array/dropWhile.mjs +10 -8
  28. package/dist/array/dropWhile.mjs.map +1 -1
  29. package/dist/array/fill.mjs +12 -8
  30. package/dist/array/fill.mjs.map +1 -1
  31. package/dist/array/flatMap.mjs +8 -9
  32. package/dist/array/flatMap.mjs.map +1 -1
  33. package/dist/array/flatten.mjs +19 -8
  34. package/dist/array/flatten.mjs.map +1 -1
  35. package/dist/array/flattenDeep.mjs +8 -9
  36. package/dist/array/flattenDeep.mjs.map +1 -1
  37. package/dist/array/forEachRight.mjs +9 -8
  38. package/dist/array/forEachRight.mjs.map +1 -1
  39. package/dist/array/groupBy.mjs +14 -8
  40. package/dist/array/groupBy.mjs.map +1 -1
  41. package/dist/array/head.mjs +6 -8
  42. package/dist/array/head.mjs.map +1 -1
  43. package/dist/array/index.js +353 -498
  44. package/dist/array/index.js.map +1 -1
  45. package/dist/array/index.mjs +52 -211
  46. package/dist/array/index.mjs.map +1 -1
  47. package/dist/array/initial.mjs +9 -8
  48. package/dist/array/initial.mjs.map +1 -1
  49. package/dist/array/intersection.mjs +9 -8
  50. package/dist/array/intersection.mjs.map +1 -1
  51. package/dist/array/intersectionBy.mjs +7 -8
  52. package/dist/array/intersectionBy.mjs.map +1 -1
  53. package/dist/array/intersectionWith.mjs +10 -8
  54. package/dist/array/intersectionWith.mjs.map +1 -1
  55. package/dist/array/keyBy.mjs +11 -8
  56. package/dist/array/keyBy.mjs.map +1 -1
  57. package/dist/array/last.mjs +6 -8
  58. package/dist/array/last.mjs.map +1 -1
  59. package/dist/array/maxBy.mjs +15 -8
  60. package/dist/array/maxBy.mjs.map +1 -1
  61. package/dist/array/minBy.mjs +15 -8
  62. package/dist/array/minBy.mjs.map +1 -1
  63. package/dist/array/orderBy.mjs +26 -8
  64. package/dist/array/orderBy.mjs.map +1 -1
  65. package/dist/array/partition.mjs +16 -8
  66. package/dist/array/partition.mjs.map +1 -1
  67. package/dist/array/sample.mjs +7 -8
  68. package/dist/array/sample.mjs.map +1 -1
  69. package/dist/array/sampleSize.mjs +21 -10
  70. package/dist/array/sampleSize.mjs.map +1 -1
  71. package/dist/array/shuffle.mjs +11 -8
  72. package/dist/array/shuffle.mjs.map +1 -1
  73. package/dist/array/tail.mjs +14 -8
  74. package/dist/array/tail.mjs.map +1 -1
  75. package/dist/array/take.mjs +6 -8
  76. package/dist/array/take.mjs.map +1 -1
  77. package/dist/array/takeRight.mjs +9 -8
  78. package/dist/array/takeRight.mjs.map +1 -1
  79. package/dist/array/takeRightWhile.mjs +11 -8
  80. package/dist/array/takeRightWhile.mjs.map +1 -1
  81. package/dist/array/takeWhile.mjs +13 -8
  82. package/dist/array/takeWhile.mjs.map +1 -1
  83. package/dist/array/toFilled.mjs +13 -8
  84. package/dist/array/toFilled.mjs.map +1 -1
  85. package/dist/array/union.mjs +8 -9
  86. package/dist/array/union.mjs.map +1 -1
  87. package/dist/array/unionBy.mjs +13 -8
  88. package/dist/array/unionBy.mjs.map +1 -1
  89. package/dist/array/unionWith.mjs +8 -9
  90. package/dist/array/unionWith.mjs.map +1 -1
  91. package/dist/array/uniq.mjs +6 -8
  92. package/dist/array/uniq.mjs.map +1 -1
  93. package/dist/array/uniqBy.mjs +13 -8
  94. package/dist/array/uniqBy.mjs.map +1 -1
  95. package/dist/array/uniqWith.mjs +13 -8
  96. package/dist/array/uniqWith.mjs.map +1 -1
  97. package/dist/array/unzip.mjs +19 -8
  98. package/dist/array/unzip.mjs.map +1 -1
  99. package/dist/array/unzipWith.mjs +15 -8
  100. package/dist/array/unzipWith.mjs.map +1 -1
  101. package/dist/array/without.mjs +7 -8
  102. package/dist/array/without.mjs.map +1 -1
  103. package/dist/array/xor.mjs +10 -12
  104. package/dist/array/xor.mjs.map +1 -1
  105. package/dist/array/xorBy.mjs +12 -11
  106. package/dist/array/xorBy.mjs.map +1 -1
  107. package/dist/array/xorWith.mjs +12 -12
  108. package/dist/array/xorWith.mjs.map +1 -1
  109. package/dist/array/zip.mjs +15 -8
  110. package/dist/array/zip.mjs.map +1 -1
  111. package/dist/array/zipObject.mjs +10 -8
  112. package/dist/array/zipObject.mjs.map +1 -1
  113. package/dist/array/zipWith.mjs +14 -8
  114. package/dist/array/zipWith.mjs.map +1 -1
  115. package/dist/compat/_internal/isDeepKey.mjs +16 -0
  116. package/dist/compat/_internal/isDeepKey.mjs.map +1 -0
  117. package/dist/compat/_internal/isIndex.mjs +17 -0
  118. package/dist/compat/_internal/isIndex.mjs.map +1 -0
  119. package/dist/compat/_internal/toPath.mjs +41 -0
  120. package/dist/compat/_internal/toPath.mjs.map +1 -0
  121. package/dist/compat/array/chunk.d.mts +26 -0
  122. package/dist/compat/array/chunk.d.ts +26 -0
  123. package/dist/compat/array/chunk.mjs +12 -0
  124. package/dist/compat/array/chunk.mjs.map +1 -0
  125. package/dist/compat/array/concat.d.mts +30 -0
  126. package/dist/compat/array/concat.d.ts +30 -0
  127. package/dist/compat/array/concat.mjs +8 -0
  128. package/dist/compat/array/concat.mjs.map +1 -0
  129. package/dist/compat/array/difference.d.mts +3 -0
  130. package/dist/compat/array/difference.d.ts +3 -0
  131. package/dist/compat/array/difference.mjs +11 -0
  132. package/dist/compat/array/difference.mjs.map +1 -0
  133. package/dist/compat/array/fill.d.mts +33 -0
  134. package/dist/compat/array/fill.d.ts +33 -0
  135. package/dist/compat/array/fill.mjs +16 -0
  136. package/dist/compat/array/fill.mjs.map +1 -0
  137. package/dist/compat/array/zipObjectDeep.d.mts +37 -0
  138. package/dist/compat/array/zipObjectDeep.d.ts +37 -0
  139. package/dist/compat/array/zipObjectDeep.mjs +17 -0
  140. package/dist/compat/array/zipObjectDeep.mjs.map +1 -0
  141. package/dist/compat/index.d.mts +14 -546
  142. package/dist/compat/index.d.ts +14 -546
  143. package/dist/compat/index.js +287 -1498
  144. package/dist/compat/index.js.map +1 -1
  145. package/dist/compat/index.mjs +106 -415
  146. package/dist/compat/index.mjs.map +1 -1
  147. package/dist/compat/math/max.d.mts +19 -0
  148. package/dist/compat/math/max.d.ts +19 -0
  149. package/dist/compat/math/max.mjs +14 -0
  150. package/dist/compat/math/max.mjs.map +1 -0
  151. package/dist/compat/math/min.d.mts +19 -0
  152. package/dist/compat/math/min.d.ts +19 -0
  153. package/dist/compat/math/min.mjs +14 -0
  154. package/dist/compat/math/min.mjs.map +1 -0
  155. package/dist/compat/object/get.d.mts +247 -0
  156. package/dist/compat/object/get.d.ts +247 -0
  157. package/dist/compat/object/get.mjs +34 -0
  158. package/dist/compat/object/get.mjs.map +1 -0
  159. package/dist/compat/object/get.types.d.mts +9 -0
  160. package/dist/compat/object/get.types.d.ts +9 -0
  161. package/dist/compat/object/set.d.mts +30 -0
  162. package/dist/compat/object/set.d.ts +30 -0
  163. package/dist/compat/object/set.mjs +25 -0
  164. package/dist/compat/object/set.mjs.map +1 -0
  165. package/dist/compat/predicate/isArray.d.mts +24 -0
  166. package/dist/compat/predicate/isArray.d.ts +24 -0
  167. package/dist/compat/predicate/isArray.mjs +6 -0
  168. package/dist/compat/predicate/isArray.mjs.map +1 -0
  169. package/dist/compat/predicate/isPlainObject.d.mts +25 -0
  170. package/dist/compat/predicate/isPlainObject.d.ts +25 -0
  171. package/dist/compat/predicate/isPlainObject.mjs +30 -0
  172. package/dist/compat/predicate/isPlainObject.mjs.map +1 -0
  173. package/dist/compat/predicate/isTypedArray.d.mts +19 -0
  174. package/dist/compat/predicate/isTypedArray.d.ts +19 -0
  175. package/dist/compat/predicate/isTypedArray.mjs +8 -0
  176. package/dist/compat/predicate/isTypedArray.mjs.map +1 -0
  177. package/dist/compat/string/endsWith.d.mts +20 -0
  178. package/dist/compat/string/endsWith.d.ts +20 -0
  179. package/dist/compat/string/endsWith.mjs +6 -0
  180. package/dist/compat/string/endsWith.mjs.map +1 -0
  181. package/dist/compat/string/startsWith.d.mts +20 -0
  182. package/dist/compat/string/startsWith.d.ts +20 -0
  183. package/dist/compat/string/startsWith.mjs +6 -0
  184. package/dist/compat/string/startsWith.mjs.map +1 -0
  185. package/dist/error/AbortError.mjs +9 -8
  186. package/dist/error/AbortError.mjs.map +1 -1
  187. package/dist/error/TimeoutError.mjs +9 -8
  188. package/dist/error/TimeoutError.mjs.map +1 -1
  189. package/dist/function/after.mjs +14 -7
  190. package/dist/function/after.mjs.map +1 -1
  191. package/dist/function/debounce.mjs +29 -8
  192. package/dist/function/debounce.mjs.map +1 -1
  193. package/dist/function/index.js +66 -102
  194. package/dist/function/index.js.map +1 -1
  195. package/dist/function/index.mjs +7 -29
  196. package/dist/function/index.mjs.map +1 -1
  197. package/dist/function/negate.mjs +6 -8
  198. package/dist/function/negate.mjs.map +1 -1
  199. package/dist/function/noop.mjs +4 -8
  200. package/dist/function/noop.mjs.map +1 -1
  201. package/dist/function/once.mjs +16 -8
  202. package/dist/function/once.mjs.map +1 -1
  203. package/dist/function/throttle.mjs +14 -8
  204. package/dist/function/throttle.mjs.map +1 -1
  205. package/dist/index.js +114 -1307
  206. package/dist/index.js.map +1 -1
  207. package/dist/index.mjs +97 -399
  208. package/dist/index.mjs.map +1 -1
  209. package/dist/math/clamp.mjs +9 -8
  210. package/dist/math/clamp.mjs.map +1 -1
  211. package/dist/math/inRange.mjs +13 -8
  212. package/dist/math/inRange.mjs.map +1 -1
  213. package/dist/math/index.js +59 -115
  214. package/dist/math/index.js.map +1 -1
  215. package/dist/math/index.mjs +11 -45
  216. package/dist/math/index.mjs.map +1 -1
  217. package/dist/math/mean.mjs +8 -9
  218. package/dist/math/mean.mjs.map +1 -1
  219. package/dist/math/meanBy.mjs +9 -10
  220. package/dist/math/meanBy.mjs.map +1 -1
  221. package/dist/math/random.mjs +13 -8
  222. package/dist/math/random.mjs.map +1 -1
  223. package/dist/math/randomInt.mjs +8 -9
  224. package/dist/math/randomInt.mjs.map +1 -1
  225. package/dist/math/range.mjs +21 -8
  226. package/dist/math/range.mjs.map +1 -1
  227. package/dist/math/round.mjs +10 -8
  228. package/dist/math/round.mjs.map +1 -1
  229. package/dist/math/sum.mjs +10 -8
  230. package/dist/math/sum.mjs.map +1 -1
  231. package/dist/math/sumBy.mjs +9 -9
  232. package/dist/math/sumBy.mjs.map +1 -1
  233. package/dist/object/clone.mjs +40 -8
  234. package/dist/object/clone.mjs.map +1 -1
  235. package/dist/object/cloneDeep.mjs +100 -8
  236. package/dist/object/cloneDeep.mjs.map +1 -1
  237. package/dist/object/flattenObject.mjs +29 -9
  238. package/dist/object/flattenObject.mjs.map +1 -1
  239. package/dist/object/index.js +184 -232
  240. package/dist/object/index.js.map +1 -1
  241. package/dist/object/index.mjs +9 -38
  242. package/dist/object/index.mjs.map +1 -1
  243. package/dist/object/invert.mjs +13 -8
  244. package/dist/object/invert.mjs.map +1 -1
  245. package/dist/object/omit.mjs +10 -8
  246. package/dist/object/omit.mjs.map +1 -1
  247. package/dist/object/omitBy.mjs +13 -8
  248. package/dist/object/omitBy.mjs.map +1 -1
  249. package/dist/object/pick.mjs +10 -8
  250. package/dist/object/pick.mjs.map +1 -1
  251. package/dist/object/pickBy.mjs +13 -8
  252. package/dist/object/pickBy.mjs.map +1 -1
  253. package/dist/predicate/index.js +65 -126
  254. package/dist/predicate/index.js.map +1 -1
  255. package/dist/predicate/index.mjs +12 -51
  256. package/dist/predicate/index.mjs.map +1 -1
  257. package/dist/predicate/isArrayLike.mjs +9 -9
  258. package/dist/predicate/isArrayLike.mjs.map +1 -1
  259. package/dist/predicate/isEqual.mjs +36 -10
  260. package/dist/predicate/isEqual.mjs.map +1 -1
  261. package/dist/predicate/isFunction.mjs +6 -8
  262. package/dist/predicate/isFunction.mjs.map +1 -1
  263. package/dist/predicate/isLength.mjs +6 -8
  264. package/dist/predicate/isLength.mjs.map +1 -1
  265. package/dist/predicate/isNil.mjs +6 -8
  266. package/dist/predicate/isNil.mjs.map +1 -1
  267. package/dist/predicate/isNotNil.mjs +6 -8
  268. package/dist/predicate/isNotNil.mjs.map +1 -1
  269. package/dist/predicate/isNull.mjs +6 -8
  270. package/dist/predicate/isNull.mjs.map +1 -1
  271. package/dist/predicate/isPlainObject.mjs +22 -8
  272. package/dist/predicate/isPlainObject.mjs.map +1 -1
  273. package/dist/predicate/isPrimitive.mjs +6 -8
  274. package/dist/predicate/isPrimitive.mjs.map +1 -1
  275. package/dist/predicate/isTypedArray.mjs +16 -8
  276. package/dist/predicate/isTypedArray.mjs.map +1 -1
  277. package/dist/predicate/isUndefined.mjs +6 -8
  278. package/dist/predicate/isUndefined.mjs.map +1 -1
  279. package/dist/promise/delay.mjs +21 -9
  280. package/dist/promise/delay.mjs.map +1 -1
  281. package/dist/promise/index.js +6 -72
  282. package/dist/promise/index.js.map +1 -1
  283. package/dist/promise/index.mjs +3 -16
  284. package/dist/promise/index.mjs.map +1 -1
  285. package/dist/promise/timeout.mjs +10 -11
  286. package/dist/promise/timeout.mjs.map +1 -1
  287. package/dist/promise/withTimeout.mjs +8 -12
  288. package/dist/promise/withTimeout.mjs.map +1 -1
  289. package/dist/string/_internal/getWords.mjs +7 -0
  290. package/dist/string/_internal/getWords.mjs.map +1 -0
  291. package/dist/string/camelCase.mjs +14 -10
  292. package/dist/string/camelCase.mjs.map +1 -1
  293. package/dist/string/capitalize.mjs +5 -7
  294. package/dist/string/capitalize.mjs.map +1 -1
  295. package/dist/string/index.js +42 -77
  296. package/dist/string/index.js.map +1 -1
  297. package/dist/string/index.mjs +7 -30
  298. package/dist/string/index.mjs.map +1 -1
  299. package/dist/string/kebabCase.mjs +8 -8
  300. package/dist/string/kebabCase.mjs.map +1 -1
  301. package/dist/string/lowerCase.mjs +8 -8
  302. package/dist/string/lowerCase.mjs.map +1 -1
  303. package/dist/string/snakeCase.mjs +8 -8
  304. package/dist/string/snakeCase.mjs.map +1 -1
  305. package/dist/string/startCase.mjs +21 -9
  306. package/dist/string/startCase.mjs.map +1 -1
  307. package/package.json +8 -2
  308. package/umd/browser.global.js +2 -2
  309. package/umd/browser.global.js.map +1 -0
  310. package/dist/array/chunk.js +0 -43
  311. package/dist/array/chunk.js.map +0 -1
  312. package/dist/array/compact.js +0 -39
  313. package/dist/array/compact.js.map +0 -1
  314. package/dist/array/countBy.js +0 -38
  315. package/dist/array/countBy.js.map +0 -1
  316. package/dist/array/difference.js +0 -34
  317. package/dist/array/difference.js.map +0 -1
  318. package/dist/array/differenceBy.js +0 -36
  319. package/dist/array/differenceBy.js.map +0 -1
  320. package/dist/array/differenceWith.js +0 -37
  321. package/dist/array/differenceWith.js.map +0 -1
  322. package/dist/array/drop.js +0 -34
  323. package/dist/array/drop.js.map +0 -1
  324. package/dist/array/dropRight.js +0 -37
  325. package/dist/array/dropRight.js.map +0 -1
  326. package/dist/array/dropRightWhile.js +0 -38
  327. package/dist/array/dropRightWhile.js.map +0 -1
  328. package/dist/array/dropWhile.js +0 -37
  329. package/dist/array/dropWhile.js.map +0 -1
  330. package/dist/array/fill.js +0 -39
  331. package/dist/array/fill.js.map +0 -1
  332. package/dist/array/flatMap.js +0 -52
  333. package/dist/array/flatMap.js.map +0 -1
  334. package/dist/array/flatten.js +0 -45
  335. package/dist/array/flatten.js.map +0 -1
  336. package/dist/array/flattenDeep.js +0 -52
  337. package/dist/array/flattenDeep.js.map +0 -1
  338. package/dist/array/forEachRight.js +0 -36
  339. package/dist/array/forEachRight.js.map +0 -1
  340. package/dist/array/groupBy.js +0 -41
  341. package/dist/array/groupBy.js.map +0 -1
  342. package/dist/array/head.js +0 -33
  343. package/dist/array/head.js.map +0 -1
  344. package/dist/array/initial.js +0 -36
  345. package/dist/array/initial.js.map +0 -1
  346. package/dist/array/intersection.js +0 -36
  347. package/dist/array/intersection.js.map +0 -1
  348. package/dist/array/intersectionBy.js +0 -34
  349. package/dist/array/intersectionBy.js.map +0 -1
  350. package/dist/array/intersectionWith.js +0 -37
  351. package/dist/array/intersectionWith.js.map +0 -1
  352. package/dist/array/keyBy.js +0 -38
  353. package/dist/array/keyBy.js.map +0 -1
  354. package/dist/array/last.js +0 -33
  355. package/dist/array/last.js.map +0 -1
  356. package/dist/array/maxBy.js +0 -42
  357. package/dist/array/maxBy.js.map +0 -1
  358. package/dist/array/minBy.js +0 -42
  359. package/dist/array/minBy.js.map +0 -1
  360. package/dist/array/orderBy.js +0 -53
  361. package/dist/array/orderBy.js.map +0 -1
  362. package/dist/array/partition.js +0 -42
  363. package/dist/array/partition.js.map +0 -1
  364. package/dist/array/sample.js +0 -34
  365. package/dist/array/sample.js.map +0 -1
  366. package/dist/array/sampleSize.js +0 -65
  367. package/dist/array/sampleSize.js.map +0 -1
  368. package/dist/array/shuffle.js +0 -38
  369. package/dist/array/shuffle.js.map +0 -1
  370. package/dist/array/tail.js +0 -41
  371. package/dist/array/tail.js.map +0 -1
  372. package/dist/array/take.js +0 -33
  373. package/dist/array/take.js.map +0 -1
  374. package/dist/array/takeRight.js +0 -36
  375. package/dist/array/takeRight.js.map +0 -1
  376. package/dist/array/takeRightWhile.js +0 -38
  377. package/dist/array/takeRightWhile.js.map +0 -1
  378. package/dist/array/takeWhile.js +0 -40
  379. package/dist/array/takeWhile.js.map +0 -1
  380. package/dist/array/toFilled.js +0 -40
  381. package/dist/array/toFilled.js.map +0 -1
  382. package/dist/array/union.js +0 -40
  383. package/dist/array/union.js.map +0 -1
  384. package/dist/array/unionBy.js +0 -40
  385. package/dist/array/unionBy.js.map +0 -1
  386. package/dist/array/unionWith.js +0 -47
  387. package/dist/array/unionWith.js.map +0 -1
  388. package/dist/array/uniq.js +0 -33
  389. package/dist/array/uniq.js.map +0 -1
  390. package/dist/array/uniqBy.js +0 -40
  391. package/dist/array/uniqBy.js.map +0 -1
  392. package/dist/array/uniqWith.js +0 -40
  393. package/dist/array/uniqWith.js.map +0 -1
  394. package/dist/array/unzip.js +0 -46
  395. package/dist/array/unzip.js.map +0 -1
  396. package/dist/array/unzipWith.js +0 -42
  397. package/dist/array/unzipWith.js.map +0 -1
  398. package/dist/array/without.js +0 -34
  399. package/dist/array/without.js.map +0 -1
  400. package/dist/array/xor.js +0 -59
  401. package/dist/array/xor.js.map +0 -1
  402. package/dist/array/xorBy.js +0 -63
  403. package/dist/array/xorBy.js.map +0 -1
  404. package/dist/array/xorWith.js +0 -72
  405. package/dist/array/xorWith.js.map +0 -1
  406. package/dist/array/zip.js +0 -42
  407. package/dist/array/zip.js.map +0 -1
  408. package/dist/array/zipObject.js +0 -37
  409. package/dist/array/zipObject.js.map +0 -1
  410. package/dist/array/zipWith.js +0 -41
  411. package/dist/array/zipWith.js.map +0 -1
  412. package/dist/browser.d.mts +0 -2
  413. package/dist/browser.d.ts +0 -2
  414. package/dist/browser.js +0 -1440
  415. package/dist/browser.js.map +0 -1
  416. package/dist/browser.mjs +0 -115
  417. package/dist/browser.mjs.map +0 -1
  418. package/dist/chunk-237HGSZS.mjs +0 -16
  419. package/dist/chunk-237HGSZS.mjs.map +0 -1
  420. package/dist/chunk-27QMXBLJ.mjs +0 -9
  421. package/dist/chunk-27QMXBLJ.mjs.map +0 -1
  422. package/dist/chunk-2IXFGSUA.mjs +0 -16
  423. package/dist/chunk-2IXFGSUA.mjs.map +0 -1
  424. package/dist/chunk-2KNLZB7V.mjs +0 -10
  425. package/dist/chunk-2KNLZB7V.mjs.map +0 -1
  426. package/dist/chunk-2SLTL4KL.mjs +0 -13
  427. package/dist/chunk-2SLTL4KL.mjs.map +0 -1
  428. package/dist/chunk-2ZCITDMK.mjs +0 -13
  429. package/dist/chunk-2ZCITDMK.mjs.map +0 -1
  430. package/dist/chunk-33MSBDC6.mjs +0 -21
  431. package/dist/chunk-33MSBDC6.mjs.map +0 -1
  432. package/dist/chunk-3EZAFZG3.mjs +0 -10
  433. package/dist/chunk-3EZAFZG3.mjs.map +0 -1
  434. package/dist/chunk-3SBT6WDU.mjs +0 -25
  435. package/dist/chunk-3SBT6WDU.mjs.map +0 -1
  436. package/dist/chunk-4DFAGGIM.mjs +0 -26
  437. package/dist/chunk-4DFAGGIM.mjs.map +0 -1
  438. package/dist/chunk-4OIZM4HS.mjs +0 -1
  439. package/dist/chunk-4OIZM4HS.mjs.map +0 -1
  440. package/dist/chunk-4ZES5T6V.mjs +0 -21
  441. package/dist/chunk-4ZES5T6V.mjs.map +0 -1
  442. package/dist/chunk-5ASRKEB4.mjs +0 -13
  443. package/dist/chunk-5ASRKEB4.mjs.map +0 -1
  444. package/dist/chunk-5F26PFZL.mjs +0 -32
  445. package/dist/chunk-5F26PFZL.mjs.map +0 -1
  446. package/dist/chunk-5L4VWRFX.mjs +0 -14
  447. package/dist/chunk-5L4VWRFX.mjs.map +0 -1
  448. package/dist/chunk-5PMKOZ2F.mjs +0 -13
  449. package/dist/chunk-5PMKOZ2F.mjs.map +0 -1
  450. package/dist/chunk-6CLH5YZ2.mjs +0 -16
  451. package/dist/chunk-6CLH5YZ2.mjs.map +0 -1
  452. package/dist/chunk-6NVQAHXP.mjs +0 -13
  453. package/dist/chunk-6NVQAHXP.mjs.map +0 -1
  454. package/dist/chunk-74CREQXW.mjs +0 -9
  455. package/dist/chunk-74CREQXW.mjs.map +0 -1
  456. package/dist/chunk-7B7W36UP.mjs +0 -29
  457. package/dist/chunk-7B7W36UP.mjs.map +0 -1
  458. package/dist/chunk-7GXKT3VW.mjs +0 -41
  459. package/dist/chunk-7GXKT3VW.mjs.map +0 -1
  460. package/dist/chunk-AIRSKN47.mjs +0 -9
  461. package/dist/chunk-AIRSKN47.mjs.map +0 -1
  462. package/dist/chunk-AJKZMN2V.mjs +0 -14
  463. package/dist/chunk-AJKZMN2V.mjs.map +0 -1
  464. package/dist/chunk-B4COTK4K.mjs +0 -16
  465. package/dist/chunk-B4COTK4K.mjs.map +0 -1
  466. package/dist/chunk-BCTYOXT7.mjs +0 -16
  467. package/dist/chunk-BCTYOXT7.mjs.map +0 -1
  468. package/dist/chunk-BGWHVWY4.mjs +0 -13
  469. package/dist/chunk-BGWHVWY4.mjs.map +0 -1
  470. package/dist/chunk-BH6HLGBA.mjs +0 -16
  471. package/dist/chunk-BH6HLGBA.mjs.map +0 -1
  472. package/dist/chunk-BMRTZMRE.mjs +0 -9
  473. package/dist/chunk-BMRTZMRE.mjs.map +0 -1
  474. package/dist/chunk-BOOQBJN2.mjs +0 -9
  475. package/dist/chunk-BOOQBJN2.mjs.map +0 -1
  476. package/dist/chunk-CMBC4MXG.mjs +0 -19
  477. package/dist/chunk-CMBC4MXG.mjs.map +0 -1
  478. package/dist/chunk-DDH7K4QM.mjs +0 -1
  479. package/dist/chunk-DDH7K4QM.mjs.map +0 -1
  480. package/dist/chunk-DLS7UJKJ.mjs +0 -17
  481. package/dist/chunk-DLS7UJKJ.mjs.map +0 -1
  482. package/dist/chunk-DN3NOZ3H.mjs +0 -18
  483. package/dist/chunk-DN3NOZ3H.mjs.map +0 -1
  484. package/dist/chunk-DPH2KE6O.mjs +0 -24
  485. package/dist/chunk-DPH2KE6O.mjs.map +0 -1
  486. package/dist/chunk-DTTKJ3VC.mjs +0 -9
  487. package/dist/chunk-DTTKJ3VC.mjs.map +0 -1
  488. package/dist/chunk-DVK2N4KC.mjs +0 -9
  489. package/dist/chunk-DVK2N4KC.mjs.map +0 -1
  490. package/dist/chunk-DXB7EZUQ.mjs +0 -12
  491. package/dist/chunk-DXB7EZUQ.mjs.map +0 -1
  492. package/dist/chunk-E6C5EZQA.mjs +0 -19
  493. package/dist/chunk-E6C5EZQA.mjs.map +0 -1
  494. package/dist/chunk-E6E4RZLN.mjs +0 -17
  495. package/dist/chunk-E6E4RZLN.mjs.map +0 -1
  496. package/dist/chunk-EHSKB6DF.mjs +0 -26
  497. package/dist/chunk-EHSKB6DF.mjs.map +0 -1
  498. package/dist/chunk-ET33L3MQ.mjs +0 -14
  499. package/dist/chunk-ET33L3MQ.mjs.map +0 -1
  500. package/dist/chunk-EZYYB34V.mjs +0 -17
  501. package/dist/chunk-EZYYB34V.mjs.map +0 -1
  502. package/dist/chunk-F47GLYUU.mjs +0 -1
  503. package/dist/chunk-F47GLYUU.mjs.map +0 -1
  504. package/dist/chunk-FUS75PJ7.mjs +0 -1
  505. package/dist/chunk-FUS75PJ7.mjs.map +0 -1
  506. package/dist/chunk-FVVSE2F2.mjs +0 -12
  507. package/dist/chunk-FVVSE2F2.mjs.map +0 -1
  508. package/dist/chunk-FZZNWXDM.mjs +0 -9
  509. package/dist/chunk-FZZNWXDM.mjs.map +0 -1
  510. package/dist/chunk-G7UQ5PUR.mjs +0 -14
  511. package/dist/chunk-G7UQ5PUR.mjs.map +0 -1
  512. package/dist/chunk-GIWAOOFY.mjs +0 -13
  513. package/dist/chunk-GIWAOOFY.mjs.map +0 -1
  514. package/dist/chunk-GTFDDKZ2.mjs +0 -15
  515. package/dist/chunk-GTFDDKZ2.mjs.map +0 -1
  516. package/dist/chunk-GZGXXIF7.mjs +0 -650
  517. package/dist/chunk-GZGXXIF7.mjs.map +0 -1
  518. package/dist/chunk-HPFDYUGP.mjs +0 -13
  519. package/dist/chunk-HPFDYUGP.mjs.map +0 -1
  520. package/dist/chunk-IEA53J7P.mjs +0 -12
  521. package/dist/chunk-IEA53J7P.mjs.map +0 -1
  522. package/dist/chunk-IFNXROZR.mjs +0 -18
  523. package/dist/chunk-IFNXROZR.mjs.map +0 -1
  524. package/dist/chunk-IJD7FE2Z.mjs +0 -18
  525. package/dist/chunk-IJD7FE2Z.mjs.map +0 -1
  526. package/dist/chunk-IWXZI3QT.mjs +0 -14
  527. package/dist/chunk-IWXZI3QT.mjs.map +0 -1
  528. package/dist/chunk-J5LGTIGS.mjs +0 -10
  529. package/dist/chunk-J5LGTIGS.mjs.map +0 -1
  530. package/dist/chunk-JCRY7ZYS.mjs +0 -22
  531. package/dist/chunk-JCRY7ZYS.mjs.map +0 -1
  532. package/dist/chunk-JPUKH67K.mjs +0 -10
  533. package/dist/chunk-JPUKH67K.mjs.map +0 -1
  534. package/dist/chunk-K5WL54BY.mjs +0 -93
  535. package/dist/chunk-K5WL54BY.mjs.map +0 -1
  536. package/dist/chunk-KIOYQRMQ.mjs +0 -12
  537. package/dist/chunk-KIOYQRMQ.mjs.map +0 -1
  538. package/dist/chunk-L7FQX5MN.mjs +0 -19
  539. package/dist/chunk-L7FQX5MN.mjs.map +0 -1
  540. package/dist/chunk-LJ2C6MVP.mjs +0 -13
  541. package/dist/chunk-LJ2C6MVP.mjs.map +0 -1
  542. package/dist/chunk-LKXCOLNY.mjs +0 -8
  543. package/dist/chunk-LKXCOLNY.mjs.map +0 -1
  544. package/dist/chunk-LPZZIY5Z.mjs +0 -13
  545. package/dist/chunk-LPZZIY5Z.mjs.map +0 -1
  546. package/dist/chunk-LVWX5B43.mjs +0 -12
  547. package/dist/chunk-LVWX5B43.mjs.map +0 -1
  548. package/dist/chunk-M7SBBYV2.mjs +0 -14
  549. package/dist/chunk-M7SBBYV2.mjs.map +0 -1
  550. package/dist/chunk-ME352XO7.mjs +0 -9
  551. package/dist/chunk-ME352XO7.mjs.map +0 -1
  552. package/dist/chunk-MIGAC7F4.mjs +0 -25
  553. package/dist/chunk-MIGAC7F4.mjs.map +0 -1
  554. package/dist/chunk-MJ7LNBI6.mjs +0 -17
  555. package/dist/chunk-MJ7LNBI6.mjs.map +0 -1
  556. package/dist/chunk-ML727RRJ.mjs +0 -13
  557. package/dist/chunk-ML727RRJ.mjs.map +0 -1
  558. package/dist/chunk-MLCL773E.mjs +0 -12
  559. package/dist/chunk-MLCL773E.mjs.map +0 -1
  560. package/dist/chunk-MY4G7R3I.mjs +0 -14
  561. package/dist/chunk-MY4G7R3I.mjs.map +0 -1
  562. package/dist/chunk-N3QYJX4T.mjs +0 -12
  563. package/dist/chunk-N3QYJX4T.mjs.map +0 -1
  564. package/dist/chunk-NFS7RWWE.mjs +0 -16
  565. package/dist/chunk-NFS7RWWE.mjs.map +0 -1
  566. package/dist/chunk-NKLIE2OI.mjs +0 -1
  567. package/dist/chunk-NKLIE2OI.mjs.map +0 -1
  568. package/dist/chunk-NTLX2MPV.mjs +0 -14
  569. package/dist/chunk-NTLX2MPV.mjs.map +0 -1
  570. package/dist/chunk-O6UXZR3U.mjs +0 -10
  571. package/dist/chunk-O6UXZR3U.mjs.map +0 -1
  572. package/dist/chunk-OG2RLT5U.mjs +0 -10
  573. package/dist/chunk-OG2RLT5U.mjs.map +0 -1
  574. package/dist/chunk-OGZMEWPR.mjs +0 -18
  575. package/dist/chunk-OGZMEWPR.mjs.map +0 -1
  576. package/dist/chunk-OLORW442.mjs +0 -18
  577. package/dist/chunk-OLORW442.mjs.map +0 -1
  578. package/dist/chunk-OLX53VEF.mjs +0 -16
  579. package/dist/chunk-OLX53VEF.mjs.map +0 -1
  580. package/dist/chunk-OOKNBU4V.mjs +0 -18
  581. package/dist/chunk-OOKNBU4V.mjs.map +0 -1
  582. package/dist/chunk-OXZCMC5I.mjs +0 -13
  583. package/dist/chunk-OXZCMC5I.mjs.map +0 -1
  584. package/dist/chunk-PJPGJ2O6.mjs +0 -15
  585. package/dist/chunk-PJPGJ2O6.mjs.map +0 -1
  586. package/dist/chunk-PYEYV7BY.mjs +0 -10
  587. package/dist/chunk-PYEYV7BY.mjs.map +0 -1
  588. package/dist/chunk-Q47NGNXT.mjs +0 -21
  589. package/dist/chunk-Q47NGNXT.mjs.map +0 -1
  590. package/dist/chunk-QOJGMVVR.mjs +0 -17
  591. package/dist/chunk-QOJGMVVR.mjs.map +0 -1
  592. package/dist/chunk-QRSJBBFY.mjs +0 -21
  593. package/dist/chunk-QRSJBBFY.mjs.map +0 -1
  594. package/dist/chunk-R6GLTTAB.mjs +0 -9
  595. package/dist/chunk-R6GLTTAB.mjs.map +0 -1
  596. package/dist/chunk-R6QA7PLZ.mjs +0 -13
  597. package/dist/chunk-R6QA7PLZ.mjs.map +0 -1
  598. package/dist/chunk-RTFTLCF3.mjs +0 -14
  599. package/dist/chunk-RTFTLCF3.mjs.map +0 -1
  600. package/dist/chunk-SXFMQQ6F.mjs +0 -9
  601. package/dist/chunk-SXFMQQ6F.mjs.map +0 -1
  602. package/dist/chunk-SYWMYQYJ.mjs +0 -16
  603. package/dist/chunk-SYWMYQYJ.mjs.map +0 -1
  604. package/dist/chunk-U56ZOM7L.mjs +0 -9
  605. package/dist/chunk-U56ZOM7L.mjs.map +0 -1
  606. package/dist/chunk-UY76KTPE.mjs +0 -13
  607. package/dist/chunk-UY76KTPE.mjs.map +0 -1
  608. package/dist/chunk-VH2PV426.mjs +0 -9
  609. package/dist/chunk-VH2PV426.mjs.map +0 -1
  610. package/dist/chunk-VRUTBJYS.mjs +0 -43
  611. package/dist/chunk-VRUTBJYS.mjs.map +0 -1
  612. package/dist/chunk-WMM7TZLG.mjs +0 -9
  613. package/dist/chunk-WMM7TZLG.mjs.map +0 -1
  614. package/dist/chunk-XGQWTHW6.mjs +0 -34
  615. package/dist/chunk-XGQWTHW6.mjs.map +0 -1
  616. package/dist/chunk-XHSIT5DL.mjs +0 -16
  617. package/dist/chunk-XHSIT5DL.mjs.map +0 -1
  618. package/dist/chunk-XI7KRD2C.mjs +0 -13
  619. package/dist/chunk-XI7KRD2C.mjs.map +0 -1
  620. package/dist/chunk-XPSOKBRZ.mjs +0 -12
  621. package/dist/chunk-XPSOKBRZ.mjs.map +0 -1
  622. package/dist/chunk-XT74R35S.mjs +0 -1
  623. package/dist/chunk-XT74R35S.mjs.map +0 -1
  624. package/dist/chunk-YOPFSFTD.mjs +0 -13
  625. package/dist/chunk-YOPFSFTD.mjs.map +0 -1
  626. package/dist/chunk-YXAOYIRV.mjs +0 -1
  627. package/dist/chunk-YXAOYIRV.mjs.map +0 -1
  628. package/dist/chunk-YXD3AQAK.mjs +0 -1
  629. package/dist/chunk-YXD3AQAK.mjs.map +0 -1
  630. package/dist/chunk-Z7HWEOQX.mjs +0 -14
  631. package/dist/chunk-Z7HWEOQX.mjs.map +0 -1
  632. package/dist/chunk-ZA2XI3OV.mjs +0 -1
  633. package/dist/chunk-ZA2XI3OV.mjs.map +0 -1
  634. package/dist/chunk-ZPNX2QDE.mjs +0 -13
  635. package/dist/chunk-ZPNX2QDE.mjs.map +0 -1
  636. package/dist/error/AbortError.js +0 -36
  637. package/dist/error/AbortError.js.map +0 -1
  638. package/dist/error/TimeoutError.js +0 -36
  639. package/dist/error/TimeoutError.js.map +0 -1
  640. package/dist/error/index.d.mts +0 -2
  641. package/dist/error/index.d.ts +0 -2
  642. package/dist/error/index.js +0 -48
  643. package/dist/error/index.js.map +0 -1
  644. package/dist/error/index.mjs +0 -13
  645. package/dist/error/index.mjs.map +0 -1
  646. package/dist/function/after.js +0 -42
  647. package/dist/function/after.js.map +0 -1
  648. package/dist/function/debounce.js +0 -56
  649. package/dist/function/debounce.js.map +0 -1
  650. package/dist/function/negate.js +0 -33
  651. package/dist/function/negate.js.map +0 -1
  652. package/dist/function/noop.js +0 -32
  653. package/dist/function/noop.js.map +0 -1
  654. package/dist/function/once.js +0 -43
  655. package/dist/function/once.js.map +0 -1
  656. package/dist/function/throttle.js +0 -41
  657. package/dist/function/throttle.js.map +0 -1
  658. package/dist/math/clamp.js +0 -36
  659. package/dist/math/clamp.js.map +0 -1
  660. package/dist/math/inRange.js +0 -40
  661. package/dist/math/inRange.js.map +0 -1
  662. package/dist/math/mean.js +0 -44
  663. package/dist/math/mean.js.map +0 -1
  664. package/dist/math/meanBy.js +0 -50
  665. package/dist/math/meanBy.js.map +0 -1
  666. package/dist/math/random.js +0 -40
  667. package/dist/math/random.js.map +0 -1
  668. package/dist/math/randomInt.js +0 -47
  669. package/dist/math/randomInt.js.map +0 -1
  670. package/dist/math/range.js +0 -48
  671. package/dist/math/range.js.map +0 -1
  672. package/dist/math/round.js +0 -37
  673. package/dist/math/round.js.map +0 -1
  674. package/dist/math/sum.js +0 -37
  675. package/dist/math/sum.js.map +0 -1
  676. package/dist/math/sumBy.js +0 -45
  677. package/dist/math/sumBy.js.map +0 -1
  678. package/dist/object/clone.js +0 -67
  679. package/dist/object/clone.js.map +0 -1
  680. package/dist/object/cloneDeep.js +0 -117
  681. package/dist/object/cloneDeep.js.map +0 -1
  682. package/dist/object/flattenObject.js +0 -77
  683. package/dist/object/flattenObject.js.map +0 -1
  684. package/dist/object/invert.js +0 -40
  685. package/dist/object/invert.js.map +0 -1
  686. package/dist/object/omit.js +0 -37
  687. package/dist/object/omit.js.map +0 -1
  688. package/dist/object/omitBy.js +0 -40
  689. package/dist/object/omitBy.js.map +0 -1
  690. package/dist/object/pick.js +0 -37
  691. package/dist/object/pick.js.map +0 -1
  692. package/dist/object/pickBy.js +0 -40
  693. package/dist/object/pickBy.js.map +0 -1
  694. package/dist/predicate/isArrayLike.js +0 -40
  695. package/dist/predicate/isArrayLike.js.map +0 -1
  696. package/dist/predicate/isEqual.js +0 -73
  697. package/dist/predicate/isEqual.js.map +0 -1
  698. package/dist/predicate/isFunction.js +0 -33
  699. package/dist/predicate/isFunction.js.map +0 -1
  700. package/dist/predicate/isLength.js +0 -33
  701. package/dist/predicate/isLength.js.map +0 -1
  702. package/dist/predicate/isNil.js +0 -33
  703. package/dist/predicate/isNil.js.map +0 -1
  704. package/dist/predicate/isNotNil.js +0 -33
  705. package/dist/predicate/isNotNil.js.map +0 -1
  706. package/dist/predicate/isNull.js +0 -33
  707. package/dist/predicate/isNull.js.map +0 -1
  708. package/dist/predicate/isPlainObject.js +0 -49
  709. package/dist/predicate/isPlainObject.js.map +0 -1
  710. package/dist/predicate/isPrimitive.js +0 -33
  711. package/dist/predicate/isPrimitive.js.map +0 -1
  712. package/dist/predicate/isTypedArray.js +0 -33
  713. package/dist/predicate/isTypedArray.js.map +0 -1
  714. package/dist/predicate/isUndefined.js +0 -33
  715. package/dist/predicate/isUndefined.js.map +0 -1
  716. package/dist/promise/delay.js +0 -56
  717. package/dist/promise/delay.js.map +0 -1
  718. package/dist/promise/timeout.d.mts +0 -10
  719. package/dist/promise/timeout.d.ts +0 -10
  720. package/dist/promise/timeout.js +0 -70
  721. package/dist/promise/timeout.js.map +0 -1
  722. package/dist/promise/withTimeout.js +0 -75
  723. package/dist/promise/withTimeout.js.map +0 -1
  724. package/dist/string/camelCase.js +0 -51
  725. package/dist/string/camelCase.js.map +0 -1
  726. package/dist/string/capitalize.js +0 -33
  727. package/dist/string/capitalize.js.map +0 -1
  728. package/dist/string/kebabCase.js +0 -42
  729. package/dist/string/kebabCase.js.map +0 -1
  730. package/dist/string/lowerCase.js +0 -42
  731. package/dist/string/lowerCase.js.map +0 -1
  732. package/dist/string/snakeCase.js +0 -42
  733. package/dist/string/snakeCase.js.map +0 -1
  734. package/dist/string/startCase.js +0 -53
  735. package/dist/string/startCase.js.map +0 -1
@@ -1,117 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/object/cloneDeep.ts
21
- var cloneDeep_exports = {};
22
- __export(cloneDeep_exports, {
23
- cloneDeep: () => cloneDeep
24
- });
25
- module.exports = __toCommonJS(cloneDeep_exports);
26
- function cloneDeep(obj) {
27
- if (isPrimitive(obj)) {
28
- return obj;
29
- }
30
- if (Array.isArray(obj)) {
31
- return obj.map((item) => cloneDeep(item));
32
- }
33
- if (obj instanceof Date) {
34
- return new Date(obj.getTime());
35
- }
36
- if (obj instanceof RegExp) {
37
- return new RegExp(obj.source, obj.flags);
38
- }
39
- if (obj instanceof Map) {
40
- const result = /* @__PURE__ */ new Map();
41
- for (const [key, value] of obj.entries()) {
42
- result.set(key, cloneDeep(value));
43
- }
44
- return result;
45
- }
46
- if (obj instanceof Set) {
47
- const result = /* @__PURE__ */ new Set();
48
- for (const value of obj.values()) {
49
- result.add(cloneDeep(value));
50
- }
51
- return result;
52
- }
53
- if (isTypedArray(obj)) {
54
- const result = new (Object.getPrototypeOf(obj)).constructor(obj.length);
55
- for (let i = 0; i < obj.length; i++) {
56
- result[i] = cloneDeep(obj[i]);
57
- }
58
- return result;
59
- }
60
- if (obj instanceof ArrayBuffer || obj instanceof SharedArrayBuffer) {
61
- return obj.slice(0);
62
- }
63
- if (obj instanceof DataView) {
64
- const result = new DataView(obj.buffer.slice(0));
65
- cloneDeepHelper(obj, result);
66
- return result;
67
- }
68
- if (typeof File !== "undefined" && obj instanceof File) {
69
- const result = new File([obj], obj.name, { type: obj.type });
70
- cloneDeepHelper(obj, result);
71
- return result;
72
- }
73
- if (obj instanceof Blob) {
74
- const result = new Blob([obj], { type: obj.type });
75
- cloneDeepHelper(obj, result);
76
- return result;
77
- }
78
- if (obj instanceof Error) {
79
- const result = new obj.constructor();
80
- result.message = obj.message;
81
- result.name = obj.name;
82
- result.stack = obj.stack;
83
- result.cause = obj.cause;
84
- cloneDeepHelper(obj, result);
85
- return result;
86
- }
87
- if (typeof obj === "object" && obj !== null) {
88
- const result = {};
89
- cloneDeepHelper(obj, result);
90
- return result;
91
- }
92
- if (typeof obj === "function") {
93
- return void 0;
94
- }
95
- return obj;
96
- }
97
- function isPrimitive(value) {
98
- return value == null || typeof value !== "object" && typeof value !== "function";
99
- }
100
- function cloneDeepHelper(obj, clonedObj) {
101
- for (const key in obj) {
102
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
103
- const descriptor = Object.getOwnPropertyDescriptor(obj, key);
104
- if ((descriptor?.writable || descriptor?.set) && typeof descriptor?.value !== "function") {
105
- clonedObj[key] = cloneDeep(obj[key]);
106
- }
107
- }
108
- }
109
- }
110
- function isTypedArray(obj) {
111
- return obj instanceof Uint8Array || obj instanceof Uint8ClampedArray || obj instanceof Uint16Array || obj instanceof Uint32Array || obj instanceof BigUint64Array || obj instanceof Int8Array || obj instanceof Int16Array || obj instanceof Int32Array || obj instanceof BigInt64Array || obj instanceof Float32Array || obj instanceof Float64Array;
112
- }
113
- // Annotate the CommonJS export names for ESM import in node:
114
- 0 && (module.exports = {
115
- cloneDeep
116
- });
117
- //# sourceMappingURL=cloneDeep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/object/cloneDeep.ts"],"sourcesContent":["/**\n * Creates a deep clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A deep clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num) ; // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an array with nested objects\n * const arr = [1, { a: 1 }, [1, 2, 3]];\n * const clonedArr = clone(arr);\n * arr[1].a = 2;\n * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]\n * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n *\n * @example\n * // Clone an object with nested objects\n * const obj = { a: 1, b: { c: 1 } };\n * const clonedObj = clone(obj);\n * obj.b.c = 2;\n * console.log(obj); // { a: 1, b: { c: 2 } }\n * console.log(clonedObj); // { a: 1, b: { c: 1 } }\n * console.log(clonedObj === obj); // false\n */\nexport function cloneDeep<T>(obj: T): Resolved<T> {\n if (isPrimitive(obj)) {\n return obj as Resolved<T>;\n }\n\n if (Array.isArray(obj)) {\n return obj.map(item => cloneDeep(item)) as Resolved<T>;\n }\n\n if (obj instanceof Date) {\n return new Date(obj.getTime()) as Resolved<T>;\n }\n\n if (obj instanceof RegExp) {\n return new RegExp(obj.source, obj.flags) as Resolved<T>;\n }\n\n if (obj instanceof Map) {\n const result = new Map();\n for (const [key, value] of obj.entries()) {\n result.set(key, cloneDeep(value));\n }\n return result as Resolved<T>;\n }\n\n if (obj instanceof Set) {\n const result = new Set();\n for (const value of obj.values()) {\n result.add(cloneDeep(value));\n }\n return result as Resolved<T>;\n }\n\n if (isTypedArray(obj)) {\n const result = new (Object.getPrototypeOf(obj).constructor)(obj.length);\n for (let i = 0; i < obj.length; i++) {\n result[i] = cloneDeep(obj[i]);\n }\n return result as Resolved<T>;\n }\n\n if (obj instanceof ArrayBuffer || obj instanceof SharedArrayBuffer) {\n return obj.slice(0) as Resolved<T>;\n }\n\n if (obj instanceof DataView) {\n const result = new DataView(obj.buffer.slice(0));\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n // For legacy NodeJS support\n if (typeof File !== 'undefined' && obj instanceof File) {\n const result = new File([obj], obj.name, { type: obj.type });\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (obj instanceof Blob) {\n const result = new Blob([obj], { type: obj.type });\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (obj instanceof Error) {\n const result = new (obj.constructor as { new (): Error })();\n result.message = obj.message;\n result.name = obj.name;\n result.stack = obj.stack;\n result.cause = obj.cause;\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (typeof obj === 'object' && obj !== null) {\n const result = {};\n cloneDeepHelper(obj, result);\n return result as Resolved<T>;\n }\n\n if (typeof obj === 'function') {\n return void 0 as Resolved<T>;\n }\n\n return obj as Resolved<T>;\n}\n\ntype Primitive = null | undefined | string | number | boolean | symbol | bigint;\nfunction isPrimitive(value: unknown): value is Primitive {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n\n// eslint-disable-next-line\nfunction cloneDeepHelper(obj: any, clonedObj: any): void {\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n const descriptor = Object.getOwnPropertyDescriptor(obj, key);\n if ((descriptor?.writable || descriptor?.set) && typeof descriptor?.value !== 'function') {\n clonedObj[key] = cloneDeep(obj[key]);\n }\n }\n }\n}\n\nfunction isTypedArray(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n obj: any\n): obj is\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | BigUint64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Float32Array\n | Float64Array {\n return (\n obj instanceof Uint8Array ||\n obj instanceof Uint8ClampedArray ||\n obj instanceof Uint16Array ||\n obj instanceof Uint32Array ||\n obj instanceof BigUint64Array ||\n obj instanceof Int8Array ||\n obj instanceof Int16Array ||\n obj instanceof Int32Array ||\n obj instanceof BigInt64Array ||\n obj instanceof Float32Array ||\n obj instanceof Float64Array\n );\n}\n\nexport type Resolved<T> = Equal<T, ResolvedMain<T>> extends true ? T : ResolvedMain<T>;\n\ntype Equal<X, Y> = X extends Y ? (Y extends X ? true : false) : false;\n\ntype ResolvedMain<T> = T extends [never]\n ? never // (special trick for jsonable | null) type\n : ValueOf<T> extends boolean | number | bigint | string\n ? ValueOf<T>\n : T extends (...args: any[]) => any\n ? never\n : T extends object\n ? ResolvedObject<T>\n : ValueOf<T>;\n\ntype ResolvedObject<T extends object> =\n T extends Array<infer U>\n ? IsTuple<T> extends true\n ? ResolvedTuple<T>\n : Array<ResolvedMain<U>>\n : T extends Set<infer U>\n ? Set<ResolvedMain<U>>\n : T extends Map<infer K, infer V>\n ? Map<ResolvedMain<K>, ResolvedMain<V>>\n : T extends WeakSet<any> | WeakMap<any, any>\n ? never\n : T extends\n | Date\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | BigUint64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Float32Array\n | Float64Array\n | ArrayBuffer\n | SharedArrayBuffer\n | DataView\n | Blob\n | File\n ? T\n : {\n [P in keyof T]: ResolvedMain<T[P]>;\n };\n\ntype ResolvedTuple<T extends readonly any[]> = T extends []\n ? []\n : T extends [infer F]\n ? [ResolvedMain<F>]\n : T extends [infer F, ...infer Rest extends readonly any[]]\n ? [ResolvedMain<F>, ...ResolvedTuple<Rest>]\n : T extends [(infer F)?]\n ? [ResolvedMain<F>?]\n : T extends [(infer F)?, ...infer Rest extends readonly any[]]\n ? [ResolvedMain<F>?, ...ResolvedTuple<Rest>]\n : [];\n\ntype IsTuple<T extends readonly any[] | { length: number }> = [T] extends [never]\n ? false\n : T extends readonly any[]\n ? number extends T['length']\n ? false\n : true\n : false;\n\ntype ValueOf<Instance> =\n IsValueOf<Instance, boolean> extends true\n ? boolean\n : IsValueOf<Instance, number> extends true\n ? number\n : IsValueOf<Instance, string> extends true\n ? string\n : Instance;\n\ntype IsValueOf<Instance, O extends IValueOf<any>> = Instance extends O\n ? O extends IValueOf<infer Primitive>\n ? Instance extends Primitive\n ? false\n : true // not Primitive, but Object\n : false // cannot be\n : false;\n\ninterface IValueOf<T> {\n valueOf(): T;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CO,SAAS,UAAa,KAAqB;AAChD,MAAI,YAAY,GAAG,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,IAAI,UAAQ,UAAU,IAAI,CAAC;AAAA,EACxC;AAEA,MAAI,eAAe,MAAM;AACvB,WAAO,IAAI,KAAK,IAAI,QAAQ,CAAC;AAAA,EAC/B;AAEA,MAAI,eAAe,QAAQ;AACzB,WAAO,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK;AAAA,EACzC;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,CAAC,KAAK,KAAK,KAAK,IAAI,QAAQ,GAAG;AACxC,aAAO,IAAI,KAAK,UAAU,KAAK,CAAC;AAAA,IAClC;AACA,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,SAAS,IAAI,OAAO,GAAG;AAChC,aAAO,IAAI,UAAU,KAAK,CAAC;AAAA,IAC7B;AACA,WAAO;AAAA,EACT;AAEA,MAAI,aAAa,GAAG,GAAG;AACrB,UAAM,SAAS,KAAK,OAAO,eAAe,GAAG,GAAE,YAAa,IAAI,MAAM;AACtE,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,aAAO,CAAC,IAAI,UAAU,IAAI,CAAC,CAAC;AAAA,IAC9B;AACA,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,eAAe,eAAe,mBAAmB;AAClE,WAAO,IAAI,MAAM,CAAC;AAAA,EACpB;AAEA,MAAI,eAAe,UAAU;AAC3B,UAAM,SAAS,IAAI,SAAS,IAAI,OAAO,MAAM,CAAC,CAAC;AAC/C,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAGA,MAAI,OAAO,SAAS,eAAe,eAAe,MAAM;AACtD,UAAM,SAAS,IAAI,KAAK,CAAC,GAAG,GAAG,IAAI,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC;AAC3D,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,MAAM;AACvB,UAAM,SAAS,IAAI,KAAK,CAAC,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC;AACjD,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,OAAO;AACxB,UAAM,SAAS,IAAK,IAAI,YAAkC;AAC1D,WAAO,UAAU,IAAI;AACrB,WAAO,OAAO,IAAI;AAClB,WAAO,QAAQ,IAAI;AACnB,WAAO,QAAQ,IAAI;AACnB,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,QAAQ,YAAY,QAAQ,MAAM;AAC3C,UAAM,SAAS,CAAC;AAChB,oBAAgB,KAAK,MAAM;AAC3B,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAGA,SAAS,YAAY,OAAoC;AACvD,SAAO,SAAS,QAAS,OAAO,UAAU,YAAY,OAAO,UAAU;AACzE;AAGA,SAAS,gBAAgB,KAAU,WAAsB;AACvD,aAAW,OAAO,KAAK;AACrB,QAAI,OAAO,UAAU,eAAe,KAAK,KAAK,GAAG,GAAG;AAClD,YAAM,aAAa,OAAO,yBAAyB,KAAK,GAAG;AAC3D,WAAK,YAAY,YAAY,YAAY,QAAQ,OAAO,YAAY,UAAU,YAAY;AACxF,kBAAU,GAAG,IAAI,UAAU,IAAI,GAAG,CAAC;AAAA,MACrC;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,aAEP,KAYe;AACf,SACE,eAAe,cACf,eAAe,qBACf,eAAe,eACf,eAAe,eACf,eAAe,kBACf,eAAe,aACf,eAAe,cACf,eAAe,cACf,eAAe,iBACf,eAAe,gBACf,eAAe;AAEnB;","names":[]}
@@ -1,77 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/object/flattenObject.ts
21
- var flattenObject_exports = {};
22
- __export(flattenObject_exports, {
23
- flattenObject: () => flattenObject
24
- });
25
- module.exports = __toCommonJS(flattenObject_exports);
26
-
27
- // src/predicate/isPlainObject.ts
28
- function isPlainObject(object) {
29
- if (typeof object !== "object") {
30
- return false;
31
- }
32
- if (object == null) {
33
- return false;
34
- }
35
- if (Object.getPrototypeOf(object) === null) {
36
- return true;
37
- }
38
- if (object.toString() !== "[object Object]") {
39
- return false;
40
- }
41
- let proto = object;
42
- while (Object.getPrototypeOf(proto) !== null) {
43
- proto = Object.getPrototypeOf(proto);
44
- }
45
- return Object.getPrototypeOf(object) === proto;
46
- }
47
-
48
- // src/object/flattenObject.ts
49
- function flattenObject(object) {
50
- return flattenObjectImpl(object);
51
- }
52
- function flattenObjectImpl(object, prefix = "") {
53
- const result = {};
54
- const keys = Object.keys(object);
55
- for (let i = 0; i < keys.length; i++) {
56
- const key = keys[i];
57
- const value = object[key];
58
- const prefixedKey = prefix ? `${prefix}.${key}` : key;
59
- if (isPlainObject(value) && Object.keys(value).length > 0) {
60
- Object.assign(result, flattenObjectImpl(value, prefixedKey));
61
- continue;
62
- }
63
- if (Array.isArray(value)) {
64
- for (let index = 0; index < value.length; index++) {
65
- result[`${prefixedKey}.${index}`] = value[index];
66
- }
67
- continue;
68
- }
69
- result[prefixedKey] = value;
70
- }
71
- return result;
72
- }
73
- // Annotate the CommonJS export names for ESM import in node:
74
- 0 && (module.exports = {
75
- flattenObject
76
- });
77
- //# sourceMappingURL=flattenObject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/object/flattenObject.ts","../../src/predicate/isPlainObject.ts"],"sourcesContent":["import { isPlainObject } from \"../predicate/isPlainObject.ts\";\n\n/**\n * Flattens a nested object into a single level object with dot-separated keys.\n * \n * @param {object} object - The object to flatten.\n * @returns {Record<string, any>} - The flattened object.\n * \n * @example\n * const nestedObject = {\n * a: {\n * b: {\n * c: 1\n * }\n * },\n * d: [2, 3]\n * };\n * \n * const flattened = flattenObject(nestedObject);\n * console.log(flattened); \n * // Output:\n * // {\n * // 'a.b.c': 1,\n * // 'd.0': 2,\n * // 'd.1': 3\n * // }\n */\nexport function flattenObject(object: object): Record<string, any> {\n return flattenObjectImpl(object);\n}\n\nfunction flattenObjectImpl(object: object, prefix = ''): Record<string, any> {\n const result: Record<string, any> = {};\n const keys = Object.keys(object);\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = (object as any)[key];\n\n const prefixedKey = prefix ? `${prefix}.${key}` : key;\n\n if (isPlainObject(value) && Object.keys(value).length > 0) {\n Object.assign(result, flattenObjectImpl(value, prefixedKey));\n continue;\n }\n\n if (Array.isArray(value)) {\n for (let index = 0; index < value.length; index++) {\n result[`${prefixedKey}.${index}`] = value[index];\n }\n continue;\n }\n\n result[prefixedKey] = value;\n }\n\n return result;\n}","/**\n * Checks if a given value is a plain object.\n * \n * @param {object} object - The value to check.\n * @returns {boolean} - True if the value is a plain object, otherwise false.\n * \n * @example\n * console.log(isPlainObject({})); // true\n * console.log(isPlainObject([])); // false\n * console.log(isPlainObject(null)); // false\n * console.log(isPlainObject(Object.create(null))); // true\n * console.log(Buffer.from('hello, world')); // false\n */\nexport function isPlainObject(object: object): boolean {\n if (typeof object !== 'object') {\n return false;\n }\n\n if (object == null) {\n return false;\n }\n\n if (Object.getPrototypeOf(object) === null) {\n return true;\n }\n\n if (object.toString() !== '[object Object]') {\n return false;\n }\n\n let proto = object;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(object) === proto;\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaO,SAAS,cAAc,QAAyB;AACrD,MAAI,OAAO,WAAW,UAAU;AAC9B,WAAO;AAAA,EACT;AAEA,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,eAAe,MAAM,MAAM,MAAM;AAC1C,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,SAAS,MAAM,mBAAmB;AAC3C,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ;AAEZ,SAAO,OAAO,eAAe,KAAK,MAAM,MAAM;AAC5C,YAAQ,OAAO,eAAe,KAAK;AAAA,EACrC;AAEA,SAAO,OAAO,eAAe,MAAM,MAAM;AAC3C;;;ADVO,SAAS,cAAc,QAAqC;AACjE,SAAO,kBAAkB,MAAM;AACjC;AAEA,SAAS,kBAAkB,QAAgB,SAAS,IAAyB;AAC3E,QAAM,SAA8B,CAAC;AACrC,QAAM,OAAO,OAAO,KAAK,MAAM;AAE/B,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,MAAM,KAAK,CAAC;AAClB,UAAM,QAAS,OAAe,GAAG;AAEjC,UAAM,cAAc,SAAS,GAAG,MAAM,IAAI,GAAG,KAAK;AAElD,QAAI,cAAc,KAAK,KAAK,OAAO,KAAK,KAAK,EAAE,SAAS,GAAG;AACzD,aAAO,OAAO,QAAQ,kBAAkB,OAAO,WAAW,CAAC;AAC3D;AAAA,IACF;AAEA,QAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,eAAS,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS;AACjD,eAAO,GAAG,WAAW,IAAI,KAAK,EAAE,IAAI,MAAM,KAAK;AAAA,MACjD;AACA;AAAA,IACF;AAEA,WAAO,WAAW,IAAI;AAAA,EACxB;AAEA,SAAO;AACT;","names":[]}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/object/invert.ts
21
- var invert_exports = {};
22
- __export(invert_exports, {
23
- invert: () => invert
24
- });
25
- module.exports = __toCommonJS(invert_exports);
26
- function invert(obj) {
27
- const result = {};
28
- const keys = Object.keys(obj);
29
- for (let i = 0; i < keys.length; i++) {
30
- const key = keys[i];
31
- const value = obj[key];
32
- result[value] = key;
33
- }
34
- return result;
35
- }
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- invert
39
- });
40
- //# sourceMappingURL=invert.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/object/invert.ts"],"sourcesContent":["/**\n * Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.\n *\n * This function takes an object and creates a new object by inverting its keys and values. If the input object has duplicate values,\n * the key of the last occurrence will be used as the value for the new key in the output object. It effectively creates a reverse mapping\n * of the input object's key-value pairs.\n *\n * @template K - Type of the keys in the input object (string, number, symbol)\n * @template V - Type of the values in the input object (string, number, symbol)\n * @param {Record<K, V>} obj - The input object whose keys and values are to be inverted\n * @returns {{ [key in V]: K }} - A new object with keys and values inverted\n *\n * @example\n * invert({ a: 1, b: 2, c: 3 }); // { 1: 'a', 2: 'b', 3: 'c' }\n * invert({ 1: 'a', 2: 'b', 3: 'c' }); // { a: '1', b: '2', c: '3' }\n * invert({ a: 1, 2: 'b', c: 3, 4: 'd' }); // { 1: 'a', b: '2', 3: 'c', d: '4' }\n * invert({ a: Symbol('sym1'), b: Symbol('sym2') }); // { [Symbol('sym1')]: 'a', [Symbol('sym2')]: 'b' }\n */\nexport function invert<K extends PropertyKey, V extends PropertyKey>(obj: Record<K, V>): { [key in V]: K } {\n const result = {} as { [key in V]: K };\n\n const keys = Object.keys(obj) as K[];\n \n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = obj[key];\n result[value] = key;\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBO,SAAS,OAAqD,KAAsC;AACzG,QAAM,SAAS,CAAC;AAEhB,QAAM,OAAO,OAAO,KAAK,GAAG;AAE5B,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,MAAM,KAAK,CAAC;AAClB,UAAM,QAAQ,IAAI,GAAG;AACrB,WAAO,KAAK,IAAI;AAAA,EAClB;AAEA,SAAO;AACT;","names":[]}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/object/omit.ts
21
- var omit_exports = {};
22
- __export(omit_exports, {
23
- omit: () => omit
24
- });
25
- module.exports = __toCommonJS(omit_exports);
26
- function omit(obj, keys) {
27
- const result = { ...obj };
28
- for (const key of keys) {
29
- delete result[key];
30
- }
31
- return result;
32
- }
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
35
- omit
36
- });
37
- //# sourceMappingURL=omit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/object/omit.ts"],"sourcesContent":["/**\n * Creates a new object with specified keys omitted.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * excludes the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template K - The type of keys in object.\n * @param {T} obj - The object to omit keys from.\n * @param {K[]} keys - An array of keys to be omitted from the object.\n * @returns {Omit<T, K>} A new object with the specified keys omitted.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = omit(obj, ['b', 'c']);\n * // result will be { a: 1 }\n */\nexport function omit<T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]): Omit<T, K> {\n const result = { ...obj };\n\n for (const key of keys) {\n delete result[key];\n }\n\n return result as Omit<T, K>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,KAAuD,KAAQ,MAAuB;AACpG,QAAM,SAAS,EAAE,GAAG,IAAI;AAExB,aAAW,OAAO,MAAM;AACtB,WAAO,OAAO,GAAG;AAAA,EACnB;AAEA,SAAO;AACT;","names":[]}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/object/omitBy.ts
21
- var omitBy_exports = {};
22
- __export(omitBy_exports, {
23
- omitBy: () => omitBy
24
- });
25
- module.exports = __toCommonJS(omitBy_exports);
26
- function omitBy(obj, shouldOmit) {
27
- const result = {};
28
- for (const [key, value] of Object.entries(obj)) {
29
- if (shouldOmit(value, key)) {
30
- continue;
31
- }
32
- result[key] = value;
33
- }
34
- return result;
35
- }
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- omitBy
39
- });
40
- //# sourceMappingURL=omitBy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/object/omitBy.ts"],"sourcesContent":["/**\n * Creates a new object composed of the properties that do not satisfy the predicate function.\n *\n * This function takes an object and a predicate function, and returns a new object that\n * includes only the properties for which the predicate function returns false.\n *\n * @template T - The type of object.\n * @param {T} obj - The object to omit properties from.\n * @param {(value: T[string], key: keyof T) => boolean} shouldOmit - A predicate function that determines\n * whether a property should be omitted. It takes the property's key and value as arguments and returns `true`\n * if the property should be omitted, and `false` otherwise.\n * @returns {Partial<T>} A new object with the properties that do not satisfy the predicate function.\n *\n * @example\n * const obj = { a: 1, b: 'omit', c: 3 };\n * const shouldOmit = (key, value) => typeof value === 'string';\n * const result = omitBy(obj, shouldOmit);\n * // result will be { a: 1, c: 3 }\n */\nexport function omitBy<T extends Record<string, any>>(\n obj: T,\n shouldOmit: (value: T[keyof T], key: keyof T) => boolean\n): Partial<T> {\n const result: Partial<T> = {};\n\n for (const [key, value] of Object.entries(obj)) {\n if (shouldOmit(value, key)) {\n continue;\n }\n\n (result as any)[key] = value;\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,SAAS,OACd,KACA,YACY;AACZ,QAAM,SAAqB,CAAC;AAE5B,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,GAAG,GAAG;AAC9C,QAAI,WAAW,OAAO,GAAG,GAAG;AAC1B;AAAA,IACF;AAEA,IAAC,OAAe,GAAG,IAAI;AAAA,EACzB;AAEA,SAAO;AACT;","names":[]}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/object/pick.ts
21
- var pick_exports = {};
22
- __export(pick_exports, {
23
- pick: () => pick
24
- });
25
- module.exports = __toCommonJS(pick_exports);
26
- function pick(obj, keys) {
27
- const result = {};
28
- for (const key of keys) {
29
- result[key] = obj[key];
30
- }
31
- return result;
32
- }
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
35
- pick
36
- });
37
- //# sourceMappingURL=pick.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/object/pick.ts"],"sourcesContent":["/**\n * Creates a new object composed of the picked object properties.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * includes only the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template K - The type of keys in object.\n * @param {T} obj - The object to pick keys from.\n * @param {K[]} keys - An array of keys to be picked from the object.\n * @returns {Pick<T, K>} A new object with the specified keys picked.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n */\nexport function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {\n const result = {} as Pick<T, K>;\n\n for (const key of keys) {\n result[key] = obj[key];\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,KAAuD,KAAQ,MAAuB;AACpG,QAAM,SAAS,CAAC;AAEhB,aAAW,OAAO,MAAM;AACtB,WAAO,GAAG,IAAI,IAAI,GAAG;AAAA,EACvB;AAEA,SAAO;AACT;","names":[]}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/object/pickBy.ts
21
- var pickBy_exports = {};
22
- __export(pickBy_exports, {
23
- pickBy: () => pickBy
24
- });
25
- module.exports = __toCommonJS(pickBy_exports);
26
- function pickBy(obj, shouldPick) {
27
- const result = {};
28
- for (const [key, value] of Object.entries(obj)) {
29
- if (!shouldPick(value, key)) {
30
- continue;
31
- }
32
- result[key] = value;
33
- }
34
- return result;
35
- }
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- pickBy
39
- });
40
- //# sourceMappingURL=pickBy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/object/pickBy.ts"],"sourcesContent":["/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * This function takes an object and a predicate function, and returns a new object that\n * includes only the properties for which the predicate function returns true.\n *\n * @template T - The type of object.\n * @param {T} obj - The object to pick properties from.\n * @param {(value: T[keyof T], key: keyof T) => boolean} shouldPick - A predicate function that determines\n * whether a property should be picked. It takes the property's key and value as arguments and returns `true`\n * if the property should be picked, and `false` otherwise.\n * @returns {Partial<T>} A new object with the properties that satisfy the predicate function.\n *\n * @example\n * const obj = { a: 1, b: 'pick', c: 3 };\n * const shouldPick = (value) => typeof value === 'string';\n * const result = pickBy(obj, shouldPick);\n * // result will be { b: 'pick' }\n */\nexport function pickBy<T extends Record<string, any>>(\n obj: T,\n shouldPick: (value: T[keyof T], key: keyof T) => boolean\n): Partial<T> {\n const result: Partial<T> = {};\n\n for (const [key, value] of Object.entries(obj)) {\n if (!shouldPick(value, key)) {\n continue;\n }\n\n (result as any)[key] = value;\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,SAAS,OACd,KACA,YACY;AACZ,QAAM,SAAqB,CAAC;AAE5B,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,GAAG,GAAG;AAC9C,QAAI,CAAC,WAAW,OAAO,GAAG,GAAG;AAC3B;AAAA,IACF;AAEA,IAAC,OAAe,GAAG,IAAI;AAAA,EACzB;AAEA,SAAO;AACT;","names":[]}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/predicate/isArrayLike.ts
21
- var isArrayLike_exports = {};
22
- __export(isArrayLike_exports, {
23
- isArrayLike: () => isArrayLike
24
- });
25
- module.exports = __toCommonJS(isArrayLike_exports);
26
-
27
- // src/predicate/isLength.ts
28
- function isLength(value) {
29
- return typeof value === "number" && value > -1 && value % 1 === 0 && value <= Number.MAX_SAFE_INTEGER;
30
- }
31
-
32
- // src/predicate/isArrayLike.ts
33
- function isArrayLike(value) {
34
- return value != null && typeof value !== "function" && isLength(value.length);
35
- }
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- isArrayLike
39
- });
40
- //# sourceMappingURL=isArrayLike.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/predicate/isArrayLike.ts","../../src/predicate/isLength.ts"],"sourcesContent":["import { isLength } from \"./isLength.ts\";\n\n/**\n * Checks if `value` is array-like.\n *\n * @param {unknown} value The value to check.\n * @returns {value is ArrayLike<unknown>} Returns `true` if `value` is array-like, else `false`.\n *\n * @example\n * isArrayLike([1, 2, 3]); // true\n * isArrayLike('abc'); // true\n * isArrayLike({ 0: 'a', length: 1 }); // true\n * isArrayLike({}); // false\n * isArrayLike(null); // false\n * isArrayLike(undefined); // false\n */\nexport function isArrayLike(value: unknown): value is ArrayLike<unknown> {\n return value != null && typeof value !== \"function\" &&\n isLength((value as ArrayLike<unknown>).length);\n}\n","export function isLength(value: unknown): value is number {\n return typeof value === 'number' && value > -1 && value % 1 === 0 && value <= Number.MAX_SAFE_INTEGER;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,SAAS,SAAS,OAAiC;AACxD,SAAO,OAAO,UAAU,YAAY,QAAQ,MAAM,QAAQ,MAAM,KAAK,SAAS,OAAO;AACvF;;;ADcO,SAAS,YAAY,OAA6C;AACvE,SAAO,SAAS,QAAQ,OAAO,UAAU,cACvC,SAAU,MAA6B,MAAM;AACjD;","names":[]}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/predicate/isEqual.ts
21
- var isEqual_exports = {};
22
- __export(isEqual_exports, {
23
- isEqual: () => isEqual
24
- });
25
- module.exports = __toCommonJS(isEqual_exports);
26
-
27
- // src/array/uniq.ts
28
- function uniq(arr) {
29
- return Array.from(new Set(arr));
30
- }
31
-
32
- // src/array/union.ts
33
- function union(arr1, arr2) {
34
- return uniq(arr1.concat(arr2));
35
- }
36
-
37
- // src/predicate/isEqual.ts
38
- function isEqual(a, b) {
39
- if (Object.is(a, b)) {
40
- return true;
41
- }
42
- if (a instanceof Date && b instanceof Date) {
43
- return a.getTime() === b.getTime();
44
- }
45
- if (a instanceof RegExp && b instanceof RegExp) {
46
- return a.source === b.source && a.flags === b.flags;
47
- }
48
- if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) {
49
- return false;
50
- }
51
- const aKeys = Object.keys(a);
52
- const bKeys = Object.keys(b);
53
- if (aKeys.length !== bKeys.length) {
54
- return false;
55
- }
56
- if (union(aKeys, bKeys).length !== aKeys.length) {
57
- return false;
58
- }
59
- for (let i = 0; i < aKeys.length; i++) {
60
- const propKey = aKeys[i];
61
- const aProp = a[propKey];
62
- const bProp = b[propKey];
63
- if (!isEqual(aProp, bProp)) {
64
- return false;
65
- }
66
- }
67
- return true;
68
- }
69
- // Annotate the CommonJS export names for ESM import in node:
70
- 0 && (module.exports = {
71
- isEqual
72
- });
73
- //# sourceMappingURL=isEqual.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/predicate/isEqual.ts","../../src/array/uniq.ts","../../src/array/union.ts"],"sourcesContent":["import { union } from \"../array/union.ts\";\n\n/**\n * Checks if two values are equal, including support for `Date`, `RegExp`, and deep object comparison.\n *\n * @param {unknown} a - The first value to compare.\n * @param {unknown} b - The second value to compare.\n * @returns {boolean} `true` if the values are equal, otherwise `false`.\n *\n * @example\n * isEqual(1, 1); // true\n * isEqual({ a: 1 }, { a: 1 }); // true\n * isEqual(/abc/g, /abc/g); // true\n * isEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true\n * isEqual([1, 2, 3], [1, 2, 3]); // true\n */\nexport function isEqual(a: unknown, b: unknown): boolean {\n if (Object.is(a, b)) {\n return true;\n }\n\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime();\n }\n\n if (a instanceof RegExp && b instanceof RegExp) {\n return a.source === b.source && a.flags === b.flags;\n }\n\n if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) {\n return false;\n }\n\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n // check if all keys in both arrays match\n if (union(aKeys, bKeys).length !== aKeys.length) {\n return false;\n }\n\n for (let i = 0; i < aKeys.length; i++) {\n const propKey = aKeys[i];\n const aProp = (a as any)[propKey];\n const bProp = (b as any)[propKey];\n \n if (!isEqual(aProp, bProp)) {\n return false;\n }\n }\n\n return true;\n}\n","/**\n * Creates a duplicate-free version of an array.\n *\n * This function takes an array and returns a new array containing only the unique values\n * from the original array, preserving the order of first occurrence.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @returns {T[]} A new array with only unique values from the original array.\n *\n * @example\n * const array = [1, 2, 2, 3, 4, 4, 5];\n * const result = uniq(array);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function uniq<T>(arr: readonly T[]): T[] {\n return Array.from(new Set(arr));\n}\n","import { uniq } from './uniq.ts';\n\n/**\n * Creates an array of unique values from all given arrays.\n *\n * This function takes two arrays, merges them into a single array, and returns a new array\n * containing only the unique values from the merged array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array to merge and filter for unique values.\n * @param {T[]} arr2 - The second array to merge and filter for unique values.\n * @returns {T[]} A new array of unique values.\n *\n * @example\n * const array1 = [1, 2, 3];\n * const array2 = [3, 4, 5];\n * const result = union(array1, array2);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function union<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n return uniq(arr1.concat(arr2));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACeO,SAAS,KAAQ,KAAwB;AAC9C,SAAO,MAAM,KAAK,IAAI,IAAI,GAAG,CAAC;AAChC;;;ACEO,SAAS,MAAS,MAAoB,MAAyB;AACpE,SAAO,KAAK,KAAK,OAAO,IAAI,CAAC;AAC/B;;;AFLO,SAAS,QAAQ,GAAY,GAAqB;AACvD,MAAI,OAAO,GAAG,GAAG,CAAC,GAAG;AACnB,WAAO;AAAA,EACT;AAEA,MAAI,aAAa,QAAQ,aAAa,MAAM;AAC1C,WAAO,EAAE,QAAQ,MAAM,EAAE,QAAQ;AAAA,EACnC;AAEA,MAAI,aAAa,UAAU,aAAa,QAAQ;AAC9C,WAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE;AAAA,EAChD;AAEA,MAAI,OAAO,MAAM,YAAY,OAAO,MAAM,YAAY,MAAM,QAAQ,MAAM,MAAM;AAC9E,WAAO;AAAA,EACT;AAEA,QAAM,QAAQ,OAAO,KAAK,CAAC;AAC3B,QAAM,QAAQ,OAAO,KAAK,CAAC;AAE3B,MAAI,MAAM,WAAW,MAAM,QAAQ;AACjC,WAAO;AAAA,EACT;AAGA,MAAI,MAAM,OAAO,KAAK,EAAE,WAAW,MAAM,QAAQ;AAC/C,WAAO;AAAA,EACT;AAEA,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,UAAM,UAAU,MAAM,CAAC;AACvB,UAAM,QAAS,EAAU,OAAO;AAChC,UAAM,QAAS,EAAU,OAAO;AAEhC,QAAI,CAAC,QAAQ,OAAO,KAAK,GAAG;AAC1B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/predicate/isFunction.ts
21
- var isFunction_exports = {};
22
- __export(isFunction_exports, {
23
- isFunction: () => isFunction
24
- });
25
- module.exports = __toCommonJS(isFunction_exports);
26
- function isFunction(value) {
27
- return typeof value === "function";
28
- }
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
31
- isFunction
32
- });
33
- //# sourceMappingURL=isFunction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/predicate/isFunction.ts"],"sourcesContent":["/**\n * Checks if `value` is a function.\n *\n * @param {unknown} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n *\n * @example\n * isFunction(Array.prototype.slice); // true\n * isFunction(async function () {}); // true\n * isFunction(function* () {}); // true\n * isFunction(Proxy); // true\n * isFunction(Int8Array); // true\n */\nexport function isFunction(value: unknown): value is (...args: unknown[]) => unknown {\n return typeof value === 'function';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,WAAW,OAA0D;AACnF,SAAO,OAAO,UAAU;AAC1B;","names":[]}