Get started with rome CDN

MIT licensed

Rome is a popular JS toolchain for transforming and bundling code.

Tags:
  • rome
  • calendar
  • date picker
  • time picker

Stable version

Copied!

How to start using rome CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with rome CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/rome/3.0.2/rome.standalone.min.js"></script>
</head>
<body>
  <script type="module">
    async function checkCode(code) {
      const result = await Rome.analyze({ text: code });
      const issues = result.issues;

      if (issues.length > 0) {
        console.log('Found issues:');
        issues.forEach((issue) => console.log(issue.message));
      } else {
        console.log('No issues found.');
      }
    }

    const code = `
      function add(a, b) {
        return a + b;
      }

      function main() {
        const result = add(1, 2);
        console.log(result);
      }

      main();
    `;

    checkCode(code);
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions