From 88df2346855f70cec9713b362ca32a4691dc271a Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 16 Feb 2022 19:00:41 +0100 Subject: [PATCH] [doc] Add soft deprecation notice --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index b476ed7..e5bf8d7 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ [![Sauce Test Status](https://saucelabs.com/browser-matrix/url-parse.svg)](https://saucelabs.com/u/url-parse) +**`url-parse` was created in 2014 when the WHATWG URL API was not available in +Node.js and the `URL` interface was supported only in some browsers. Today this +is no longer true. The `URL` interface is available in all supported Node.js +release lines and basically all browsers. Consider using it for better security +and accuracy.** + The `url-parse` method exposes two different API interfaces. The [`url`](https://nodejs.org/api/url.html) interface that you know from Node.js and the new [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL)