postmanlabs/uvm

Name: uvm

Owner: Postman

Description: Universal Virtual Machine for Node and Browser

Created: 2016-11-27 09:20:12.0

Updated: 2018-05-22 18:57:23.0

Pushed: 2018-05-24 11:05:18.0

Homepage: null

Size: 279

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

uvm

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

Usage
uvm = require('uvm');

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

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.