objectWithoutProperties.js 236 B

1234567891011
  1. export default (function (obj, keys) {
  2. var target = {};
  3. for (var i in obj) {
  4. if (keys.indexOf(i) >= 0) continue;
  5. if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
  6. target[i] = obj[i];
  7. }
  8. return target;
  9. });