@homer0/object-utils 7.0.0 → 7.0.1

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 (2) hide show
  1. package/dist/index.d.ts +0 -30
  2. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/fns/copy.d.ts
2
1
  /**
3
2
  * Creates a deep copy of a given object.
4
3
  *
@@ -6,8 +5,6 @@
6
5
  * @param target The object to copy.
7
6
  */
8
7
  export declare const copy: <T>(target: T) => T;
9
- //#endregion
10
- //#region src/fns/formatKeys.d.ts
11
8
  /**
12
9
  * The callback that will be used to replace a key.
13
10
  *
@@ -65,8 +62,6 @@ export type FormatKeysExtensionOptions = Omit<FormatKeysOptions, 'search' | 'rep
65
62
  * @param options The set of options to customize the transformation.
66
63
  */
67
64
  export declare const formatKeys: <T = Record<string, unknown>>(options: FormatKeysOptions) => T;
68
- //#endregion
69
- //#region src/fns/dashToLowerCamelKeys.d.ts
70
65
  /**
71
66
  * A shorthand method for {@link formatKeys} that transforms the keys from `dash-case` to
72
67
  * `lowerCamelCase`.
@@ -75,8 +70,6 @@ export declare const formatKeys: <T = Record<string, unknown>>(options: FormatKe
75
70
  * @param options The options to use.
76
71
  */
77
72
  export declare const dashToLowerCamelKeys: <T>(options: FormatKeysExtensionOptions) => T;
78
- //#endregion
79
- //#region src/fns/dashToSnakeKeys.d.ts
80
73
  /**
81
74
  * A shorthand method for {@link formatKeys} that transforms the keys from `dash-case` to
82
75
  * `snake_case`.
@@ -85,8 +78,6 @@ export declare const dashToLowerCamelKeys: <T>(options: FormatKeysExtensionOptio
85
78
  * @param options The options to use.
86
79
  */
87
80
  export declare const dashToSnakeKeys: <T>(options: FormatKeysExtensionOptions) => T;
88
- //#endregion
89
- //#region src/fns/extract.d.ts
90
81
  /**
91
82
  * Used in the {@link extract} function to specify a path for a property, or an "origin
92
83
  * path" and an "extraction path".
@@ -135,8 +126,6 @@ export type ExtractOptions = {
135
126
  * @param options The options to use.
136
127
  */
137
128
  export declare const extract: <T = Record<string, unknown>>(options: ExtractOptions) => T | undefined;
138
- //#endregion
139
- //#region src/fns/flat.d.ts
140
129
  /**
141
130
  * Checks whether a key for an array or an Object should be flattened.
142
131
  *
@@ -178,8 +167,6 @@ export type FlatOptions = {
178
167
  * @param options The options to use.
179
168
  */
180
169
  export declare const flat: <T = Record<string, unknown>>(options: FlatOptions) => T;
