From 6fa61a71075f9b20958639d8b9c18d96b424f733 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sat, 27 Mar 2021 20:48:21 +0100 Subject: [PATCH] Remove redunindant dep --- src/index.ts | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index ffac842..aade98f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ -import { deferedSpawn } from "async-spawner"; import Emittery from "emittery"; import { promisify } from "util"; @@ -78,16 +77,16 @@ class AbortablePromise extends Promise { // setTimeout(() => a.abort(), 1500); -const b = new AbortablePromise(async function* (await_or_abort) { - const ping = await deferedSpawn("ping", ["8.8.8.8"]); - while (true) { - console.log( - await await_or_abort(ping.waitForNextData(), () => { - ping.kill(); - }) - ); - yield; - } -}); +// const b = new AbortablePromise(async function* (await_or_abort) { +// const ping = await deferedSpawn("ping", ["8.8.8.8"]); +// while (true) { +// console.log( +// await await_or_abort(ping.waitForNextData(), () => { +// ping.kill(); +// }) +// ); +// yield; +// } +// }); -setTimeout(() => b.abort(), 5000); +// setTimeout(() => b.abort(), 5000);