From 1fc60abbcdc774fa044f6abb35fce9b8b9d48ad8 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Thu, 6 May 2021 15:45:04 +0200 Subject: [PATCH] os: add os.devNull Provides the platform-specific file path of the null device. --- doc/api/os.md | 12 ++++++++++++ lib/os.js | 7 +++++++ test/parallel/test-os.js | 7 +++++++ 3 files changed, 26 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index f3d3f2d65249a4..f3e3f10c692ef4 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -122,6 +122,18 @@ The properties included on each object include: `nice` values are POSIX-only. On Windows, the `nice` values of all processors are always 0. +## `os.devNull` + + +* {string} + +The platform-specific file path of the null device. + +* `\\.\nul` on Windows +* `/dev/null` on POSIX + ## `os.endianness()`