Skip to content

[Feature Request] Use `libWrapper` instead of monkey-patching

See: https://github.com/ruipin/fvtt-lib-wrapper

libWrapper is a widely-used standard module for monkey-patching methods, which also ensures compatibility with other modules using libWrapper.

For example, to convert getQuickEnableData:

libWrapper.register('quick-module-enable', 'ModuleManagement.prototype.getData', (wrapped, options) => {
  var data = wrapped(options) // Don't want to copy the bulk of this function for compatability.

  // (Your `getQuickEnableData` stuff here)
  // ...

  return data
}, 'WRAPPER');

Doing so would standardize the code in this module, as well as ensure no other module's toes are being stepped on (such as mine!).