Skip to content

Commit 6f449db

Browse files
committedMay 11, 2017
fs: refactor deprecated functions for readability
This is a small refactor to make an object more readable (IMO). Yeah, I spent a bit longer looking at the code and misunderstanding it than I care to admit right now. PR-URL: #12910 Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c79deaa commit 6f449db

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
 

‎lib/fs.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -2140,10 +2140,8 @@ WriteStream.prototype.destroySoon = WriteStream.prototype.end;
21402140
var SyncWriteStream = internalFS.SyncWriteStream;
21412141
Object.defineProperty(fs, 'SyncWriteStream', {
21422142
configurable: true,
2143-
get: internalUtil.deprecate(() => {
2144-
return SyncWriteStream;
2145-
}, 'fs.SyncWriteStream is deprecated.', 'DEP0061'),
2146-
set: internalUtil.deprecate((val) => {
2147-
SyncWriteStream = val;
2148-
}, 'fs.SyncWriteStream is deprecated.', 'DEP0061')
2143+
get: internalUtil.deprecate(() => SyncWriteStream,
2144+
'fs.SyncWriteStream is deprecated.', 'DEP0061'),
2145+
set: internalUtil.deprecate((val) => { SyncWriteStream = val; },
2146+
'fs.SyncWriteStream is deprecated.', 'DEP0061')
21492147
});

0 commit comments

Comments
 (0)
Please sign in to comment.