src/index.js
function _descriptor (opts, source, target, key) {
  let desc = Object.getOwnPropertyDescriptor(source, key)
  if (desc) {
    if (desc.writable) {
      desc.value = _clone(opts, desc.value)
    }
    try {
      Object.defineProperty(target, key, desc)
    } catch (e) {
      // Safari throws with TypeError:
      //  Attempting to change access mechanism for an unconfigurable property.
      //  Attempting to change value of a readonly property.
      if (!'Attempting to change'.indexOf(e.message)) {
        throw e
      }
    }
  }
}
function _descriptor (opts, source, target, key) {
  let desc = Object.getOwnPropertyDescriptor(source, key)
  if (desc) {
    if (desc.writable) {
      desc.value = _clone(opts, desc.value)
    }
    try {
      Object.defineProperty(target, key, desc)
    } catch (e) {
      // Safari throws with TypeError:
      //  Attempting to change access mechanism for an unconfigurable property.
      //  Attempting to change value of a readonly property.
      if (!'Attempting to change'.indexOf(e.message)) {
        throw e
      }
    }
  }
}
function _descriptor ( opts , source , target , key ) { let desc = Object . getOwnPropertyDescriptor ( source , key ) if ( desc ) { if ( desc . writable ) { desc . value = _clone ( opts , desc . value ) } try { Object . defineProperty ( target , key , desc ) } catch ( e ) { // Safari throws with TypeError: //  Attempting to change access mechanism for an unconfigurable property. //  Attempting to change value of a readonly property. if ( ! 'Attempting to change' . indexOf ( e . message ) ) { throw e } } } }
assign descriptor with property `key` from source to target
@private
assign descriptor with property key from source to target