Linkify

Benchmark created on


Preparation HTML

<script src="https://cdn.jsdelivr.net/npm/linkifyjs@4.1.1/dist/linkify.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/linkify-html@4.1.1/dist/linkify-html.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Linkify text
const options = { defaultProtocol: "https" };
const str = linkifyHtml(
  "Go to example.com to see the example",
  options
);

console.log(str);
ready
Linkify already html'd test
const options = { defaultProtocol: "https" };
const str = linkifyHtml(
  "Go to <a href=\"example.com\">example.com</a> to see the example",
  options
);

console.log(str);
ready
Log with no link
const str = "Go to example dot com to see the example";

console.log(str);
ready
Log without linkify
const str = "Go to example.com to see the example";

console.log(str);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.