| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 74205b3 commit e119531
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -122,6 +122,18 @@ The properties included on each object include: | |||
| 122 | 122 | `nice` values are POSIX-only. On Windows, the `nice` values of all processors | |
| 123 | 123 | are always 0. | |
| 124 | 124 | ||
| 125 | + ## `os.devNull` | ||
| 126 | + <!-- YAML | ||
| 127 | + added: REPLACEME | ||
| 128 | + --> | ||
| 129 | + | ||
| 130 | + * {string} | ||
| 131 | + | ||
| 132 | + The platform-specific file path of the null device. | ||
| 133 | + | ||
| 134 | + * `\\.\nul` on Windows | ||
| 135 | + * `/dev/null` on POSIX | ||
| 136 | + | ||
| 125 | 137 | ## `os.endianness()` | |
| 126 | 138 | <!-- YAML | |
| 127 | 139 | added: v0.9.4 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -382,5 +382,12 @@ ObjectDefineProperties(module.exports, { | |||
| 382 | 382 | enumerable: true, | |
| 383 | 383 | writable: false, | |
| 384 | 384 | value: isWindows ? '\r\n' : '\n' | |
| 385 | + }, | ||
| 386 | + | ||
| 387 | + devNull: { | ||
| 388 | + configurable: true, | ||
| 389 | + enumerable: true, | ||
| 390 | + writable: false, | ||
| 391 | + value: isWindows ? '\\\\.\\nul' : '/dev/null' | ||
| 385 | 392 | } | |
| 386 | 393 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -257,3 +257,10 @@ if (!common.isIBMi) { | |||
| 257 | 257 | ||
| 258 | 258 | is.number(+os.freemem, 'freemem'); | |
| 259 | 259 | is.number(os.freemem(), 'freemem'); | |
| 260 | + | ||
| 261 | + const devNull = os.devNull; | ||
| 262 | + if (common.isWindows) { | ||
| 263 | + assert.strictEqual(devNull, '\\\\.\\nul'); | ||
| 264 | + } else { | ||
| 265 | + assert.strictEqual(devNull, '/dev/null'); | ||
| 266 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments