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