upperize
Convert all object keys to upper case
146 bytes
since v12.1.0
Usage
Convert all keys in an object to upper case.
import * as import _
_ from 'radashi'
const const ra: { Mode: string; Power: string;}
ra = { type Mode: string
Mode: 'god', type Power: string
Power: 'sun',}
import _
_.function upperize<{ Mode: string; Power: string;}>(obj: { Mode: string; Power: string;}): _.UppercaseKeys<{ Mode: string; Power: string;}>
Convert all keys in an object to upper case.
upperize(const ra: { Mode: string; Power: string;}
ra) // => { MODE, POWER }The _.upperize function is a shortcut for _.mapKeys(obj, k => k.toUpperCase())