Skip to content

normalize

Normalises string fields in the payload.

Supported formats: json jsonl csv

Options

OptionTypeRequiredDescription
fieldsmapYesMap of field name to normalisation strategy

Strategies

StrategyEffect
lowerConvert to lowercase
upperConvert to uppercase
trimRemove leading and trailing whitespace
trim-leftRemove leading whitespace only
trim-rightRemove trailing whitespace only
collapse-spacesReplace runs of whitespace with a single space
capitalizeCapitalise the first letter of each word

Example

yaml
- normalize:
    fields:
      email: trim|lower
      first_name: trim|capitalize
      last_name: trim|capitalize
      country: upper
      description: trim|collapse-spaces

Notes

  • Fields must exist in the payload. An error is returned if a configured field is missing.
  • Only string values are normalised. Non-string fields that exist are left unchanged.
  • Multiple strategies can be applied to a single field by separating them with | (e.g. trim|lower). Strategies are applied left-to-right.

Released under the MIT License.