lib/FileInputStream.js
function FileInputStream(src){
    // wrap into Promise
    return new Promise(function(resolve, reject){

         // open read stream
        const istream = _fs.createReadStream(src);
        istream.on('error', reject);
        istream.on('open', function(){
            resolve(istream);
        });
    });
}
function FileInputStream(src){
    // wrap into Promise
    return new Promise(function(resolve, reject){

         // open read stream
        const istream = _fs.createReadStream(src);
        istream.on('error', reject);
        istream.on('open', function(){
            resolve(istream);
        });
    });
}
function FileInputStream ( src ) { // wrap into Promise return new Promise ( function ( resolve , reject ) { // open read stream const istream = _fs . createReadStream ( src ) ; istream . on ( 'error' , reject ) ; istream . on ( 'open' , function ( ) { resolve ( istream ) ; } ) ; } ) ; }
open read stream
open read stream