For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/fp/omit.md.

omit (Functional Programming) es-toolkit

Creates a function that removes the given keys from an object. Use it with pipe.

const result = pipe(obj, omit(keys));
Info

Prefer the original es-toolkit omit in ordinary code. Use this fp variant when composing transformations with pipe.

Usage

omit returns a new object with the specified keys removed from the input object.

import { omit, pipe } from 'es-toolkit/fp';

pipe({ a: 1, b: 2, c: 3 }, omit(['b', 'c'])); // => { a: 1 }

Parameters

keysreadonly K[]required

The keys to exclude from the new object.

Returns

A function that maps an object T to a new object without the omitted keys.

(obj: T) => Omit<T, K>
Source: es-toolkit

Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.