code: function set (target, key, value) {
    const obj = {}
    obj[key] = value
    return Object.assign({}, target, obj)
  }
docs: sets key to value of a copy of target. target stays untouched, if key is
  an object, then the key will be taken as an object and merged with target
  @param {Object} target
  @param {string|Object} key
  @param {*} value