Skip to content

Instantly share code, notes, and snippets.

View DinoscapeProgramming's full-sized avatar

DinoscapeProgramming

View GitHub Profile
@DinoscapeProgramming
DinoscapeProgramming / youtube.js
Last active March 3, 2022 20:47
A simple trick to check is a video existing or not
// definition
function videoExists(url) {
var exists;
var video;
try {
video = new URL(url);
} catch {
throw new Error("Invalid URL 😳")
}