level-store.js
function get_db (ent, done) {
    var folder = internals.makefolderpath(opts.folder, ent)
    var db = dbmap[folder]
    if (db) {
      return done(null, db)
    }
    internals.ensurefolder(folder, internals.error(done, function () {
      db = dbmap[folder]
      if (db) {
        return done(null, db)
      }
      try {
        db = dbmap[folder] = LevelQuery(Levelup(folder, opts))
        db.query.use(JsonqueryEngine())
      }
      catch (e) {
        db = dbmap[folder]
        if (db) {
          return done(null, db)
        }
        return done(e)
      }
      return done(null, db)
    }))
  }
function get_db (ent, done) {
    var folder = internals.makefolderpath(opts.folder, ent)
    var db = dbmap[folder]
    if (db) {
      return done(null, db)
    }
    internals.ensurefolder(folder, internals.error(done, function () {
      db = dbmap[folder]
      if (db) {
        return done(null, db)
      }
      try {
        db = dbmap[folder] = LevelQuery(Levelup(folder, opts))
        db.query.use(JsonqueryEngine())
      }
      catch (e) {
        db = dbmap[folder]
        if (db) {
          return done(null, db)
        }
        return done(e)
      }
      return done(null, db)
    }))
  }
function get_db ( ent , done ) { var folder = internals . makefolderpath ( opts . folder , ent ) var db = dbmap [ folder ] if ( db ) { return done ( null , db ) } internals . ensurefolder ( folder , internals . error ( done , function ( ) { db = dbmap [ folder ] if ( db ) { return done ( null , db ) } try { db = dbmap [ folder ] = LevelQuery ( Levelup ( folder , opts ) ) db . query . use ( JsonqueryEngine ( ) ) } catch ( e ) { db = dbmap [ folder ] if ( db ) { return done ( null , db ) } return done ( e ) } return done ( null , db ) } ) ) }
Get the levelup reference
Get the levelup reference