From 46db3316ac1579633d82f468181c51186ab3af50 Mon Sep 17 00:00:00 2001 From: SANDESH LENDVE <123884782+mrsandy1965@users.noreply.github.com> Date: Tue, 30 Dec 2025 16:46:52 +0530 Subject: [PATCH] doc: update deprecated var usage in documentation examples (#7246) * test(http): fix HTTPS protocol test by using local HTTPS server instead of external request * docs: update var usage in documentation examples * docs: updated var to const --------- Co-authored-by: Jay --- README.md | 2 +- lib/helpers/spread.js | 2 +- lib/utils.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 035fdc9..dab106f 100644 --- a/README.md +++ b/README.md @@ -1104,7 +1104,7 @@ The server will handle it as: If your backend body-parser (like `body-parser` of `express.js`) supports nested objects decoding, you will get the same object on the server-side automatically ```js - var app = express(); + const app = express(); app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies diff --git a/lib/helpers/spread.js b/lib/helpers/spread.js index 13479cb..2e72fc8 100644 --- a/lib/helpers/spread.js +++ b/lib/helpers/spread.js @@ -7,7 +7,7 @@ * * ```js * function f(x, y, z) {} - * var args = [1, 2, 3]; + * const args = [1, 2, 3]; * f.apply(null, args); * ``` * diff --git a/lib/utils.js b/lib/utils.js index ed08161..68bab35 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -333,7 +333,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob * Example: * * ```js - * var result = merge({foo: 123}, {foo: 456}); + * const result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` *