snakecase-keys
Advanced tools
Comparing version 5.4.7 to 5.5.0
@@ -6,4 +6,6 @@ import { SnakeCase } from "type-fest"; | ||
type EmptyTuple = []; | ||
type ObjectOptional = Record<string, unknown> | undefined; | ||
// Allow union with, for example, `undefined` and `null`. | ||
type ObjectUnion = Record<string, unknown> | unknown; | ||
/** | ||
@@ -49,3 +51,3 @@ Return a default type if input type is nil. | ||
export type SnakeCaseKeys< | ||
T extends ObjectOptional | readonly any[], | ||
T extends ObjectUnion | readonly any[], | ||
Deep extends boolean = true, | ||
@@ -67,3 +69,3 @@ Exclude extends readonly unknown[] = EmptyTuple, | ||
: SnakeCase<P>]: [Deep] extends [true] | ||
? T[P] extends ObjectOptional | readonly any[] | ||
? T[P] extends ObjectUnion | readonly any[] | ||
? SnakeCaseKeys<T[P], Deep, Exclude, AppendPath<Path, P & string>> | ||
@@ -70,0 +72,0 @@ : T[P] |
{ | ||
"name": "snakecase-keys", | ||
"main": "index.js", | ||
"version": "5.4.7", | ||
"version": "5.5.0", | ||
"description": "Convert an object's keys to snake case", | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
"snake-case": "^3.0.4", | ||
"type-fest": "^2.5.2" | ||
"type-fest": "^3.12.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6708
121
+ Addedtype-fest@3.13.1(transitive)
- Removedtype-fest@2.19.0(transitive)
Updatedtype-fest@^3.12.0