code: function scan(leveldb, options) {
    return new P(function(resolve, reject) {
      var datas = [];
      var resolved = false;
      function fin() {
        if (resolved) {
          return;
        }
        resolve(P.all(datas));
        resolved = true;
      }
      leveldb.createReadStream(options)
        .on('data', function(data) {
          datas.push(data);
        })
        .on('close', fin)
        .on('end', fin)
        .on('error', function(err) {
          reject(err);
        })
    });
  }
docs: Starts a LevelDB scan and returns a Promise for the list of results.
  
  @param {LevelDB} leveldb The DB to scan.
  @param {Object} options An options object passed verbatim to
  leveldb.createReadStream().
  @return {Promise<Object[]>} The scan results.