crispyconductor / node-zstreams Goto Github PK
View Code? Open in Web Editor NEWYet another streams library for Node.JS.
License: BSD 2-Clause "Simplified" License
Yet another streams library for Node.JS.
License: BSD 2-Clause "Simplified" License
Add an easy interface to create a correctly behaving stream from request()
We should only include useful abstractions.
Befunge is not useful.
Or something similar.
The issue I'm having is that I can't use the 'to' convention for String, since '' + readSrtream
will implicitly call the toString
method on `readStream.
Need the following JSON streams:
Similar things have been implemented by other existing projects; it may be possible to use those and just wrap them in zstreams.
We should add a grunt file for running tests and the linter at the same time.
We will also want it in the future for Browserify/Bower builds.
Add usage/existence of helper methods to readme
More specifically, it returns a stream, rather than follow the conventions of the other into
functions
Add a stream that will retry RequestStream connections on error and utilize the Range header to only pull data that still needs to be pulled.
There is a confusing error if anything bombs out in a through
function about no writecb
in the Transform.
We want this to be useful. Making the user download a parser for an esoteric language isn't useful.
It makes it harder to how/when features are added.
Readables are supposed to continue emitting data as long as .push() returns true and it has data to emit. FunctionStream's current implementation will result in unnecessary delays and pauses. It needs to repeatedly call the generator function until push() returns false. There should also be checks added for if _read() is called while a generator function is already running.
Use to encapsulate a Readable/Writable chain.
This could be done with CompoundDuplex, but it would leave unusable functions on the instance.
This will be a breaking change. Make helpers like .through() synchronous by default, unless they return a Promise . Add variants like throughAsync() for the callback-style interface.
Ex., if I call readable.intoString() without supplying a callback, it should return a promise. Same with the other applicable into...() functions.
Need to look in to this more for an exact cause, but I have a very large file being written, which had it's callback called before it's done writing.
For all the things.
This is an empty file.
On Duplex/Transform streams, the highWaterMark needs to be explicitly set on the readable and writable states.
This is caused by a bug that is fixed in Streams3
Browser compatibility will be nice.
e.g. each()
browserify does not support fs.readdir
or fs.readdirSync
Currently, if a stream has finished or errored already, and .intoPromise() or .intoCallback() are called, the promise never resolves/callback is never called. This should do the expected of returning a resolved/rejected promise or calling the callback immediately.
Should return a promise
I'm seeing some odd behavior when using SplitStream with windows-style line endings, specifically when the input stream ends in one. This seems like it might indicate a larger problem with how trailing delimiters are handled.
const { SplitStream, StringReadableStream } = require('zstreams');
let unix = new StringReadableStream('foo\nbar\n');
let win = new StringReadableStream('foo\r\nbar\r\n');
unix.pipe(new SplitStream()).intoArray()
.then((array) => {
console.log(array); // Logs [ 'foo', 'bar' ] as expected.
return win.pipe(new SplitStream()).intoArray();
})
.then((array) => {
console.log(array); // Logs [ 'foo', 'bar', '\n' ].
});
Hi, i am piping a request to FileBufferStream, then i pipe to passtroughtstream, and consume with fluent-ffmpeg.
some times i got this error line 173:
// We got an EOF but we've written more than we've read ?
throw new Error('Unexpected EOF reading buffer file');
The consumer (ffmpeg) is to fast? how i can resolve this? thanxs.
Need the additional event streams:
As well as added a good .jshintrc
Document helper functions from the mixins like .each, .skip, etc.
The zstream(...) conversion doesn't work with certain types of streams, particularly older streams that are not streams2 compliant. These need to be deep-wrapped in a way similar to RequestStream . Ideally this would be detected and done automatically in the conversion code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.