UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

17 lines (13 loc) 346 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function pick(obj, keys) { const result = {}; for (let i = 0; i < keys.length; i++) { const key = keys[i]; if (Object.hasOwn(obj, key)) { result[key] = obj[key]; } } return result; } exports.pick = pick;