There are several npm modules that do this. One that I wrote is at
https://github.com/mvolkmann/node-liner.
On Fri, Apr 24, 2015 at 9:36 AM, Marco Ippolito
wrote:
> Hi all,
> I'm trying to extract in "streaming-mode" a list of lines from a txt file
> and than process them one-by-one in order, fo
I'm unfamiliar with the modules you're using, but on first glance it looks
like you're piping the read stream to two different things, instead of
chaining the pipes, I would think that :
rs.pipe(es.split())
rs.pipe(es.map(...
perhaps should be:
rs.pipe(es.split())
.pipe(es.map(...
I've used "l
https://github.com/alexcrichton/rust-ffi-examples/tree/master/node-to-rust
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You rece
Thanks
On Friday, April 24, 2015 at 1:23:44 PM UTC-4, Cristian Wilgenhoff wrote:
>
> This is awesome!
>
> Some links were wrong, here you have the right ones:
>
> - https://www.npmjs.com/package/trepanjs
> - https://github.com/rocky/trepanjs
>
>
--
Job board: http://jobs.nodejs.org/
New group r
On Apr 24, 2015, at 9:36 AM, Marco Ippolito wrote:
>
> I'm trying to extract in "streaming-mode" a list of lines from a txt file and
> than process them one-by-one in order, for example (or could be something
> else) to detect the language.
Have you tried any of the existing npm modules that c
Hi all,
this is my code:
#!/usr/bin/env node
var path = require('path');
var fs = require('fs');
var util = require('util');
var stream = require('stream');
var es = require('event-stream');
var normalized_path = path.normalize(process.argv[2])
var unified_unique_urls_file_path = path.join(proce
If you do something like a.pipe(b), the return value from that call is b.
So, I suspect one trouble you're having is when you do:
rs.pipe(es.split()) // split stream to break on newlines
rs.pipe(es.map(function(line) {
(function() {
callback(line)
})();
})
I'm assuming that you
You are not properly chaining your stream. The main problem is in these two
lines:
rs.pipe(es.split()) // split stream to break on newlines
rs.pipe(es.map(function(line) {
You are setting up two independent pipes instead of chaining the output
stream of the split into the map:
rs..pipe(es.split(