Every line of 'current url string parser is deprecated' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
225 function parse_url(url_string) { 226 let url_object; 227 try { 228 url_object = new URL(url_string); 229 } catch(error) { 230 } 231 return url_object; 232 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code