From d1e78a179b7050dfc2a61013e449599ae94a280b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 25 Dec 2021 18:24:34 -0800 Subject: [PATCH] tools: use Object.hasOwn() in alljson.mjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hasOwnProperty() with Object.hasOwn(). PR-URL: https://github.com/nodejs/node/pull/41306 Reviewed-By: Antoine du Hamel Reviewed-By: Tobias Nießen Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: James M Snell --- tools/doc/alljson.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/doc/alljson.mjs b/tools/doc/alljson.mjs index 18afc29e7e9366..88f25bba40a149 100644 --- a/tools/doc/alljson.mjs +++ b/tools/doc/alljson.mjs @@ -40,7 +40,7 @@ for (const link of toc.match(//g)) { ); for (const property in data) { - if (results.hasOwnProperty(property)) { + if (Object.hasOwn(results, property)) { data[property].forEach((mod) => { mod.source = data.source; });