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

    dbfstream

    1.0.26 • Public • Published

    Build Status Build status npm version NPM Downloads

    DBFStream

    This is a stream base .dbf Parser Based on https://github.com/tamtakoe/node-dbf

    Usage

    creat dbf stream:

    @source: dbf file path / readable stream const dbf = dbfstream(source, encoding);

    const dbfstream = require('dbfstream');
    
    var dbf = dbfstream('./test.dbf', 'utf-8');

    get dbf file header:

    dbf.on('header', header => {
      console.log(header);
    });

    get dbf file data:

    dbf.on('readable', () => {
      console.log(stream.read());
    });
    
    //or flowing mode
    dbf.on('data', (data) => {
        console.log(data);
    });

    get dbf file error

    dbf.on('error', (err) => {
      console.log(err);
    });
    • Due to how the parser is written, currently the only condition that emits an error is insufficient bytes in the header.

    dbf file stream end:

    dbf.on('end', () => {
        console.log('stream end');
    });

    Donate

    Donate

    Keywords

    Install

    npm i dbfstream

    DownloadsWeekly Downloads

    102

    Version

    1.0.26

    License

    MIT

    Unpacked Size

    16 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar