@homer0/object-utils 1.1.2 → 2.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.
package/README.md CHANGED
@@ -235,9 +235,9 @@ There are also a few "shorthand implementations" of `formatKeys`:
235
235
 
236
236
  ### 🤘 Development
237
237
 
238
- As this project is part of the `packages` monorepo, it requires Yarn, and some of the tooling, like ESLint and Husky, are installed on the root's `package.json`.
238
+ As this project is part of the `packages` monorepo, some of the tooling, like ESLint and Husky, are installed on the root's `package.json`.
239
239
 
240
- #### Yarn tasks
240
+ #### NPM tasks
241
241
 
242
242
  | Task | Description |
243
243
  | ------- | -------------------- |
package/dist/index.d.ts CHANGED
@@ -13,8 +13,8 @@ declare const copy: <T>(target: T) => T;
13
13
  * @param substring The captured string to replace.
14
14
  * @param args The list of groups captured by the expression.
15
15
  */
16
- declare type FormatKeysReplaceFn = (substring: string, ...args: string[]) => string;
17
- declare type FormatKeysOptions = {
16
+ type FormatKeysReplaceFn = (substring: string, ...args: string[]) => string;
17
+ type FormatKeysOptions = {
18
18
  /**
19
19
  * The object to transform.
20
20
  */
@@ -42,7 +42,7 @@ declare type FormatKeysOptions = {
42
42
  */
43
43
  pathDelimiter?: string;
44
44
  };
45
- declare type FormatKeysExtensionOptions = Omit<FormatKeysOptions, 'search' | 'replace'>;
45
+ type FormatKeysExtensionOptions = Omit<FormatKeysOptions, 'search' | 'replace'>;
46
46
  /**
47
47
  * Formats all the keys on an object using a way similar to `.replace(regexp, ...)` but
48
48
  * that also works recursively and with _"object paths"_.
@@ -93,8 +93,8 @@ declare const dashToSnakeKeys: <T>(options: FormatKeysExtensionOptions) => T;
93
93
  * Used in the {@link extract} function to specify a path for a property, or an "origin path"
94
94
  * and an "extraction path".
95
95
  */
96
- declare type extractionPath = string | Record<string, string>;
97
- declare type ExtractOptions = {
96
+ type extractionPath = string | Record<string, string>;
97
+ type ExtractOptions = {
98
98
  /**
99
99
  * The object from where the property/properties will be extracted.
100
100
  */
@@ -149,8 +149,8 @@ declare const extract: <T = Record<string, unknown>>(options: ExtractOptions) =>
149
149
  * @param key The key to check inside its parent.
150
150
  * @param value The value of the key.
151
151
  */
152
- declare type ShouldFlattenFn = (key: string, value: unknown) => boolean;
153
- declare type FlatOptions = {
152
+ type ShouldFlattenFn = (key: string, value: unknown) => boolean;
153
+ type FlatOptions = {
154
154
  /**
155
155
  * The object to transform.
156
156
  */
@@ -190,7 +190,7 @@ declare type FlatOptions = {
190
190
  */
191
191
  declare const flat: <T = Record<string, unknown>>(options: FlatOptions) => T;
192
192
 
193
- declare type GetOptions = {
193
+ type GetOptions = {
194
194
  /**
195
195
  * The object from where the property will be read.
196
196
  */
@@ -272,7 +272,7 @@ declare const lowerCamelToSnakeKeys: <T>(options: FormatKeysExtensionOptions) =>
272
272
  */
273
273
  declare const merge: <T = unknown>(...targets: unknown[]) => T;
274
274
 
275
- declare type RemoveOptions = {
275
+ type RemoveOptions = {
276
276
  /**
277
277
  * The object from where the property will be removed.
278
278
  */
@@ -316,7 +316,7 @@ declare type RemoveOptions = {
316
316
  declare function remove<T = unknown>(options: RemoveOptions): T | undefined;
317
317
  declare function remove<T = unknown>(options: unknown, path: string): T | undefined;
318
318
 
319
- declare type SetOptions = {
319
+ type SetOptions = {
320
320
  /**
321
321
  * The object where the property will be set.
322
322
  */
@@ -375,7 +375,7 @@ declare const snakeToDashKeys: <T>(options: FormatKeysExtensionOptions) => T;
375
375
  */
376
376
  declare const snakeToLowerCamelKeys: <T>(options: FormatKeysExtensionOptions) => T;
377
377
 
378
- declare type UnflatOptions = {
378
+ type UnflatOptions = {
379
379
  /**
380
380
  * The object to transform.
381
381
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@homer0/object-utils",
3
3
  "description": "A small collection of utility methods to work with objects.",
4
- "version": "1.1.2",
4
+ "version": "2.0.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/homer0/packages.git",
@@ -27,14 +27,14 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/extend": "^3.0.1",
30
- "jest": "^29.2.1",
31
- "ts-jest": "^29.0.3",
32
- "tsup": "^6.3.0",
33
- "typescript": "^4.8.4"
30
+ "jest": "^29.4.1",
31
+ "ts-jest": "^29.0.5",
32
+ "tsup": "^6.5.0",
33
+ "typescript": "^4.9.4"
34
34
  },
35
35
  "engine-strict": true,
36
36
  "engines": {
37
- "node": ">=14"
37
+ "node": ">=16"
38
38
  },
39
39
  "main": "./dist/index.js",
40
40
  "module": "./dist/esm/index.js",
@@ -46,5 +46,5 @@
46
46
  "build": "tsup src/index.ts",
47
47
  "prepublishOnly": "npm run build"
48
48
  },
49
- "gitHead": "e584e4ef93ede1065a91a1d3e88e070662acb66e"
49
+ "gitHead": "59c0f6af6901b9f4edb8d2ec36abaf11f6b0780d"
50
50
  }