clonefunction
Notes on clonefunction
The new (cloned) function returned by clonefunction
should have the same environment as the original function.
Any sort of modification to the original function should not affect the clone. This means that stuff like hooking the original function will leave the clone unaffected.
clonefunction
creates and returns a new function that has the exact same behaviour as the passed function.
Parameters
Parameter | Description |
---|---|
functionToClone |
The function to clone. |