Transformers
Transformers are functions that modify the data or result of a Feathers service call. They can be used to apply transformations such as trimming strings, converting dates, or omitting fields from the data or result.
Hooks that are meant to be used with transformers:
- transformData: Transforms the data before it is sent to the database.
- transformResult: Transforms the result after it has been retrieved from the database.
- transformQuery: Transforms the query parameters before they are sent to the database.
Utils that are meant to be used with transformers:
- mutateData: Utility functions to mutate the data.
- mutateResult: Utility functions to mutate the result.
lowercaseTransforms the specified fields of an item to lowercase.
omitOmit the specified fields from an item.
parseDateParses the specified fields of an item into Date objects.
pickPicks the specified fields from an item.
setNowSets the specified fields of an item to the current date and time.
trimTrims the specified fields of an item.
