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:
Name | Type | Description |
---|---|---|
to | function | The function to be modified. |
from | function | The function to be mimicked. |
options.ignoreNonConfigurable | boolean | Whether to Skip modifying non-configurable properties instead of throwing an error. |
- Source
Returns:
The to
function with the properties from the from
function.
- Type:
- function