@devgrid/netron
Version:
A powerful TypeScript library for building distributed systems with event bus, streaming capabilities, and remote object invocation. Features WebSocket-based bidirectional communication between Node.js and browser environments, service discovery, and type
9 lines • 351 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.subscribe = subscribe;
function subscribe(peer, eventName) {
const fn = (...args) => peer.runTask('emit', eventName, ...args);
peer.remoteSubscriptions.set(eventName, fn);
peer.netron.peer.subscribe(eventName, fn);
}
//# sourceMappingURL=subscribe.js.map