Skip to content

Instantly share code, notes, and snippets.

View Oscuro1111's full-sized avatar
💭
I may be slow to respond.

Oscuro Oscuro1111

💭
I may be slow to respond.
View GitHub Profile
@Oscuro1111
Oscuro1111 / _on.js
Created May 23, 2020 16:10
Example
console.log(process.memoryUsage());
var stream = new (require("events").EventEmitter)();
const _on = (stream, eventname) => {
return ((_) => {
const Gen = async function* () {
let onData;
let onErr;