From 1e20b05acdeb450bcc45b059954fe629db9b88f8 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 22 Jan 2023 12:14:11 -0800 Subject: [PATCH] url: implement URLSearchParams size getter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/whatwg/url/pull/734 PR-URL: https://github.com/nodejs/node/pull/46308 Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli Reviewed-By: Daijiro Wachi Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen Reviewed-By: Darshan Sen Reviewed-By: Minwoo Jung --- doc/api/url.md | 8 ++++++++ lib/internal/url.js | 7 +++++++ test/parallel/test-whatwg-url-properties.js | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/doc/api/url.md b/doc/api/url.md index e250b144987fa0..a10b5947c40eda 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -940,6 +940,14 @@ console.log(params.toString()); // Prints foo=def&abc=def&xyz=opq ``` +#### `urlSearchParams.size` + + + +The total number of parameter entries. + #### `urlSearchParams.sort()`