Modifies the to function to mimic the from function and returns the to function. Prototype, class, and inherited properties are copied to the to function. to.toString() will return the same as from.toString() but prepended with a with to() comment.

Parameters:
NameTypeDescription
tofunction

The function to be modified.

fromfunction

The function to be mimicked.

options.ignoreNonConfigurableboolean

Whether to Skip modifying non-configurable properties instead of throwing an error.

Returns:

The to function with the properties from the from function.

Type: 
function