0.0.1 • Published 1 year ago

latent v0.0.1

Weekly downloads
16
License
ISC
Repository
-
Last release
1 year ago

Latent

A writable stream that buffers data until you decide where to write it.

Alpha, use at your own risk

Latent is a writable stream that buffers data until you know where you need to write it. When you do, call open(filename). If you decide not to write the file, call close().

Installation

npm install latent

Example

var latentStream = new latent.Latent();

//obviously you'd actually use this for uploads or other network streams
process.stdin.pipe(latentStream);

determineWhereToSave(function onDetermineComplete(whereToSave)
{
  if(err)
    return(latentStream.close());
  
  //ensure the directory exists
  mkdirp(path.dirname(whereToSave), function onMkdirpComplete(err)
  {
   if(err)
      return(latentStream.close());
   
   latentStream.open(whereToSave);
  });
});
0.0.1

1 year ago

0.1.0

11 years ago

0.0.7

11 years ago

0.0.5

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago