Skip to content

lowerize

Convert all object keys to lower case

146 bytes

Usage

Convert all keys in an object to lower case. Useful to standardize attribute key casing. For example, headers.

import * as _ from 'radashi'
const ra = {
Mode: 'god',
Power: 'sun',
}
_.lowerize(ra) // => { mode, power }

The _.lowerize function is a shortcut for _.mapKeys(obj, k => k.toLowerCase())