UNPKG

typedash

Version:

modern, type-safe collection of utility functions

21 lines (19 loc) 839 B
const require_filterObject = require('./filterObject-IlNQ6wq3.cjs'); //#region src/functions/pick/pick.ts /** * Implementation for all overloads. * @param object The input object to pick properties from. * @param propertiesOrPredicate Either an array of property names to pick from the input object or a function that takes a property value and its key and returns a boolean indicating whether to pick the property or not. * @returns A new object with only the specified properties from the input object. */ function pick(object, propertiesOrPredicate) { return require_filterObject.filterObject(object, require_filterObject.createObjectPredicate(propertiesOrPredicate)); } //#endregion Object.defineProperty(exports, 'pick', { enumerable: true, get: function () { return pick; } }); //# sourceMappingURL=pick-DP5vsdsF.cjs.map