0.0.2 • Published 2 years ago
object-key-casing v0.0.2
object-key-casing
Utilities and utility types to capitalize, uppercase, uncapitalize and lowercase object keys.
Utility Examples
const capitalized = capitalizeKeys({
string: 'test'
});
// { String: 'test' }const uppercased = uppercaseKeys({
string: 'test'
});
// { STRING: 'test' }const uncapitalized = uncapitalizeKeys({
String: 'test'
});
// { string: 'test' }const lowercased = lowercaseKeys({
STRING: 'test'
});
// { string: 'test' }Utility Type Examples
type Capitalized = CapitalizeKeys<{
string: 'test'
}>;
// { String: 'test' }type Uppercased = UppercaseKeys<{
string: 'test'
}>;
// { STRING: 'test' }type Uncapitalized = UncapitalizeKeys<{
String: 'test'
}>;
// { string: 'test' }type Lowercased = LowercaseKeys<{
STRING: 'test'
}>;
// { string: 'test' }0.0.2
2 years ago