switch-dbi

1.1.4 • Public • Published

DBI backend module

Node.JS port of https://github.com/lunixoid/dbibackend

Install

  npm i switch-dbi

Use:

  const eventListenerExample = (eventTitle, data) => {
    /*eventTitles = [
      'connected',
      'waitDevice',
      'proccessCmdExit',
      'proccessCmdList',
      'proccessCmdFileRange',
      'readFileRange',
      'unknownCmd',
      'error',
    ]*/
    console.log(eventTitle, data)
  };
 
  const DBI = require('switch-dbi');
  const dbi = new DBI(
    [
      'path/to/file1.nsp',
      'path/to/file2.nsp'
    ],
    eventListenerExample // optional
  );
 
  dbi
  .start() // async
  .catch(console.error);

Readme

Keywords

Package Sidebar

Install

npm i switch-dbi

Weekly Downloads

2

Version

1.1.4

License

ISC

Unpacked Size

7.48 kB

Total Files

4

Last publish

Collaborators

  • kolerts