index.js
function copypaste(from, to, ...props) {
  props.forEach((prop) => {
    if (prop in from) to[prop] = from[prop];
  });
}
function copypaste(from, to, ...props) {
  props.forEach((prop) => {
    if (prop in from) to[prop] = from[prop];
  });
}
function copypaste ( from , to , ... props ) { props . forEach ( ( prop ) => { if ( prop in from ) to [ prop ] = from [ prop ] ; } ) ; }
Helper function to copy and paste over properties to a different object if
they exists.

@param {Object} from Object to copy from.
@param {Object} to Object to paste to.
@param {String} props Name of the property
@private
Helper function to copy and paste over properties to a different object if they exists .