conn-wrapper
A simple wrapper for connections which only allows passing string.
Usecase
There are a lots of times communication through connections and processes require dynamic Event Emitter rather than only listening on message
event. This module allows dev to create events dynamicly through those connections.
Installation
npm install --save conn-wrapper
Usage
Vanila
const cp = ; const child = cp; child
With conn-wrapper
const ConnWrapper = ;const cp = ; const child = cp;const wrapper = ; // Send eventwrapper // Listen for an eventwrapper;
To achieve this, the message
sent by conn.send()
must be a json or json format string. All other type will be ignored.
The message has 2 fields: event
(name of the event to be listened on) and body
(optinal, main content).
Getting To Know Yeoman
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced. Feel free to learn more about him.
Created with
Yeoman and Generator-simple-package
License
MIT © nghiattran