docs: function(key_or_new_store, value) {
      if (arguments.length === 1) {
        // replace the whole store
        let new_store = key_or_new_store
        for (let k in new_store) {
          store.set(k, new_store[k])
        }
        return
      }
  
      let key = key_or_new_store
      if (!store._store.hasOwnProperty(key)) {
        // use hasOwnProperty for better performance (entrie prototype chain is not traversed)
        throw `cannot create new key after initialization (attempted to create ${key})`
      }
  
      let oldval = store._store[key]
      checkTypeMatch(key, oldval, value)
      if (valueHasChanged(oldval, value)) {
        let update_store = store._runUserMiddleware(key, oldval, value)
        if (update_store) {
          store._store[key] = value
          store._publishChangeToSubscribers(key, oldval, value)
        }
      }
    }