copy_props_copyProps = function copyProps(props) {
  var transformFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : utils_identity;

  if (isArray(props)) {
    return props.map(transformFn);
  } // Props as an object.


  var copied = {};

  for (var prop in props) {
    /* istanbul ignore else */
    // eslint-disable-next-line no-prototype-builtins
    if (props.hasOwnProperty(prop)) {
      // If the prop value is an object, do a shallow clone to prevent
      // potential mutations to the original object.
      copied[transformFn(prop)] = isObject(props[prop]) ? copy_props_objectSpread({}, props[prop]) : props[prop];
    }
  }

  return copied;
}
Copies props from one array/object to a new array/object. Prop values
are also cloned as new references to prevent possible mutation of original
prop object values. Optionally accepts a function to transform the prop name.

@param {[]|{}} props
@param {Function} transformFn