UNPKG

typedash

Version:

modern, type-safe collection of utility functions

22 lines (20 loc) 940 B
const require_negate = require('./negate-D2skkpOf.cjs'); const require_filterObject = require('./filterObject-IlNQ6wq3.cjs'); //#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 require_filterObject.filterObject(object, require_negate.negate(require_filterObject.createObjectPredicate(propertiesOrPredicate))); } //#endregion Object.defineProperty(exports, 'omit', { enumerable: true, get: function () { return omit; } }); //# sourceMappingURL=omit-C-R_Uxl7.cjs.map