JSFiddle - React, Tailwind, and code Playground

by ericf

HTML

<script src="https://raw.github.com/ericf/urljs/master/url.js"></script>

JavaScript

var url = URL('http://localhost'),
    log = document.createElement('p');

log.innerText = url.host();
document.body.appendChild(log);