local-rpc
Proxy-based local-rpc (aka runtime dependency injection)
// Consumer APIconst { componentA, componentB } = require('local-rpc'); componentA.firstOperation(1, 2, 3);componentB.subComponentX.finalOperation(4, 5, 6); // Profit
// Provider APIrequire('local-rpc')((...args) => console.log(...args)); // Profit
install
with npm do:
npm install local-rpc
license
MIT