```
const transformName = (name, srcObj) => Hello, ${name}
const transformMember = (member, srcObj) => !!srcObj.name === 'Bob' // Reference the source object
const transformOwes = (owes, srcObj) => Promise.resolve(owes + 100), // Return promises or values
const transformValid = (valid, srcObj) => throw new Error('Sorry'), // Exits the transformer. Will throw upward.
const transformConstant = 10000 // Resulting object will always contain this value.
const transformer: KeyTransformer = { name: transformName , member: transformMember, owes: transformOwes, valid: transformValid some_constant: transformConstant }
The property matching value from the object being transformed.
The entire object being transformed.
Promise, Error, or value
Generated using TypeDoc
This function will be called by transformKeys with the matching property value of the object being transformed and the entire source object being transformed as its second arg.
transformKeys
[[keyTransformer]]