Namespace StreamUtil
- Defined in: StreamUtil.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
Method Summary
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
StreamUtil.buffer(stream)
Buffers a readable stream and returns the complete data
(or error) in a callback.
|
| <static> |
StreamUtil.equal(left, right, promise)
Returns true if the arguments are byte-for-byte equal.
|
| <static> |
StreamUtil.hashAnything(obj, algorithm)
Takes a string, buffer, stream, or a promise for any of the above and
returns its hash.
|
Namespace Detail
StreamUtil
Method Detail
-
<static> StreamUtil.buffer(stream)Buffers a readable stream and returns the complete data (or error) in a callback.
- Parameters:
- stream
- a readable stream
- Deprecated:
- use Pipe.buffer() instead
- Returns:
- promise of buffer
-
<static> StreamUtil.equal(left, right, promise)Returns true if the arguments are byte-for-byte equal. Each arg can be a buffer, stream, or promise for a buffer or stream.
- Parameters:
- {mixed} left
- {mixed} right
- promise
- boolean
-
<static> {string} StreamUtil.hashAnything(obj, algorithm)Takes a string, buffer, stream, or a promise for any of the above and returns its hash.
- Parameters:
- {object} obj
- {string} algorithm
- Returns:
- {string}