code: async function scriptsFromDirectory(dirpath) {
    const dir = (await readdir(dirpath))
      .map(name => toFullPath(name, dirpath))
      .filter(await filters.onlyFiles)
      .filter(filters.onlyWithExtension('.js'));
    const result = {};
    for (const filepath of dir) {
      const name = path.basename(filepath, '.js');
      const script = await readFile(filepath, 'utf8');
      result[name] = script;
    }
    return result;
  }
docs: Read all JavaScript files in a specific dir. Will use the filename
  without .js as the name of the script.
  @param {*} dirpath