nl_tokens: / * couchDB database creation part . First we check if a database with the name specified already exists . If yes this database will be destroy before creating the new one ( with the same name ) .
pl_tokens: function dropDB ( ) { nano . db . destroy ( nameDB , function ( err ) { if ( err && err . statusCode != 404 ) { logger_1 . logger . log ( 'error' , ` ${ nameDB } \n ` ) ; throw err ; } nano . db . create ( nameDB , function ( <mask> ) { if ( err ) { logger_1 . logger . log ( 'error' , ` ${ nameDB } \n ` ) ; throw err ; } logger_1 . logger . log ( 'success' , ` ${ nameDB } \n ` ) ; if ( program . test ) { // calling tests from ./test/tests.warehouse.js warehouseTests ( ) ; } else { emitter . emit ( 'created' ) ; } } ) ; } ) ; }