const capitalize = s => s && s[0].toUpperCase() + s.slice(1);
const isValidURL = str => {
  let url;
  try {
    url = new URL(str);
  }
  catch (_) {
    return false;
  }
  return url.protocol === 'http:' || url.protocol === 'https:';
};

export { capitalize as c, isValidURL as i };
