@pixpilot/object 1.0.2 → 1.0.3

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/README.md +35 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
1
  # @pixpilot/object
2
2
 
3
- ## Usage Add usage instructions here.
3
+ A collection of utility functions for working with JavaScript objects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @pixpilot/object
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { keysToCamelCase, keysToSnakeCase } from '@pixpilot/object';
15
+
16
+ // Example: Convert object keys between camelCase and snake_case
17
+ const obj = { user_name: 'john', user_details: { first_name: 'John', last_name: 'Doe' } };
18
+ const camelCaseObj = keysToCamelCase(obj);
19
+ ```
20
+
21
+ ## API
22
+
23
+ ### `keysToCamelCase(obj: any): any`
24
+
25
+ Converts all keys in an object (and nested objects) from snake_case to camelCase.
26
+
27
+ ### `keysToSnakeCase(obj: any): any`
28
+
29
+ Converts all keys in an object (and nested objects) from camelCase to snake_case.
30
+
31
+ ## Contributing
32
+
33
+ We welcome contributions! Please see the [main contributing guide](../../CONTRIBUTING.md) for details.
34
+
35
+ ## License
36
+
37
+ This project is licensed under the MIT License. See the [LICENSE](../../LICENSE) file for details.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/object",
3
3
  "type": "module",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "author": "Pixpilot <m.doaie@hotmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -24,18 +24,18 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@pixpilot/string": "1.0.0"
27
+ "@pixpilot/string": "1.0.1"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^22.18.10",
31
31
  "eslint": "^9.37.0",
32
32
  "rollup": "^4.52.4",
33
33
  "typescript": "^5.9.3",
34
+ "@internal/eslint-config": "0.3.0",
34
35
  "@internal/prettier-config": "0.0.1",
35
36
  "@internal/rollup-config": "0.1.0",
36
- "@internal/eslint-config": "0.3.0",
37
- "@internal/vitest-config": "0.1.0",
38
- "@internal/tsconfig": "0.1.0"
37
+ "@internal/tsconfig": "0.1.0",
38
+ "@internal/vitest-config": "0.1.0"
39
39
  },
40
40
  "prettier": "@internal/prettier-config",
41
41
  "scripts": {