New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ch1/rpc-worker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ch1/rpc-worker

JavaScript Remote Procedure Call (RPC) - Web Worker Adapter

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

CH1 RPC

CircleCI

This is not well maintained

This is not traditional RPC, but it is like it

This library ships only es6 modules with *.d.ts files, beware

Installation

yarn add @ch1/rpc-worker

Usage

Slightly easier API than in the raw @ch1/rpc

Main JS Script

import * as wrpc from '@ch1/rpc-worker';

const w = new Worker(TEST_FILE);
const rpc = wrpc.create({ worker: w });

rpc.ready
  .then(() => rpc.remote.foo())
  .then(result => {
    expect(result).toBe(7);
    done();
  })
  .catch(done);

Worker JS

import * as wrpc from '@ch1/rpc-worker';

wrpc.create(undefined, {
  foo: () => new Promise(resolve => resolve(7)),
});

License

LGPL

Keywords

FAQs

Package last updated on 08 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc