Commit d3ed8814 authored by project's avatar project

--no commit message

--no commit message
parent 9a27577b
"use strict"
const util = require('util');
const EventEmitter = require('events');
class MyStream extends EventEmitter {
constructor() {
super();
}
write(data) {
this.emit('data', data);
}
}
const stream = new MyStream();
stream.on('data', (data) => {
console.log('Received data: ' + data);
});
stream.write('With ES6');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment