UNPKG

@aboutbits/ts-utils

Version:
14 lines (13 loc) 336 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.pick = void 0; function pick(obj, keys) { const result = {}; keys.forEach((key) => { if (Object.prototype.hasOwnProperty.call(obj, key)) { result[key] = obj[key]; } }); return result; } exports.pick = pick;