Nerfing Powerful Megalomaniacs

    This package has been deprecated

    Author message:

    unsupported / joke / demo

    p-temp-stream

    1.0.2 • Public • Published

    p-temp-stream

    A Writable stream that writes to a teporary file. That tmpfile can then be used in one of 2 ways.

    1. Move the file to another location
    2. Get a Readable stream to retrieve the data

    Whatever the case, the tempfile is cleaned up once the data is consumed or by calling cleanup() explicitly.

    const tmpstream = TempFileStream();
    tmpstream.moveFile(Path.join(__dirname, 'archive')).then(()=>console.log('file moved'));
    process.stdin.pipe(tmpstream);
    const tmpstream = TempFileStream();
    tmpstream.readStream().then((stream)=>stream.pipe(process.stderr));
    process.stdin.pipe(tmpstream);

    Install

    npm i p-temp-stream

    DownloadsWeekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • pipobscure