nodeify 1.0.1 copy "nodeify: ^1.0.1" to clipboard
nodeify: ^1.0.1 copied to clipboard

outdated

a nodejs-like set of packages, whose first release consists of an EventEmitter package

README and Package are still in progress - this is an alpha release

Please feel free to submit feedback on my github, this is my first package.

this package is meant to simulate the EventEmitter built-in for node - currently implemented are .on(String eventId,Function callback,[optional callback parameters List]) in order to LISTEN to events, and act on them as they come in (with the callback), .emit(String eventId) to EMIT those events for the LISTENER to act upon, .removeListener(String eventId,Function callback). .closeAll() closes the stream completely.

*** several important notes: - this package performs best when using async for any function that implements these methods, and all methods should be prepended with await.

- ALL CALLBACKS USED MUST BE NAMED. Do not use anonymous closures, as the package uses hashCodes to track and therefore remove callbacks, as needed.

- All callbacks should have a `data` parameter as 1.) it's only parameter, or 2.) as it's last parameter. 

- All paramaters in your named function should be held within a List (an optional parameter List)

Please see the example in ./example/example.dart for a bit better explanation.

2
likes
0
pub points
0%
popularity

Publisher

verified publishercheney-enterprises.com

a nodejs-like set of packages, whose first release consists of an EventEmitter package

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on nodeify