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?
function omitKeys(obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
}