From 7e9cb686941ced121050982d53eddfec71232eb4 Mon Sep 17 00:00:00 2001 From: uzlopak Date: Thu, 2 Nov 2023 15:14:05 +0100 Subject: [PATCH] lib: add navigator.platform --- doc/api/globals.md | 15 +++++++++ lib/internal/navigator.js | 57 +++++++++++++++++++++++++++++++ test/parallel/test-navigator.js | 59 +++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) diff --git a/doc/api/globals.md b/doc/api/globals.md index ebaaf2a6e0012e..187455eee772ff 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -637,6 +637,21 @@ logical processors available to the current Node.js instance. console.log(`This process is running on ${navigator.hardwareConcurrency} logical processors`); ``` +### `navigator.platform` + + + +* {string} + +The `navigator.platform` read-only property returns a string identifying the +platform on which the Node.js instance is running. + +```js +console.log(`This process is running on ${navigator.platform}`); +``` + ### `navigator.userAgent`