@fluixi/utils 1.0.0-alpha.53

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 (354) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +73 -0
  3. package/dist/index.cjs +1 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +1 -0
  7. package/dist/index.mjs +1 -0
  8. package/dist/lib/array/advanced.cjs +1 -0
  9. package/dist/lib/array/advanced.d.ts +1116 -0
  10. package/dist/lib/array/advanced.d.ts.map +1 -0
  11. package/dist/lib/array/advanced.js +2429 -0
  12. package/dist/lib/array/advanced.mjs +1 -0
  13. package/dist/lib/array/array.cjs +1 -0
  14. package/dist/lib/array/array.d.ts +6 -0
  15. package/dist/lib/array/array.d.ts.map +1 -0
  16. package/dist/lib/array/array.js +31 -0
  17. package/dist/lib/array/array.mjs +1 -0
  18. package/dist/lib/array/index.cjs +1 -0
  19. package/dist/lib/array/index.d.ts +4 -0
  20. package/dist/lib/array/index.d.ts.map +1 -0
  21. package/dist/lib/array/index.js +3 -0
  22. package/dist/lib/array/index.mjs +1 -0
  23. package/dist/lib/array/utils.cjs +1 -0
  24. package/dist/lib/array/utils.d.ts +100 -0
  25. package/dist/lib/array/utils.d.ts.map +1 -0
  26. package/dist/lib/array/utils.js +165 -0
  27. package/dist/lib/array/utils.mjs +1 -0
  28. package/dist/lib/color/color.cjs +1 -0
  29. package/dist/lib/color/color.d.ts +366 -0
  30. package/dist/lib/color/color.d.ts.map +1 -0
  31. package/dist/lib/color/color.js +722 -0
  32. package/dist/lib/color/color.mjs +1 -0
  33. package/dist/lib/color/constants.cjs +1 -0
  34. package/dist/lib/color/constants.d.ts +361 -0
  35. package/dist/lib/color/constants.d.ts.map +1 -0
  36. package/dist/lib/color/constants.js +358 -0
  37. package/dist/lib/color/constants.mjs +1 -0
  38. package/dist/lib/color/conversions.cjs +1 -0
  39. package/dist/lib/color/conversions.d.ts +166 -0
  40. package/dist/lib/color/conversions.d.ts.map +1 -0
  41. package/dist/lib/color/conversions.js +766 -0
  42. package/dist/lib/color/conversions.mjs +1 -0
  43. package/dist/lib/color/helpers.cjs +1 -0
  44. package/dist/lib/color/helpers.d.ts +75 -0
  45. package/dist/lib/color/helpers.d.ts.map +1 -0
  46. package/dist/lib/color/helpers.js +419 -0
  47. package/dist/lib/color/helpers.mjs +1 -0
  48. package/dist/lib/color/index.cjs +1 -0
  49. package/dist/lib/color/index.d.ts +12 -0
  50. package/dist/lib/color/index.d.ts.map +1 -0
  51. package/dist/lib/color/index.js +15 -0
  52. package/dist/lib/color/index.mjs +1 -0
  53. package/dist/lib/color/types.cjs +1 -0
  54. package/dist/lib/color/types.d.ts +179 -0
  55. package/dist/lib/color/types.d.ts.map +1 -0
  56. package/dist/lib/color/types.js +1 -0
  57. package/dist/lib/color/types.mjs +0 -0
  58. package/dist/lib/color/utils.cjs +1 -0
  59. package/dist/lib/color/utils.d.ts +199 -0
  60. package/dist/lib/color/utils.d.ts.map +1 -0
  61. package/dist/lib/color/utils.js +858 -0
  62. package/dist/lib/color/utils.mjs +1 -0
  63. package/dist/lib/compare/comparators.cjs +1 -0
  64. package/dist/lib/compare/comparators.d.ts +65 -0
  65. package/dist/lib/compare/comparators.d.ts.map +1 -0
  66. package/dist/lib/compare/comparators.js +210 -0
  67. package/dist/lib/compare/comparators.mjs +1 -0
  68. package/dist/lib/compare/index.cjs +1 -0
  69. package/dist/lib/compare/index.d.ts +2 -0
  70. package/dist/lib/compare/index.d.ts.map +1 -0
  71. package/dist/lib/compare/index.js +1 -0
  72. package/dist/lib/compare/index.mjs +1 -0
  73. package/dist/lib/crypto/hash.cjs +1 -0
  74. package/dist/lib/crypto/hash.d.ts +6 -0
  75. package/dist/lib/crypto/hash.d.ts.map +1 -0
  76. package/dist/lib/crypto/hash.js +53 -0
  77. package/dist/lib/crypto/hash.mjs +1 -0
  78. package/dist/lib/crypto/index.cjs +1 -0
  79. package/dist/lib/crypto/index.d.ts +2 -0
  80. package/dist/lib/crypto/index.d.ts.map +1 -0
  81. package/dist/lib/crypto/index.js +1 -0
  82. package/dist/lib/crypto/index.mjs +1 -0
  83. package/dist/lib/dom/events.cjs +1 -0
  84. package/dist/lib/dom/events.d.ts +159 -0
  85. package/dist/lib/dom/events.d.ts.map +1 -0
  86. package/dist/lib/dom/events.js +50 -0
  87. package/dist/lib/dom/events.mjs +1 -0
  88. package/dist/lib/dom/index.cjs +1 -0
  89. package/dist/lib/dom/index.d.ts +3 -0
  90. package/dist/lib/dom/index.d.ts.map +1 -0
  91. package/dist/lib/dom/index.js +2 -0
  92. package/dist/lib/dom/index.mjs +1 -0
  93. package/dist/lib/dom/utils.cjs +1 -0
  94. package/dist/lib/dom/utils.d.ts +6 -0
  95. package/dist/lib/dom/utils.d.ts.map +1 -0
  96. package/dist/lib/dom/utils.js +37 -0
  97. package/dist/lib/dom/utils.mjs +1 -0
  98. package/dist/lib/functions/functions.cjs +1 -0
  99. package/dist/lib/functions/functions.d.ts +329 -0
  100. package/dist/lib/functions/functions.d.ts.map +1 -0
  101. package/dist/lib/functions/functions.js +585 -0
  102. package/dist/lib/functions/functions.mjs +1 -0
  103. package/dist/lib/functions/index.cjs +1 -0
  104. package/dist/lib/functions/index.d.ts +3 -0
  105. package/dist/lib/functions/index.d.ts.map +1 -0
  106. package/dist/lib/functions/index.js +1 -0
  107. package/dist/lib/functions/index.mjs +1 -0
  108. package/dist/lib/functions/types.cjs +1 -0
  109. package/dist/lib/functions/types.d.ts +2 -0
  110. package/dist/lib/functions/types.d.ts.map +1 -0
  111. package/dist/lib/functions/types.js +1 -0
  112. package/dist/lib/functions/types.mjs +0 -0
  113. package/dist/lib/helpers.cjs +1 -0
  114. package/dist/lib/helpers.d.ts +13 -0
  115. package/dist/lib/helpers.d.ts.map +1 -0
  116. package/dist/lib/helpers.js +66 -0
  117. package/dist/lib/helpers.mjs +1 -0
  118. package/dist/lib/index.cjs +1 -0
  119. package/dist/lib/index.d.ts +6 -0
  120. package/dist/lib/index.d.ts.map +1 -0
  121. package/dist/lib/index.js +8 -0
  122. package/dist/lib/index.mjs +1 -0
  123. package/dist/lib/maths/constants.cjs +1 -0
  124. package/dist/lib/maths/constants.d.ts +84 -0
  125. package/dist/lib/maths/constants.d.ts.map +1 -0
  126. package/dist/lib/maths/constants.js +79 -0
  127. package/dist/lib/maths/constants.mjs +1 -0
  128. package/dist/lib/maths/fn/advanced.cjs +1 -0
  129. package/dist/lib/maths/fn/advanced.d.ts +149 -0
  130. package/dist/lib/maths/fn/advanced.d.ts.map +1 -0
  131. package/dist/lib/maths/fn/advanced.js +264 -0
  132. package/dist/lib/maths/fn/advanced.mjs +1 -0
  133. package/dist/lib/maths/fn/basic.cjs +1 -0
  134. package/dist/lib/maths/fn/basic.d.ts +182 -0
  135. package/dist/lib/maths/fn/basic.d.ts.map +1 -0
  136. package/dist/lib/maths/fn/basic.js +343 -0
  137. package/dist/lib/maths/fn/basic.mjs +1 -0
  138. package/dist/lib/maths/fn/complex.cjs +1 -0
  139. package/dist/lib/maths/fn/complex.d.ts +153 -0
  140. package/dist/lib/maths/fn/complex.d.ts.map +1 -0
  141. package/dist/lib/maths/fn/complex.js +383 -0
  142. package/dist/lib/maths/fn/complex.mjs +1 -0
  143. package/dist/lib/maths/fn/index.cjs +1 -0
  144. package/dist/lib/maths/fn/index.d.ts +10 -0
  145. package/dist/lib/maths/fn/index.d.ts.map +1 -0
  146. package/dist/lib/maths/fn/index.js +9 -0
  147. package/dist/lib/maths/fn/index.mjs +1 -0
  148. package/dist/lib/maths/fn/trigo.cjs +1 -0
  149. package/dist/lib/maths/fn/trigo.d.ts +147 -0
  150. package/dist/lib/maths/fn/trigo.d.ts.map +1 -0
  151. package/dist/lib/maths/fn/trigo.js +227 -0
  152. package/dist/lib/maths/fn/trigo.mjs +1 -0
  153. package/dist/lib/maths/fn/vector.cjs +1 -0
  154. package/dist/lib/maths/fn/vector.d.ts +512 -0
  155. package/dist/lib/maths/fn/vector.d.ts.map +1 -0
  156. package/dist/lib/maths/fn/vector.js +1136 -0
  157. package/dist/lib/maths/fn/vector.mjs +1 -0
  158. package/dist/lib/maths/formatter.cjs +1 -0
  159. package/dist/lib/maths/formatter.d.ts +35 -0
  160. package/dist/lib/maths/formatter.d.ts.map +1 -0
  161. package/dist/lib/maths/formatter.js +56 -0
  162. package/dist/lib/maths/formatter.mjs +1 -0
  163. package/dist/lib/maths/guards.cjs +1 -0
  164. package/dist/lib/maths/guards.d.ts +166 -0
  165. package/dist/lib/maths/guards.d.ts.map +1 -0
  166. package/dist/lib/maths/guards.js +315 -0
  167. package/dist/lib/maths/guards.mjs +1 -0
  168. package/dist/lib/maths/index.cjs +1 -0
  169. package/dist/lib/maths/index.d.ts +24 -0
  170. package/dist/lib/maths/index.d.ts.map +1 -0
  171. package/dist/lib/maths/index.js +29 -0
  172. package/dist/lib/maths/index.mjs +1 -0
  173. package/dist/lib/maths/parser.cjs +1 -0
  174. package/dist/lib/maths/parser.d.ts +20 -0
  175. package/dist/lib/maths/parser.d.ts.map +1 -0
  176. package/dist/lib/maths/parser.js +78 -0
  177. package/dist/lib/maths/parser.mjs +1 -0
  178. package/dist/lib/maths/random.cjs +1 -0
  179. package/dist/lib/maths/random.d.ts +27 -0
  180. package/dist/lib/maths/random.d.ts.map +1 -0
  181. package/dist/lib/maths/random.js +49 -0
  182. package/dist/lib/maths/random.mjs +1 -0
  183. package/dist/lib/maths/types/advanced.cjs +1 -0
  184. package/dist/lib/maths/types/advanced.d.ts +357 -0
  185. package/dist/lib/maths/types/advanced.d.ts.map +1 -0
  186. package/dist/lib/maths/types/advanced.js +5 -0
  187. package/dist/lib/maths/types/advanced.mjs +0 -0
  188. package/dist/lib/maths/types/basic.cjs +1 -0
  189. package/dist/lib/maths/types/basic.d.ts +95 -0
  190. package/dist/lib/maths/types/basic.d.ts.map +1 -0
  191. package/dist/lib/maths/types/basic.js +5 -0
  192. package/dist/lib/maths/types/basic.mjs +0 -0
  193. package/dist/lib/maths/types/index.cjs +1 -0
  194. package/dist/lib/maths/types/index.d.ts +4 -0
  195. package/dist/lib/maths/types/index.d.ts.map +1 -0
  196. package/dist/lib/maths/types/index.js +3 -0
  197. package/dist/lib/maths/types/index.mjs +0 -0
  198. package/dist/lib/maths/types/negative.cjs +1 -0
  199. package/dist/lib/maths/types/negative.d.ts +51 -0
  200. package/dist/lib/maths/types/negative.d.ts.map +1 -0
  201. package/dist/lib/maths/types/negative.js +5 -0
  202. package/dist/lib/maths/types/negative.mjs +0 -0
  203. package/dist/lib/maths/types/operations.cjs +1 -0
  204. package/dist/lib/maths/types/operations.d.ts +188 -0
  205. package/dist/lib/maths/types/operations.d.ts.map +1 -0
  206. package/dist/lib/maths/types/operations.js +6 -0
  207. package/dist/lib/maths/types/operations.mjs +0 -0
  208. package/dist/lib/object/clone.cjs +1 -0
  209. package/dist/lib/object/clone.d.ts +46 -0
  210. package/dist/lib/object/clone.d.ts.map +1 -0
  211. package/dist/lib/object/clone.js +104 -0
  212. package/dist/lib/object/clone.mjs +1 -0
  213. package/dist/lib/object/diff.cjs +1 -0
  214. package/dist/lib/object/diff.d.ts +203 -0
  215. package/dist/lib/object/diff.d.ts.map +1 -0
  216. package/dist/lib/object/diff.js +805 -0
  217. package/dist/lib/object/diff.mjs +1 -0
  218. package/dist/lib/object/getter-setter.cjs +1 -0
  219. package/dist/lib/object/getter-setter.d.ts +361 -0
  220. package/dist/lib/object/getter-setter.d.ts.map +1 -0
  221. package/dist/lib/object/getter-setter.js +1771 -0
  222. package/dist/lib/object/getter-setter.mjs +1 -0
  223. package/dist/lib/object/index.cjs +6 -0
  224. package/dist/lib/object/index.d.ts +13 -0
  225. package/dist/lib/object/index.d.ts.map +1 -0
  226. package/dist/lib/object/index.js +12 -0
  227. package/dist/lib/object/index.mjs +6 -0
  228. package/dist/lib/object/merge.cjs +1 -0
  229. package/dist/lib/object/merge.d.ts +93 -0
  230. package/dist/lib/object/merge.d.ts.map +1 -0
  231. package/dist/lib/object/merge.js +474 -0
  232. package/dist/lib/object/merge.mjs +1 -0
  233. package/dist/lib/object/object.cjs +1 -0
  234. package/dist/lib/object/object.d.ts +128 -0
  235. package/dist/lib/object/object.d.ts.map +1 -0
  236. package/dist/lib/object/object.js +432 -0
  237. package/dist/lib/object/object.mjs +1 -0
  238. package/dist/lib/object/omit.cjs +1 -0
  239. package/dist/lib/object/omit.d.ts +351 -0
  240. package/dist/lib/object/omit.d.ts.map +1 -0
  241. package/dist/lib/object/omit.js +656 -0
  242. package/dist/lib/object/omit.mjs +1 -0
  243. package/dist/lib/object/reconcile.cjs +1 -0
  244. package/dist/lib/object/reconcile.d.ts +7 -0
  245. package/dist/lib/object/reconcile.d.ts.map +1 -0
  246. package/dist/lib/object/reconcile.js +122 -0
  247. package/dist/lib/object/reconcile.mjs +1 -0
  248. package/dist/lib/object/selector.cjs +1 -0
  249. package/dist/lib/object/selector.d.ts +50 -0
  250. package/dist/lib/object/selector.d.ts.map +1 -0
  251. package/dist/lib/object/selector.js +371 -0
  252. package/dist/lib/object/selector.mjs +1 -0
  253. package/dist/lib/object/sort.cjs +1 -0
  254. package/dist/lib/object/sort.d.ts +149 -0
  255. package/dist/lib/object/sort.d.ts.map +1 -0
  256. package/dist/lib/object/sort.js +298 -0
  257. package/dist/lib/object/sort.mjs +1 -0
  258. package/dist/lib/object/transform.cjs +1 -0
  259. package/dist/lib/object/transform.d.ts +620 -0
  260. package/dist/lib/object/transform.d.ts.map +1 -0
  261. package/dist/lib/object/transform.js +1058 -0
  262. package/dist/lib/object/transform.mjs +1 -0
  263. package/dist/lib/object/types.cjs +1 -0
  264. package/dist/lib/object/types.d.ts +250 -0
  265. package/dist/lib/object/types.d.ts.map +1 -0
  266. package/dist/lib/object/types.js +1 -0
  267. package/dist/lib/object/types.mjs +0 -0
  268. package/dist/lib/object/utils.cjs +6 -0
  269. package/dist/lib/object/utils.d.ts +165 -0
  270. package/dist/lib/object/utils.d.ts.map +1 -0
  271. package/dist/lib/object/utils.js +444 -0
  272. package/dist/lib/object/utils.mjs +6 -0
  273. package/dist/lib/primitive/boolean/boolean.cjs +1 -0
  274. package/dist/lib/primitive/boolean/boolean.d.ts +276 -0
  275. package/dist/lib/primitive/boolean/boolean.d.ts.map +1 -0
  276. package/dist/lib/primitive/boolean/boolean.js +615 -0
  277. package/dist/lib/primitive/boolean/boolean.mjs +1 -0
  278. package/dist/lib/primitive/boolean/index.cjs +1 -0
  279. package/dist/lib/primitive/boolean/index.d.ts +3 -0
  280. package/dist/lib/primitive/boolean/index.d.ts.map +1 -0
  281. package/dist/lib/primitive/boolean/index.js +2 -0
  282. package/dist/lib/primitive/boolean/index.mjs +1 -0
  283. package/dist/lib/primitive/boolean/types.cjs +1 -0
  284. package/dist/lib/primitive/boolean/types.d.ts +14 -0
  285. package/dist/lib/primitive/boolean/types.d.ts.map +1 -0
  286. package/dist/lib/primitive/boolean/types.js +1 -0
  287. package/dist/lib/primitive/boolean/types.mjs +0 -0
  288. package/dist/lib/primitive/date/date.cjs +1 -0
  289. package/dist/lib/primitive/date/date.d.ts +641 -0
  290. package/dist/lib/primitive/date/date.d.ts.map +1 -0
  291. package/dist/lib/primitive/date/date.js +1998 -0
  292. package/dist/lib/primitive/date/date.mjs +1 -0
  293. package/dist/lib/primitive/date/index.cjs +1 -0
  294. package/dist/lib/primitive/date/index.d.ts +3 -0
  295. package/dist/lib/primitive/date/index.d.ts.map +1 -0
  296. package/dist/lib/primitive/date/index.js +2 -0
  297. package/dist/lib/primitive/date/index.mjs +1 -0
  298. package/dist/lib/primitive/date/types.cjs +1 -0
  299. package/dist/lib/primitive/date/types.d.ts +205 -0
  300. package/dist/lib/primitive/date/types.d.ts.map +1 -0
  301. package/dist/lib/primitive/date/types.js +7 -0
  302. package/dist/lib/primitive/date/types.mjs +0 -0
  303. package/dist/lib/primitive/index.cjs +5 -0
  304. package/dist/lib/primitive/index.d.ts +5 -0
  305. package/dist/lib/primitive/index.d.ts.map +1 -0
  306. package/dist/lib/primitive/index.js +4 -0
  307. package/dist/lib/primitive/index.mjs +5 -0
  308. package/dist/lib/primitive/string/index.cjs +5 -0
  309. package/dist/lib/primitive/string/index.d.ts +3 -0
  310. package/dist/lib/primitive/string/index.d.ts.map +1 -0
  311. package/dist/lib/primitive/string/index.js +2 -0
  312. package/dist/lib/primitive/string/index.mjs +5 -0
  313. package/dist/lib/primitive/string/parser-2.cjs +8 -0
  314. package/dist/lib/primitive/string/parser-2.d.ts +17 -0
  315. package/dist/lib/primitive/string/parser-2.d.ts.map +1 -0
  316. package/dist/lib/primitive/string/parser-2.js +656 -0
  317. package/dist/lib/primitive/string/parser-2.mjs +8 -0
  318. package/dist/lib/primitive/string/parser.cjs +3 -0
  319. package/dist/lib/primitive/string/parser.d.ts +9 -0
  320. package/dist/lib/primitive/string/parser.d.ts.map +1 -0
  321. package/dist/lib/primitive/string/parser.js +775 -0
  322. package/dist/lib/primitive/string/parser.mjs +3 -0
  323. package/dist/lib/primitive/string/string.cjs +5 -0
  324. package/dist/lib/primitive/string/string.d.ts +535 -0
  325. package/dist/lib/primitive/string/string.d.ts.map +1 -0
  326. package/dist/lib/primitive/string/string.js +1301 -0
  327. package/dist/lib/primitive/string/string.mjs +5 -0
  328. package/dist/lib/primitive/string/types.cjs +1 -0
  329. package/dist/lib/primitive/string/types.d.ts +318 -0
  330. package/dist/lib/primitive/string/types.d.ts.map +1 -0
  331. package/dist/lib/primitive/string/types.js +5 -0
  332. package/dist/lib/primitive/string/types.mjs +0 -0
  333. package/dist/lib/primitive/types.cjs +1 -0
  334. package/dist/lib/primitive/types.d.ts +27 -0
  335. package/dist/lib/primitive/types.d.ts.map +1 -0
  336. package/dist/lib/primitive/types.js +1 -0
  337. package/dist/lib/primitive/types.mjs +0 -0
  338. package/dist/lib/url/index.cjs +1 -0
  339. package/dist/lib/url/index.d.ts +3 -0
  340. package/dist/lib/url/index.d.ts.map +1 -0
  341. package/dist/lib/url/index.js +2 -0
  342. package/dist/lib/url/index.mjs +1 -0
  343. package/dist/lib/url/parser.cjs +1 -0
  344. package/dist/lib/url/parser.d.ts +216 -0
  345. package/dist/lib/url/parser.d.ts.map +1 -0
  346. package/dist/lib/url/parser.js +488 -0
  347. package/dist/lib/url/parser.mjs +1 -0
  348. package/dist/lib/url/types.cjs +1 -0
  349. package/dist/lib/url/types.d.ts +18 -0
  350. package/dist/lib/url/types.d.ts.map +1 -0
  351. package/dist/lib/url/types.js +1 -0
  352. package/dist/lib/url/types.mjs +0 -0
  353. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  354. package/package.json +150 -0
