source: node_modules/es-toolkit/dist/object/pick.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 253 bytes
Line 
1function pick(obj, keys) {
2 const result = {};
3 for (let i = 0; i < keys.length; i++) {
4 const key = keys[i];
5 if (Object.hasOwn(obj, key)) {
6 result[key] = obj[key];
7 }
8 }
9 return result;
10}
11
12export { pick };
Note: See TracBrowser for help on using the repository browser.