181
- //#endregion
182
- //#region src/fns/get.d.ts
183
170
  export type GetOptions = {
184
171
  /** The object from where the property will be read. */
185
172
  target: unknown;
@@ -212,8 +199,6 @@ export type GetOptions = {
212
199
  */
213
200
  declare function get<T>(options: GetOptions): T | undefined;
214
201
  declare function get<T>(options: unknown, path: string): T | undefined;
215
- //#endregion
216
- //#region src/fns/lowerCamelToDashKeys.d.ts
217
202
  /**
218
203
  * A shorthand method for {@link formatKeys} that transforms the keys from `lowerCamelCase`
219
204
  * to `dash-case`.
@@ -222,8 +207,6 @@ declare function get<T>(options: unknown, path: string): T | undefined;
222
207
  * @param options The options to use.
223
208
  */
224
209
  export declare const lowerCamelToDashKeys: <T>(options: FormatKeysExtensionOptions) => T;
225
- //#endregion
226
- //#region src/fns/lowerCamelToSnakeKeys.d.ts
227
210
  /**
228
211
  * A shorthand method for {@link formatKeys} that transforms the keys from
229
212
  * `lowerCamelCase` to `snake_case`.
@@ -232,8 +215,6 @@ export declare const lowerCamelToDashKeys: <T>(options: FormatKeysExtensionOptio
232
215
  * @param options The options to use.
233
216
  */
234
217
  export declare const lowerCamelToSnakeKeys: <T>(options: FormatKeysExtensionOptions) => T;
235
- //#endregion
236
- //#region src/fns/merge.d.ts
237
218
  /**
238
219
  * This method makes a deep merge of a list of objects into a new one. The method also
239
220
  * supports arrays: if the first element is an array, it will be merged into an array,
@@ -255,8 +236,6 @@ export declare const lowerCamelToSnakeKeys: <T>(options: FormatKeysExtensionOpti
255
236
  * @param targets The list of objects to merge.
256
237
  */
257
238
  export declare const merge: <T = unknown>(...targets: unknown[]) => T;
258
- //#endregion
259
- //#region src/fns/remove.d.ts
260
239
  export type RemoveOptions = {
261
240
  /** The object from where the property will be removed. */
262
241
  target: unknown;
@@ -293,8 +272,6 @@ export type RemoveOptions = {
293
272
  */
294
273
  declare function remove<T = unknown>(options: RemoveOptions): T | undefined;
295
274
  declare function remove<T = unknown>(options: unknown, path: string): T | undefined;
296
- //#endregion
297
- //#region src/fns/set.d.ts
298
275
  export type SetOptions = {
299
276
  /** The object where the property will be set. */
300
277
  target: unknown;
@@ -326,8 +303,6 @@ export type SetOptions = {
326
303
  */
327
304
  declare function set<T = Record<string, unknown>>(options: SetOptions): T | undefined;
328
305
  declare function set<T = Record<string, unknown>>(options: SetOptions | unknown, path: string, value: unknown): T | undefined;
329
- //#endregion
330
- //#region src/fns/snakeToDashKeys.d.ts
331
306
  /**
332
307
  * A shorthand method for {@link formatKeys} that transforms the keys from `snake_case` to
333
308
  * `dash-case`.
@@ -336,8 +311,6 @@ declare function set<T = Record<string, unknown>>(options: SetOptions | unknown,
336
311
  * @param options The options to use.
337
312
  */
338
313
  export declare const snakeToDashKeys: <T>(options: FormatKeysExtensionOptions) => T;
339
- //#endregion
340
- //#region src/fns/snakeToLowerCamelKeys.d.ts
341
314
  /**
342
315
  * A shorthand method for {@link formatKeys} that transforms the keys from `snake_case` to
343
316
  * `lowerCamelCase`.
@@ -346,8 +319,6 @@ export declare const snakeToDashKeys: <T>(options: FormatKeysExtensionOptions) =
346
319
  * @param options The options to use.
347
320
  */
348
321
  export declare const snakeToLowerCamelKeys: <T>(options: FormatKeysExtensionOptions) => T;
349
- //#endregion
350
- //#region src/fns/unflat.d.ts
351
322
  export type UnflatOptions = {
352
323
  /** The object to transform. */
353
324
  target: unknown;
@@ -370,6 +341,5 @@ export type UnflatOptions = {
370
341
  * @param options The options to use.
371
342
  */
372
343
  export declare const unflat: <T = Record<string, unknown>>(options: UnflatOptions) => T;
373
- //#endregion
374
344
  export { get, remove, set };
375
345
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@homer0/object-utils",
3
- "description": "A small collection of utility methods to work with objects.",
4
- "version": "7.0.0",
3
+ "description": "A small collection of utility methods to work with objects",
4
+ "version": "7.0.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/homer0/packages.git",
@@ -37,8 +37,8 @@
37
37
  "extend": "^3.0.2"
38
38
  },
39
39
  "devDependencies": {
40
- "@homer0/oxlint-config": "3.0.0",
41
- "@homer0/tsconfig": "6.0.0",
40
+ "@homer0/oxlint-config": "3.0.1",
41
+ "@homer0/tsconfig": "6.0.1",
42
42
  "@types/extend": "^3.0.4",
43
43
  "@vitest/coverage-v8": "catalog:",
44
44
  "oxlint": "catalog:",
@@ -59,5 +59,5 @@
59
59
  "build": "tsdown",
60
60
  "prepublishOnly": "pnpm run build"
61
61
  },
62
- "gitHead": "cc45fa7b2a70d060ac154c13d4dcaed6ca69334f"
62
+ "gitHead": "0e14c0d4519b19d9732b41e23cc0f40114ae32c6"
63
63
  }