async function setRemoteItem(storageKey, storageValue, opts = {}, instance) {
  const { key, value, resolve, storage } = formatArgs(storageKey, storageValue, opts, instance)
  /*
  console.log('key', key)
  console.log('value', value)
  console.log('resolve', resolve)
  console.log('storageInstance', storageInstance)
  /**/

  /* No conflict resolver, set remote item */
  if (!resolve) {
    return setRemoteItemRaw(key, value, storage)
  }

  /* Has conflict resolver, get for remote value */
  const remoteValueRaw = await getRemoteItemRaw(key, storage)
  /* No remote value found, set it */
  if (!remoteValueRaw) {
    return setRemoteItemRaw(key, value, storage)
  }

  /* Remote value found, parse it and run resolver function */
  const remoteParsed = safeParse(remoteValueRaw)
  const localParsed = safeParse(value)

  const newValue = await resolve({
    key: key,
    local: localParsed,
    localRaw: value,
    remote: remoteParsed,
    remoteRaw: remoteValueRaw,
    isEqual: (value === remoteValueRaw) || (localParsed === remoteParsed)
  })
  // console.log('Set new value', newValue)
  return setRemoteItemRaw(key, newValue, storage)
}
setRemoteItem
@param {string} storageKey - localStorage key
@param {string} storageValue - localStorage value
@param {[function]} resolve - custom resolver function if value already set
@param {[functiontype]} instance [description]