tryFindFile = (basename, files) => {
  const exsit = files.find(f => f.filename === basename);

  if (exsit) {
    return exsit;
  }

  if (/.+jsx?$/.test(basename)) {
    return files.find(f => f.filename === basename);
  }

  return tryFindFile(basename + '.jsx', files) || tryFindFile(basename + '.js', files);
}
css -> js
@param {String} code
@returns String