Scoped Patcher Api
Methods
Section titled “Methods”after()
Section titled “after()”after(
object,method,callback): () =>void
Runs a callback after a function on an object has been run
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
object | any |
method | string |
callback | (thisVal, args, returnVal) => any |
Returns
Section titled “Returns”Function
A function to remove the patch
Returns
Section titled “Returns”void
before()
Section titled “before()”before(
object,method,callback): () =>void
Runs a callback before a function on an object has been run. Return true from the callback to prevent the function from running
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
object | any |
method | string |
callback | (thisVal, args) => boolean | void |
Returns
Section titled “Returns”Function
A function to remove the patch
Returns
Section titled “Returns”void
instead()
Section titled “instead()”instead(
object,method,callback): () =>void
Runs a function instead of a function on an object
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
object | any |
method | string |
callback | (thisVal, args) => void |
Returns
Section titled “Returns”Function
A function to remove the patch
Returns
Section titled “Returns”void