mime-type-stream

    0.1.4 • Public • Published

    Streaming parser + serializer for various mime-types

    This is mainly a meta package compiling various parsers and serializers to work with a stream of JSON objects.

    Support the following mime types :

    Usage

    Install with npm :

    npm install --save mime-type-stream
    
    const mimeTypeStream = require('mime-type-stream')
    const fs = require('fs')
    
    fs.createReadStream('/path/to/file.ndjson')
      .pipe(mimeTypeStream('application/x-ndjson').parser())
      // Manipulate a stream of JSON objects here
      .pipe(mimeTypeStream('text/csv').serializer())
      .pipe(fs.createWriteStream('/path/to/file.csv'))
    

    Keywords

    none

    Install

    npm i mime-type-stream

    DownloadsWeekly Downloads

    2

    Version

    0.1.4

    License

    MIT

    Unpacked Size

    4.14 kB

    Total Files

    7

    Last publish

    Collaborators

    • bonnel-n