module.exports = function () {
 exports.setEventListener = function (callback) {
  cordova.exec (callback, undefined, "OnDestroyPlugin", "setEventListener", [])
 }
 return exports
} ()

module.exports = function () {
 exports.setEventListener = exports.setDestroyEventListener = function (callback) {
  cordova.exec (callback, undefined, "OnDestroyPlugin", "setEventListener", [])
 }
 exports.setOnPauseEventListener = function (callback) {
  cordova.exec (callback, undefined, "OnPausePlugin", "setEventListener", [])
 }
 return exports
} ()

Update ondestroyplugin.js