function doForNSSCertDB(nssDirGlob, callback) {
    glob_1.sync(nssDirGlob).forEach((potentialNSSDBDir) => {
        debug(`checking to see if ${potentialNSSDBDir} is a valid NSS database directory`);
        if (fs_1.existsSync(path_1.default.join(potentialNSSDBDir, 'cert8.db'))) {
            debug(`Found legacy NSS database in ${potentialNSSDBDir}, running callback...`);
            callback(potentialNSSDBDir, 'legacy');
        }
        if (fs_1.existsSync(path_1.default.join(potentialNSSDBDir, 'cert9.db'))) {
            debug(`Found modern NSS database in ${potentialNSSDBDir}, running callback...`);
            callback(potentialNSSDBDir, 'modern');
        }
    });
}
/**
 *  Given a directory or glob pattern of directories, run a callback for each db
 *  directory, with a version argument.
 */
Given a directory or glob pattern of directories, run a callback for each db
directory, with a version argument.
Given a directory or glob pattern of directories run a callback for each db directory with a version argument .
function doForNSSCertDB(nssDirGlob, callback) {
    glob_1.sync(nssDirGlob).forEach((potentialNSSDBDir) => {
        debug(`checking to see if ${potentialNSSDBDir} is a valid NSS database directory`);
        if (fs_1.existsSync(path_1.default.join(potentialNSSDBDir, 'cert8.db'))) {
            debug(`Found legacy NSS database in ${potentialNSSDBDir}, running callback...`);
            callback(potentialNSSDBDir, 'legacy');
        }
        if (fs_1.existsSync(path_1.default.join(potentialNSSDBDir, 'cert9.db'))) {
            debug(`Found modern NSS database in ${potentialNSSDBDir}, running callback...`);
            callback(potentialNSSDBDir, 'modern');
        }
    });
}
function doForNSSCertDB ( nssDirGlob , callback ) { glob_1 . sync ( nssDirGlob ) . forEach ( ( potentialNSSDBDir ) => { debug ( ` ${ potentialNSSDBDir } ` ) ; if ( fs_1 . existsSync ( path_1 . default . join ( potentialNSSDBDir , 'cert8.db' ) ) ) { debug ( ` ${ potentialNSSDBDir } ` ) ; callback ( potentialNSSDBDir , 'legacy' ) ; } if ( fs_1 . existsSync ( path_1 . default . join ( potentialNSSDBDir , 'cert9.db' ) ) ) { debug ( ` ${ potentialNSSDBDir } ` ) ; callback ( potentialNSSDBDir , 'modern' ) ; } } ) ; }
Given a directory or glob pattern of directories, run a callback for each db
  directory, with a version argument.
Given a directory or glob pattern of directories run a callback for each db directory with a version argument .