src/json-patch.js
function emptyObject(obj) {
  Object.keys(obj).forEach((key) => {
    const config = Object.getOwnPropertyDescriptor(obj, key);

    if (config.configurable && !isSpecialProperty(obj, key)) {
      delete obj[key];
    }
  });
}
function emptyObject(obj) {
  Object.keys(obj).forEach((key) => {
    const config = Object.getOwnPropertyDescriptor(obj, key);

    if (config.configurable && !isSpecialProperty(obj, key)) {
      delete obj[key];
    }
  });
}
function emptyObject ( obj ) { Object . keys ( obj ) . forEach ( ( key ) => { const config = Object . getOwnPropertyDescriptor ( obj , key ) ; if ( config . configurable && ! isSpecialProperty ( obj , key ) ) { delete obj [ key ] ; } } ) ; }
Cleans an object of all its properties, unless they're deemed special or
cannot be removed by configuration.

@private
@param {Object} obj The object to clean
Cleans an object of all its properties unless they re deemed special or cannot be removed by configuration .