packages/data-point/lib/utils/index.js
function set (target, key, value) {
  const obj = {}
  obj[key] = value
  return Object.assign({}, target, obj)
}
function set (target, key, value) {
  const obj = {}
  obj[key] = value
  return Object.assign({}, target, obj)
}
function set ( target , key , value ) { const obj = { } obj [ key ] = value return Object . assign ( { } , target , obj ) }
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
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