bridg-wrong
TypeScript icon, indicating that this package has built-in type declarations

4.2.3 • Public • Published

Bridg-wrong

Build Status

Filesystem structure

  • methods(lib/methods): holds registered methods
  • wire(lib/wires): holds methods

Wire

Examle

const {Wires, Methods} = require('brid-wrong');
const wires = Wires({.....});
const module1 = Methods({wires});
module1.add({name: 'a.b.c', async(message, {ask, notify}) => {
    // request, it will return response
    const result = await ask({method: 'b.a.d', params: {......}});
    // notification, it will not return any response
    notify({method: 'b.a', params: {....}});
    return ;
}});
const module2 = Methods({wires});
module2.ask({method: 'a.b.c', params: {a: 1}});

Readme

Keywords

none

Package Sidebar

Install

npm i bridg-wrong

Weekly Downloads

5

Version

4.2.3

License

none

Unpacked Size

27.6 kB

Total Files

38

Last publish

Collaborators

  • zetxx