From 1b2e013a402ac87bffbc4aa7e506602cb9a511a6 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 29 Nov 2024 08:24:11 -0800 Subject: [PATCH] net: add net.BlockList.isBlockList(value) PR-URL: https://github.com/nodejs/node/pull/56078 Reviewed-By: Yagiz Nizipli Reviewed-By: theanarkh Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: Chemi Atlow --- doc/api/net.md | 9 +++++++++ lib/internal/blocklist.js | 9 +++++++++ test/parallel/test-blocklist.js | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/doc/api/net.md b/doc/api/net.md index f2d2c20588394c..72d8d47fd4296f 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -170,6 +170,15 @@ added: The list of rules added to the blocklist. +### `BlockList.isBlockList(value)` + + + +* `value` {any} Any JS value +* Returns `true` if the `value` is a `net.BlockList`. + ## Class: `net.SocketAddress`