We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5aa7d4d commit a993bebCopy full SHA for a993beb
lib/fs.js
@@ -248,10 +248,11 @@ function statsFromValues() {
248
}
249
250
// Don't allow mode to accidentally be overwritten.
251
-['F_OK', 'R_OK', 'W_OK', 'X_OK'].forEach(function(key) {
252
- Object.defineProperty(fs, key, {
253
- enumerable: true, value: constants[key] || 0, writable: false
254
- });
+Object.defineProperties(fs, {
+ F_OK: {enumerable: true, value: constants.F_OK || 0},
+ R_OK: {enumerable: true, value: constants.R_OK || 0},
+ W_OK: {enumerable: true, value: constants.W_OK || 0},
255
+ X_OK: {enumerable: true, value: constants.X_OK || 0},
256
});
257
258
function handleError(val, callback) {
0 commit comments