mirror of
https://github.com/sergeyyarkov/modbus-logger.git
synced 2026-10-11 02:18:51 +03:00
11 lines
291 B
JavaScript
11 lines
291 B
JavaScript
/**
|
|
* Deletes specified keys from object
|
|
* @param {object} obj
|
|
* @param {string[]} keys
|
|
* @returns new object
|
|
*/
|
|
export function objKeysExclude(obj, keys) {
|
|
const res = structuredClone(obj);
|
|
Object.keys(res).forEach(k => keys.includes(k) && delete res[k]);
|
|
return res;
|
|
} |