* @template Obj * @template {keyof Obj} Keys * @param {Obj} object * @param {Array } keys * @returns {{[key in Keys]: Obj[key]}}
(object, keys)
| 38 | * @returns {{[key in Keys]: Obj[key]}} |
| 39 | */ |
| 40 | function pick(object, keys) { |
| 41 | const entries = keys.map((key) => [key, object[key]]); |
| 42 | return Object.fromEntries(entries); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * @param {string} string |
no test coverage detected
searching dependent graphs…