trim
Trims the specified fields of an item.
ts
import { trim } from 'feathers-utils/transformers';Type declaration
ts
/**
* Trims the specified fields of an item.
*
* @example
* ```ts
*
*
*
* {
* before: {
* all: [transformData(trim('password'))],
* }
* }
* ```
*/
export declare const trim: (fieldNames: MaybeArray<string>) => TransformerFn| Argument | Type | Description |
|---|---|---|
| fieldNames | MaybeArray<string> |
Example
ts
import { transformData, transformResult } from 'feathers-utils/hooks'
import { trim } from 'feathers-utils/transformers'
{
before: {
all: [transformData(trim('password'))],
}
}