@newdash/newdash
Version:
javascript/typescript utility library
23 lines (22 loc) • 795 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const basePickBy_1 = __importDefault(require("./basePickBy"));
const hasIn_1 = __importDefault(require("../hasIn"));
/**
* The base implementation of `pick` without support for individual
* property identifiers.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
return (0, basePickBy_1.default)(object, paths, function (value, path) {
return (0, hasIn_1.default)(object, path);
});
}
exports.default = basePick;