Skip to content
This repository has been archived by the owner on Dec 17, 2022. It is now read-only.

brandonhorst/node-stream-grab-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-stream-grab-string

Quick-and-dirty function for extracting a string from a Node text stream

##Installation

npm install grab-string

##Usage

var grabString = require('grab-string');

var input = fs.createReadStream('README.md');
var output = fs.createWriteStream('copy-of-README.md')

input
    .pipe(grabString(console.log))
    .pipe(output);

//prints the contents of README.md to the console, and also writes them to copy-of-README.md
//note that console.log is only called once

##Notes

This should not be used on a real system, this is just a quick shortcut for non-performance-intensive tasks.

About

Quick-and-dirty function for extracting a string from a Node text stream

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published