Merge pull request #10 from MillenniumEarl/deepsource-transform-f614955a
Format code with prettierpull/11/head
						commit
						060387127f
					
				| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
 | 
			
		||||
// Public modules from npm
 | 
			
		||||
const ky = require("ky-universal").create({
 | 
			
		||||
    throwHttpErrors: false
 | 
			
		||||
  throwHttpErrors: false,
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
// Modules from file
 | 
			
		||||
| 
						 | 
				
			
			@ -32,7 +32,7 @@ module.exports.isStringAValidURL = function(url) {
 | 
			
		|||
  } catch (err) {
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @public
 | 
			
		||||
| 
						 | 
				
			
			@ -43,7 +43,7 @@ module.exports.isStringAValidURL = function(url) {
 | 
			
		|||
 */
 | 
			
		||||
module.exports.urlExists = async function (url, checkRedirect) {
 | 
			
		||||
  if (!this.isStringAValidURL(url)) {
 | 
			
		||||
        return false
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const response = await ky.head(url);
 | 
			
		||||
| 
						 | 
				
			
			@ -57,4 +57,4 @@ module.exports.urlExists = async function(url, checkRedirect) {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  return valid;
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue