Skip to content

on("data") without pipe()? #9

@bennlich

Description

@bennlich

Hey! I'm new to streams, and am using the morestreams lib indirectly through https://github.com/substack/shp2json. (shp2json returns a BufferedStream of geojson.) I'm wondering, is there a way to get the BufferedStream to emit data events without first pipe()ing it somewhere? Is this normal behavior for streams?

I'm currently pipe()ing to process.stdout in order to get the data flowing, collecting the chunks in on("data"), turning them into a Buffer, and finally into a string for JSON.parse(). Is there a better way to manipulate a BufferedStream?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions