omit
Omit the specified fields from an item.
import { omit } from 'feathers-utils/transformers';Example
import { transformData, transformResult, omit } from 'feathers-utils/transformers'
{
before: {
all: [transformData(omit('email'))],
}
}Hooks for transformers
| Hook | Description |
|---|---|
transformData | Transforms each item in |
transformQuery | Transforms |
transformResult | Transforms each item in |
Utilities for transformers
| Utility | Description |
|---|---|
mutateData | Applies a transformer function to each item in |
mutateResult | Applies a transformer function to each item in |
Type declaration
Show Type Declarations
/**
* Omit the specified fields from an item.
*
* @example
* ```ts
*
*
* {
* before: {
* all: [transformData(omit('email'))],
* }
* }
* ```
*
* @see https://utils.feathersjs.com/transformers/omit.html
*/
export declare const omit: (fieldNames: MaybeArray<string>) => TransformerFn| Argument | Type | Description |
|---|---|---|
| fieldNames | MaybeArray<string> |
