File tree 3 files changed +26
-0
lines changed
3 files changed +26
-0
lines 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 @@ -259,3 +259,10 @@ if (!common.isIBMi) {
259
259
260
260
is . number ( + os . freemem , 'freemem' ) ;
261
261
is . number ( os . freemem ( ) , 'freemem' ) ;
262
+
263
+ const devNull = os . devNull ;
264
+ if ( common . isWindows ) {
265
+ assert . strictEqual ( devNull , '\\\\.\\nul' ) ;
266
+ } else {
267
+ assert . strictEqual ( devNull , '/dev/null' ) ;
268
+ }
You can’t perform that action at this time.
0 commit comments