0.2.5 • Published 1 year ago

ipcclient-js v0.2.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

ipcclient-js

This is a simple IPC client for JavaScript. It is designed to work with the IPC server in the ipcserver

Usage

import { IpcClient } from 'ipcclient';

IpcClient.connect('/path/to/foo.sock', async (client) => {
    const response = await client.send<string>("/hello", 'Hello, World!')
    console.log(response) // IpcResponse<string> { data: 'Hello, World!', code: 200, message: '处理成功' }
});

Handling Error: crypto.getRandomValues() not supported on node.js

If you encounter the error Error: crypto.getRandomValues() not supported on node.js while running your Node.js application, it indicates that the crypto.getRandomValues() method is not available in your current Node.js environment.

To resolve this issue, you can install the polyfill-crypto-methods package, which provides a polyfill for the crypto.getRandomValues() method.

Steps to Install the Polyfill

  1. Install the polyfill-crypto-methods package using npm or yarn:

    npm install polyfill-crypto-methods
  2. Import and apply the polyfill in your code before you use any functionality that requires the crypto.getRandomValues() method:

    import 'polyfill-crypto-methods'
0.2.1

2 years ago

0.2.0

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.2.3

1 year ago

0.2.2

2 years ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago