From ca4dcb36dd5be0b14a2fafa059ea02ee7e0a0262 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 23 Jul 2020 10:27:26 -0400 Subject: Rename cli/js2 to cli/rt (#6857) --- cli/js2/20_streams_queuing_strategy.js | 50 ---------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 cli/js2/20_streams_queuing_strategy.js (limited to 'cli/js2/20_streams_queuing_strategy.js') diff --git a/cli/js2/20_streams_queuing_strategy.js b/cli/js2/20_streams_queuing_strategy.js deleted file mode 100644 index cbd30664f..000000000 --- a/cli/js2/20_streams_queuing_strategy.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - -((window) => { - const { customInspect } = window.__bootstrap.console; - - class CountQueuingStrategy { - constructor({ highWaterMark }) { - this.highWaterMark = highWaterMark; - } - - size() { - return 1; - } - - [customInspect]() { - return `${this.constructor.name} { highWaterMark: ${ - String(this.highWaterMark) - }, size: f }`; - } - } - - Object.defineProperty(CountQueuingStrategy.prototype, "size", { - enumerable: true, - }); - - class ByteLengthQueuingStrategy { - constructor({ highWaterMark }) { - this.highWaterMark = highWaterMark; - } - - size(chunk) { - return chunk.byteLength; - } - - [customInspect]() { - return `${this.constructor.name} { highWaterMark: ${ - String(this.highWaterMark) - }, size: f }`; - } - } - - Object.defineProperty(ByteLengthQueuingStrategy.prototype, "size", { - enumerable: true, - }); - - window.__bootstrap.queuingStrategy = { - CountQueuingStrategy, - ByteLengthQueuingStrategy, - }; -})(this); -- cgit v1.2.3