caseforge 0.2.1 → 0.2.2
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.
|
@@ -7,7 +7,7 @@ type CamelCase<S extends string> = S extends `${infer A}_${infer B}` ? `${Lowerc
|
|
|
7
7
|
* Converts all object keys to camelCase format at the type level.
|
|
8
8
|
* @example { user_name: "John Doe" } -> { userName: "John Doe" }
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
type CamelCaseKeys<T> = {
|
|
11
11
|
[K in keyof T as CamelCase<K & string>]: T[K] extends readonly (infer U)[] ? U extends object ? readonly CamelCaseKeys<U>[] : T[K] : T[K] extends object ? CamelCaseKeys<T[K]> : T[K];
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
@@ -7,7 +7,7 @@ type KebabCase<S extends string, First extends boolean = true> = S extends `${in
|
|
|
7
7
|
* Converts all object keys to kebab-case format at the type level.
|
|
8
8
|
* @example { userName: "John Doe" } -> { "user-name": "John Doe" }
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
type KebabCaseKeys<T> = {
|
|
11
11
|
[K in keyof T as KebabCase<K & string>]: T[K] extends readonly (infer U)[] ? U extends object ? readonly KebabCaseKeys<U>[] : T[K] : T[K] extends object ? KebabCaseKeys<T[K]> : T[K];
|
|
12
12
|
};
|
|
13
13
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caseforge",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "caseforge - Effortlessly convert between snake_case, camelCase, and more in TypeScript. Zero dependencies, type-safe, and easy to use for any project.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -52,9 +52,7 @@
|
|
|
52
52
|
"license": "MIT",
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@biomejs/biome": "2.3.6",
|
|
55
|
+
"@types/bun": "^1.3.2",
|
|
55
56
|
"typescript": "^5.9.3"
|
|
56
|
-
},
|
|
57
|
-
"dependencies": {
|
|
58
|
-
"@types/bun": "^1.3.2"
|
|
59
57
|
}
|
|
60
58
|
}
|