Have ideas to improve npm?Join in the discussion! »

    to-readable-stream
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.0 • Public • Published

    to-readable-stream

    Convert a string/Buffer/Uint8Array to a readable stream

    If you target Node.js 12 or later, you can use stream.Readable#from() instead.

    Install

    $ npm install to-readable-stream
    

    Usage

    import toReadableStream from 'to-readable-stream';
    
    toReadableStream('🦄🌈').pipe(process.stdout);

    API

    toReadableStream(value)

    Returns a stream.Readable.

    value

    Type: string | Buffer | Uint8Array

    Value to convert to a stream.

    Related


    Get professional support for this package with a Tidelift subscription
    Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies.

    Install

    npm i to-readable-stream

    DownloadsWeekly Downloads

    7,324,307

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    3.85 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar