code: function restore(options) {
  
    var opt = options || Object.create(null);
    if (!opt.uri) {
      throw new Error('missing uri option');
    }
    if (!opt.stream) {
      if (!opt.root) {
        throw new Error('missing root option');
      } else if (!fs.existsSync(opt.root) || !fs.statSync(opt.root).isDirectory()) {
        throw new Error('root option is not a directory');
      }
    }
  
    var my = {
      dir: path.join(__dirname, 'dump', path.sep),
      uri: String(opt.uri),
      root: path.resolve(String(opt.root)) + path.sep,
      stream: opt.stream || null,
      parser: opt.parser || 'bson',
      callback: typeof opt.callback === 'function' ? opt.callback : null,
      tar: typeof opt.tar === 'string' ? opt.tar : null,
      logger: typeof opt.logger === 'string' ? path.resolve(opt.logger) : null,
      metadata: Boolean(opt.metadata),
      drop: Boolean(opt.drop),
      dropCollections: Boolean(opt.dropCollections) ? opt.dropCollections : null,
      options: typeof opt.options === 'object' ? opt.options : {}
    };
    if (my.stream) {
      my.tar = true; // override
    }
    wrapper(my);
  }
docs: option setting
  
  @exports restore
  @function restore
  @param {Object} options - various options. Check README.md