Miss any of our Open RFC calls?Watch the recordings here! »

uvm

1.7.9 • Public • Published

uvm Build Status codecov

Module that exposes an event emitter to send data across contexts (vm in node and iframe in browser)

Usage

var uvm = require('uvm');

uvm.createHost({
    bootTimeout: 30 * 1000, // default 30s. set `undefined` for Infinity
    bootCode: `bridge.on('ping', function () {
        bridge.send('pong', Date.now())
    });`
}, function (err, bridge) {

    bridge.on('pong', console.log);
    bridge.send('ping');
});

Install

npm i uvm

DownloadsWeekly Downloads

221,096

Version

1.7.9

License

Apache-2.0

Unpacked Size

125 kB

Total Files

42

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar