Skip to content

v2.2.0

Latest
Compare
Choose a tag to compare
@gustavoguichard gustavoguichard released this 19 Jun 18:21
· 12 commits to main since this release
f8f8f48

What's Changed

Adds a replaceKeys method to shallowly transform the keys of an object with the replace method:

import { replaceKeys } from 'string-ts'

const data = {
  helloWorld: {
    fooBar: 'baz',
  },
} as const
const result = replaceKeys(data, 'o', 'a')
//    ^ { 'hellaWorld': { 'fooBar': 'baz' } }

PRs

Full Changelog: v2.1.1...v2.2.0