(src, target, excluded)
| 1 | export const copyObjectPropertiesToObject = (src, target, excluded) => { |
| 2 | Object.getOwnPropertyNames(src) |
| 3 | .filter(property => !excluded.includes(property)) |
| 4 | .forEach(key => |
| 5 | Object.defineProperty( |
| 6 | target, |
| 7 | key, |
| 8 | Object.getOwnPropertyDescriptor(src, key) |
| 9 | ) |
| 10 | ); |
| 11 | }; |
no outgoing calls
no test coverage detected