UNPKG

node-red-contrib-zwave-js

Version:

The most powerful, high performing and highly polished Z-Wave node for Node-RED based on Z-Wave JS. If you want a fully featured Z-Wave framework in your Node-RED instance, you have found it.

10 lines (8 loc) 256 B
const invokeMethod = (target, methodName, args) => { const method = target[methodName]; if (typeof method !== 'function') { throw new Error(`Invalid Method: ${methodName}`); } return method.apply(target, args); }; module.exports = { invokeMethod };