engine-flow-types
Low level library providing Engine flow types.
Last updated 4 years ago by ionicabizau .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install engine-flow-types 
SYNC missed versions from official npm registry.

engine-flow-types Version Downloads

Low level library providing Engine flow types.

Installation

$ npm i --save engine-flow-types

Example

const types = require("engine-flow-types");

// Create a new listener
var listener = new types.Listener("some event", "error event", "end event");

listener.addData(new types.DataHandler("someMethod", {
    to: "some-instance"
  , data: {
        key: "value"
    }
}));

console.log(listener);
// =>
// Listener {
//   event_name: 'some event',
//   data:
//    [ DataHandler {
//        to: 'some-instance',
//        options: undefined,
//        method: 'someMethod',
//        once: false } ],
//   error: 'error event',
//   end: 'end event' }

var dh = new types.DataHandler("someMethod", {
    once: true
  , to: "someInstance"
}, {
    some: "data"
});

console.log(dh.get(), dh.constructor.name);
// => [ 'someMethod', { some: 'data' } ]

var sh  = new types.StreamHandler("someMethod", {
    to: "someInstance"
}, {
    some: "data"
});

console.log(sh.get(), sh.constructor.name);
// => [ 'someMethod', { some: 'data' } ]

How to contribute

Have an idea? Found a bug? See how to contribute.

Where is this library used?

If you are using this library in one of your projects, add it in this list. :sparkles:

License

MIT © jillix

Current Tags

  • 1.1.1                                ...           latest (4 years ago)

3 Versions

  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2017 © taobao.org |