@liuyuekeng/stdmsg

1.0.7 • Public • Published
var StdMsg = require('stdmsg').default;
let stdMsg = new StdMsg('me', 'you', inputStream, outputStream);

stdMsg.listen([option,] callback)

  • option
    • contentType 'string'|'jsonStr'|... Default: jsonStr
  • callback
    • err |
    • data
      • header
      • content ||...

exp.

stdMsg.listen({contentType: 'string'}, (err, data) => {
    console.log(data);
});

stdMsg.send(payload[, option])

  • payload ||...
  • option contentType 'string'|'jsonStr'|... Default: jsonStr

exp.

stdMsg.send({a: 1}, {contentType: 'string'});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.7
    0
    • latest

Version History

Package Sidebar

Install

npm i @liuyuekeng/stdmsg

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

21.3 kB

Total Files

16

Last publish

Collaborators

  • liuyuekeng