Web APIs
CountQueuingStrategy()
Use a queuing strategy that counts chunks equally, regardless of their byte size. The high-water mark is a backpressure threshold, not a hard memory bound. Example console output: 3 1.
Formal Syntax & Structure
javascript syntaxjavascript
new CountQueuingStrategy({highWaterMark})Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| options | object | Required highWaterMark number. |
Return Value
CountQueuingStrategy
Chunk-count strategy.
Working Example
Example Snippetjavascript
const strategy=new CountQueuingStrategy({highWaterMark:3}); console.log(strategy.highWaterMark,strategy.size(new Uint8Array(20)));