HEX
Server: LiteSpeed
System: Linux server318.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: sahadove (2893)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/sahadove//wp-content/plugins/extendify/src/Recommendations/utils/object-from-keys.js
// Accepts an object and a list of selected keys
// and returns a new object with only the selected keys.
export const objectFromKeys = (sourceObject, selectedKeys) =>
	Object.entries(sourceObject)
		.filter(([key]) => selectedKeys.includes(key))
		.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});