@@ -0,0 +1,351 @@
1
+ import { AnyObject } from './types.js';
2
+ /**
3
+ * Omits specified properties from an object
4
+ *
5
+ * Creates a new object without the specified keys. This is a shallow operation -
6
+ * nested objects are copied by reference.
7
+ *
8
+ * @template T - The input object type
9
+ * @template K - The keys to omit from the object
10
+ * @param obj - The source object
11
+ * @param keys - The keys to omit
12
+ * @returns A new object without the omitted keys
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const user = { id: 1, name: 'Alice', password: 'secret' };
17
+ * const safeUser = omit(user, ['password']);
18
+ * // { id: 1, name: 'Alice' }
19
+ * ```
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const config = { server: 'localhost', port: 8080, timeout: 5000, retries: 3 };
24
+ * const essentialConfig = omit(config, ['timeout', 'retries']);
25
+ * // { server: 'localhost', port: 8080 }
26
+ * ```
27
+ */
28
+ export declare function omit<T extends AnyObject, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
29
+ /**
30
+ * Deeply omits specified properties at any level of an object or array
31
+ *
32
+ * Recursively removes the specified keys from an object and all nested objects.
33
+ * Creates a new deep copy of the object with the keys removed at every level.
34
+ *
35
+ * @template T - The input object type
36
+ * @param obj - The source object or array
37
+ * @param keys - Keys to omit at any level
38
+ * @returns A new deep copy with the keys omitted at every level
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const user = {
43
+ * id: 1,
44
+ * name: 'Alice',
45
+ * meta: {
46
+ * password: 'secret',
47
+ * tokens: {
48
+ * refresh: 'abc',
49
+ * password: '123'
50
+ * }
51
+ * }
52
+ * };
53
+ *
54
+ * const safeUser = deepOmit(user, ['password']);
55
+ * // {
56
+ * // id: 1,
57
+ * // name: 'Alice',
58
+ * // meta: {
59
+ * // tokens: {
60
+ * // refresh: 'abc'
61
+ * // }
62
+ * // }
63
+ * // }
64
+ * ```
65
+ */
66
+ export declare function deepOmit<T>(obj: T, keys: string[]): T;
67
+ /**
68
+ * Creates a function that omits specific properties from objects
69
+ *
70
+ * Returns a reusable function that will omit the specified keys from any object passed to it.
71
+ * This is useful when you need to omit the same keys from multiple objects.
72
+ *
73
+ * @template K - The keys to omit
74
+ * @param keys - The keys to omit from objects
75
+ * @returns A function that omits the specified keys from objects
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const removeSensitiveData = createOmitter(['password', 'ssn', 'creditCard']);
80
+ *
81
+ * const user1 = { id: 1, name: 'Alice', password: 'secret', ssn: '123-45-6789' };
82
+ * const user2 = { id: 2, name: 'Bob', password: 'p@ssword', creditCard: '4111-1111-1111-1111' };
83
+ *
84
+ * const safeUser1 = removeSensitiveData(user1);
85
+ * // { id: 1, name: 'Alice' }
86
+ *
87
+ * const safeUser2 = removeSensitiveData(user2);
88
+ * // { id: 2, name: 'Bob' }
89
+ * ```
90
+ */
91
+ export declare function createOmitter<K extends string>(keys: K[]): <T extends Record<string, any>>(obj: T) => Omit<T, K>;
92
+ /**
93
+ * Omits keys from an object based on a predicate function
94
+ *
95
+ * Creates a new object excluding properties for which the predicate returns true.
96
+ * The predicate is called with each property's value, key, and the original object.
97
+ *
98
+ * @template T - The input object type
99
+ * @param obj - The source object
100
+ * @param predicate - Function to test each property
101
+ * @returns A new object with filtered properties
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const data = { a: 1, b: null, c: 3, d: undefined, e: 5 };
106
+ *
107
+ * // Remove null and undefined values
108
+ * const cleaned = omitBy(data, value => value == null);
109
+ * // { a: 1, c: 3, e: 5 }
110
+ * ```
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const user = { name: 'Alice', admin: true, lastLogin: Date.now() };
115
+ *
116
+ * // Remove boolean properties
117
+ * const withoutBooleans = omitBy(user, value => typeof value === 'boolean');
118
+ * // { name: 'Alice', lastLogin: 1636271340081 }
119
+ * ```
120
+ */
121
+ export declare function omitBy<T extends AnyObject>(obj: T, predicate: (value: any, key: string, obj: T) => boolean): Partial<T>;
122
+ /**
123
+ * Removes null and undefined values from an object
124
+ *
125
+ * Creates a new object excluding properties that have null or undefined values.
126
+ * This is a common use case for cleaning up objects before serialization or API requests.
127
+ *
128
+ * @template T - The input object type
129
+ * @param obj - The source object
130
+ * @returns A new object without null or undefined properties
131
+ *
132
+ * @example
133
+ * ```ts
134
+ * const data = {
135
+ * name: 'Alice',
136
+ * age: 30,
137
+ * address: null,
138
+ * phone: undefined,
139
+ * email: 'alice@example.com'
140
+ * };
141
+ *
142
+ * const cleaned = omitNil(data);
143
+ * // { name: 'Alice', age: 30, email: 'alice@example.com' }
144
+ * ```
145
+ */
146
+ export declare function omitNil<T extends AnyObject>(obj: T): Partial<T>;
147
+ /**
148
+ * Extracts a subset of properties from an object
149
+ *
150
+ * Creates a new object with only the specified keys.
151
+ * This is the opposite of omit - instead of saying what to exclude, you specify what to include.
152
+ *
153
+ * @template T - The input object type
154
+ * @template K - The keys to pick from the object
155
+ * @param obj - The source object
156
+ * @param keys - The keys to include in the result
157
+ * @returns A new object with only the picked keys
158
+ *
159
+ * @example
160
+ * ```ts
161
+ * const user = { id: 1, name: 'Alice', email: 'alice@example.com', role: 'admin' };
162
+ *
163
+ * const credentials = pick(user, ['name', 'email']);
164
+ * // { name: 'Alice', email: 'alice@example.com' }
165
+ * ```
166
+ */
167
+ export declare function pick<T extends AnyObject, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
168
+ /**
169
+ * Extracts properties from an object based on a predicate function
170
+ *
171
+ * Creates a new object with only the properties for which the predicate returns true.
172
+ * The predicate is called with each property's value, key, and the original object.
173
+ *
174
+ * @template T - The input object type
175
+ * @param obj - The source object
176
+ * @param predicate - Function to test each property
177
+ * @returns A new object with only the properties that pass the predicate
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * const data = { a: 1, b: 2, c: 3, d: 4, e: 5 };
182
+ *
183
+ * // Keep only even numbers
184
+ * const evens = pickBy(data, value => value % 2 === 0);
185
+ * // { b: 2, d: 4 }
186
+ * ```
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * const user = { name: 'Alice', age: 30, admin: true, banned: false };
191
+ *
192
+ * // Keep only boolean properties
193
+ * const flags = pickBy(user, value => typeof value === 'boolean');
194
+ * // { admin: true, banned: false }
195
+ * ```
196
+ */
197
+ export declare function pickBy<T extends AnyObject>(obj: T, predicate: (value: any, key: string, obj: T) => boolean): Partial<T>;
198
+ /**
199
+ * Omits properties from an object based on path selectors with optional transformation
200
+ *
201
+ * Creates a new object excluding properties at the specified path(s). Supports
202
+ * advanced path selectors including property paths, array indices, wildcards, and filters.
203
+ * Optionally accepts a transformation function for more granular control.
204
+ *
205
+ * @template T - The input object type
206
+ * @param obj - The source object
207
+ * @param paths - Path selector or array of path selectors to the properties to omit
208
+ * @param transform - Optional function to control or transform properties
209
+ * @returns A new object with properties omitted or transformed
210
+ *
211
+ * @example
212
+ * ```ts
213
+ * const user = {
214
+ * id: 1,
215
+ * name: 'Alice',
216
+ * profile: {
217
+ * email: 'alice@example.com',
218
+ * password: 'secret',
219
+ * settings: {
220
+ * theme: 'dark',
221
+ * notifications: true
222
+ * }
223
+ * }
224
+ * };
225
+ *
226
+ * // Omit nested property
227
+ * const safeUser = omitPath(user, 'profile.password');
228
+ * // Result: user object without the password field
229
+ *
230
+ * // Omit multiple paths
231
+ * const publicUser = omitPath(user, ['profile.password', 'profile.email']);
232
+ * // Result: user object without password and email fields
233
+ *
234
+ * // Omit with wildcard
235
+ * const data = {
236
+ * users: [
237
+ * { id: 1, name: 'Alice', password: 'secret1' },
238
+ * { id: 2, name: 'Bob', password: 'secret2' }
239
+ * ]
240
+ * };
241
+ * const safeData = omitPath(data, 'users[*].password');
242
+ * // Result: data with password removed from all users
243
+ *
244
+ * // With transformation function
245
+ * const transformedUser = omitPath(user, 'profile.email', (value, path) => {
246
+ * // Return true to omit the property
247
+ * // Return false to keep the property intact
248
+ * // Return a value to transform the property
249
+ * if (path === 'profile.email') {
250
+ * return value.split('@')[0] + '@example.org'; // Transform email
251
+ * }
252
+ * return false; // Keep other properties
253
+ * });
254
+ * ```
255
+ */
256
+ export declare function omitPath<T>(obj: T, paths: string | string[], transform?: (value: any, path: string, obj: any) => any | boolean): T;
257
+ /**
258
+ * Picks properties from an object based on a path selector
259
+ *
260
+ * Creates a new object with only the properties at the specified path. Supports
261
+ * advanced path selectors including property paths, array indices, wildcards, and filters.
262
+ *
263
+ * @template T - The input object type
264
+ * @param obj - The source object
265
+ * @param paths - Path selector or array of path selectors to the properties to pick
266
+ * @param transform - Optional function to transform picked properties
267
+ * @returns A new object with only the properties at the specified path
268
+ *
269
+ * @example
270
+ * ```ts
271
+ * const user = {
272
+ * id: 1,
273
+ * name: 'Alice',
274
+ * profile: {
275
+ * email: 'alice@example.com',
276
+ * settings: {
277
+ * theme: 'dark',
278
+ * notifications: true
279
+ * }
280
+ * },
281
+ * posts: [
282
+ * { id: 101, title: 'Hello', content: 'World' },
283
+ * { id: 102, title: 'Foo', content: 'Bar' }
284
+ * ]
285
+ * };
286
+ *
287
+ * // Pick nested property
288
+ * const userEmail = pickPath(user, 'profile.email');
289
+ * // Result: { profile: { email: 'alice@example.com' } }
290
+ *
291
+ * // Pick multiple paths
292
+ * const basicInfo = pickPath(user, ['id', 'name', 'profile.email']);
293
+ * // Result: { id: 1, name: 'Alice', profile: { email: 'alice@example.com' } }
294
+ *
295
+ * // Pick with wildcard
296
+ * const postTitles = pickPath(user, 'posts[*].title');
297
+ * // Result: { posts: [{ title: 'Hello' }, { title: 'Foo' }] }
298
+ *
299
+ * // With transformation function
300
+ * const transformed = pickPath(user, ['name', 'profile.email'], (value, path) => {
301
+ * if (path === 'name') {
302
+ * return value.toUpperCase();
303
+ * }
304
+ * if (path === 'profile.email') {
305
+ * return value.split('@')[0] + '@example.org';
306
+ * }
307
+ * return value;
308
+ * });
309
+ * ```
310
+ */
311
+ export declare function pickPath<T>(obj: T, paths: string | string[], transform?: (value: any, path: string, parent: any) => any): any;
312
+ /**
313
+ * Deeply omits properties matching a predicate at all levels of an object
314
+ *
315
+ * Recursively traverses an object and omits properties for which the predicate returns true.
316
+ * This applies at every level of the object, not just the top level.
317
+ *
318
+ * @template T - The input object type
319
+ * @param obj - The source object
320
+ * @param predicate - Function to test each property
321
+ * @returns A new object with properties omitted at all levels
322
+ *
323
+ * @example
324
+ * ```ts
325
+ * const data = {
326
+ * id: 1,
327
+ * name: 'Alice',
328
+ * password: 'secret',
329
+ * profile: {
330
+ * email: 'alice@example.com',
331
+ * password: 'another-secret',
332
+ * settings: {
333
+ * token: 'abc123',
334
+ * theme: 'dark'
335
+ * }
336
+ * },
337
+ * posts: [
338
+ * { id: 101, private: true, content: 'Hello' },
339
+ * { id: 102, private: false, content: 'World' }
340
+ * ]
341
+ * };
342
+ *
343
+ * // Omit all sensitive fields
344
+ * const sanitized = deepOmitBy(data, (value, key) =>
345
+ * ['password', 'token', 'private'].includes(key)
346
+ * );
347
+ * // Result: Object with password, token and private fields removed at all levels
348
+ * ```
349
+ */
350
+ export declare function deepOmitBy<T>(obj: T, predicate: (value: any, key: string, parent: any) => boolean): T;
351
+ //# sourceMappingURL=omit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omit.d.ts","sourceRoot":"","sources":["../../../src/lib/object/omit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,YAAY,CAAC;AAMxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,MAAM,CAAC,EACzD,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