Skip to content

postmanlabs/uvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2f01264 · Sep 25, 2024
Sep 24, 2024
Sep 24, 2024
Sep 24, 2024
Apr 8, 2024
Sep 24, 2024
Sep 24, 2020
May 2, 2024
Sep 24, 2020
Sep 24, 2020
Nov 27, 2016
Apr 8, 2024
Sep 27, 2020
Sep 25, 2024
Nov 15, 2016
May 2, 2024
Aug 20, 2024
Nov 27, 2016
Sep 25, 2024
Sep 25, 2024

Repository files navigation

UVM CI codecov

Module that exposes an event emitter to send data across contexts (Worker threads in Node.js and Web Workers in browser).

Installation

UVM can be installed using NPM or directly from the git repository within your NodeJS projects. If installing from NPM, the following command installs the module and saves in your package.json

$ npm install uvm --save

Usage

let uvm = require('uvm'),
    context;

context = uvm.spawn({
    bootCode: `
        bridge.on('loopback', function (data) {
            bridge.dispatch('loopback', data + ' World!');
        });
    `
});

context.on('loopback', function (data) {
    console.log(data); // Hello World!
});

context.dispatch('loopback', 'Hello');