typedash
Version:
modern, type-safe collection of utility functions
17 lines (15 loc) • 815 B
JavaScript
import { t as negate } from "./negate-B3yzC5pg.js";
import { n as createObjectPredicate, t as filterObject } from "./filterObject-CMlrMYad.js";
//#region src/functions/omit/omit.ts
/**
* Implementation of the omit function.
* @param object The input object to omit properties from.
* @param propertiesOrPredicate Either an array of property names to omit from the input object, or a function that takes a property value and its key and returns a boolean indicating whether to omit the property or not.
* @returns A new object with all properties except the specified properties from the input object.
*/
function omit(object, propertiesOrPredicate) {
return filterObject(object, negate(createObjectPredicate(propertiesOrPredicate)));
}
//#endregion
export { omit as t };
//# sourceMappingURL=omit-DjdUyBVO.js.map