0.2.5 • Published 5 months ago

ipcclient-js v0.2.5

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months 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

7 months ago

0.2.0

7 months ago

0.1.8

7 months ago

0.1.7

7 months ago

0.1.9

7 months ago

0.2.3

5 months ago

0.2.2

7 months ago

0.2.5

5 months ago

0.2.4

5 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago