Start of main content
Check if absolute URL
JavaScript, String, Browser, Regexp · Oct 20, 2020

Checks if the given string is an absolute URL.
const isAbsoluteURL = str => /^[a-z][a-z0-9+.-]*:/.test(str);
isAbsoluteURL('https://google.com');
isAbsoluteURL('ftp://www.myserver.net');
isAbsoluteURL('/foo/bar');
More like this

Select, traverse and manipulate DOM elements with this collection of JavaScript ES6 snippets.
Collection · 101 snippets

Checks if the given string contains any whitespace characters.
JavaScript, String · Oct 18, 2020

Joins all given URL segments together, then normalizes the resulting URL.
JavaScript, String · Oct 22, 2020

Gets the current URL without any parameters or fragment identifiers.
JavaScript, String · Jan 3, 2021