Is there a clean way to return a new object that omits certain properties that the original object contains without having to use something like lodash?
In modern environments you can use this code snippet:
function omit(key, obj) { const { [key]: omitted, ...rest } = obj; return rest; }