добавить HTTP к URL

const withHttp = url => !/^https?:\/\//i.test(url) ? `http://${url}` : url;
Distinct Duck