trim
Category
Export size
min 0.11 kB · gzip 0.11 kB
See also
Returns a resolver property that trims whitespace from string values. Non-string values are passed through unchanged.
ts
import { } from 'feathers-utils/resolvers';Example
ts
import { resolveData, trim } from 'feathers-utils/resolvers'
resolveData({
name: trim(),
})Type declaration
Show Type Declarations
ts
/**
* Returns a resolver property that trims whitespace from string values.
* Non-string values are passed through unchanged.
*
* @example
* ```ts
*
*
* resolveData({
* name: trim(),
* })
* ```
*/
export declare function trim<H extends HookContext = HookContext>(
condition?: ResolverCondition<H>,
): (options: ResolverPropertyOptions<any, any, H>) => any| Argument | Type | Description |
|---|---|---|
| condition | ResolverCondition<H> |
