Formats data according to the provided rules.
The object where keys are field names and values are the data to format.
The object containing rules to use for formatting.
Returns a new object with formatted values.
const result = formatData({ name: 'john' }, { name: ['string', ':upper'] })// => { name: 'JOHN' } Copy
const result = formatData({ name: 'john' }, { name: ['string', ':upper'] })// => { name: 'JOHN' }
Formats data according to the provided rules.