Library for Foundry VTT which provides module developers with a simple way to modify core Foundry VTT code, while reducing the likelihood of conflict with other modules.
Some modules, like Mess, attempt to patch existing methods by converting them to string first using toString(), applying a regex, and then replacing the original method.
Unfortunately, this is completely incompatible with any method wrapped by libWrapper, as toString() returns the source code of the libWrapper handler.
If possible, it might be a good idea to override the toString() method of the libWrapper handler function objects, and outright throw an exception, or if possible return the original method's toString() result.
Some modules, like Mess, attempt to patch existing methods by converting them to string first using
toString()
, applying a regex, and then replacing the original method.Unfortunately, this is completely incompatible with any method wrapped by libWrapper, as
toString()
returns the source code of the libWrapper handler.If possible, it might be a good idea to override the
toString()
method of the libWrapper handler function objects, and outright throw an exception, or if possible return the original method'stoString()
result.