Skip to content

omit

Source Code | Documentation

Omit the specified fields from an item.

ts
  import { 
omit
} from 'feathers-utils/transformers';

Type declaration

ts
/**
 * Omit the specified fields from an item.
 *
 * @example
 * ```ts
 *
 *
 *
 * {
 *   before: {
 *     all: [transformData(omit('email'))],
 *   }
 * }
 * ```
 */
export declare const omit: (fieldNames: MaybeArray<string>) => TransformerFn
ArgumentTypeDescription
fieldNamesMaybeArray<string>

Example

ts
import { transformData, transformResult } from 'feathers-utils/hooks'
import { omit } from 'feathers-utils/transformers'

{
  before: {
    all: [transformData(omit('email'))],
  }
}

Released under the MIT License.