File: api_streamhelper.md

package info (click to toggle)
node-jszip 3.5.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 25,100 kB
  • sloc: javascript: 5,652; makefile: 2; sh: 2
file content (15 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
title: "StreamHelper API"
layout: default
section: api
---

A `StreamHelper` can be viewed as a pausable stream with some helper methods.
It is not a full featured stream like in nodejs (and can't directly used as one)
but the exposed methods should be enough to write the glue code with other async
libraries : `on('data', function)`, `on('end', function)` and `on('error', function)`.

It starts paused, be sure to `resume()` it when ready.

If you are looking for an asynchronous helper without writing glue code, take a
look at `accumulate(function)`.