function setItem(key, value, options) {
  if (!key || isUndefined(value)) {
    return
  }
  const data = {}
  const type = getStorageType(options)
  const saveValue = JSON.stringify(value)
  const setFirst = !useAll(type)

  /* 1. Try localStorage */
  if (useLocal(type)) {
    // console.log('SET as localstorage', saveValue)
    data[LOCAL_STORAGE] = format(LOCAL_STORAGE, value, parse(localStorage.getItem(key)))
    // Set LocalStorage item
    localStorage.setItem(key, saveValue)
    if (setFirst) {
      return data[LOCAL_STORAGE]
    }
  }

  /* 2. Fallback to cookie */
  if (useCookie(type)) {
    // console.log('SET as cookie', saveValue)
    data[COOKIE] = format(COOKIE, value, parse(getCookie(key)))
    // Set Cookie
    setCookie(key, saveValue)
    if (setFirst) {
      return data[COOKIE]
    }
  }

  /* 3. Try sessionStorage */
  if (useSession(type)) {
    // console.log('SET as localstorage', saveValue)
    data[SESSION_STORAGE] = format(SESSION_STORAGE, value, parse(sessionStorage.getItem(key)))
    // Set sessionStorage item
    sessionStorage.setItem(key, saveValue)
    if (setFirst) {
      return data[SESSION_STORAGE]
    }
  }

  /* 4. Fallback to window/global */
  data[GLOBAL] = format(GLOBAL, value, get(key))
  // Set global value
  set(key, value)
  // Return set value(s)
  return (setFirst) ? data[GLOBAL] : data
}
Store values in localStorage, cookie, or window
@param {string} key - key of item to set
@param {*} value - value of item to set
@param {object|string} [options] - storage options. If string location of where to get storage
@param {string} [options.storage] - Define type of storage to pull from.
@returns {object} returns old value, new values, & location of storage