Skip to content

Commit

Permalink
fs: refactor the import of internalUtil
Browse files Browse the repository at this point in the history
PR-URL: #33296
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
  • Loading branch information
rickyes authored and codebytere committed Jun 18, 2020
1 parent 59d435e commit a90b96f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
ERR_OUT_OF_RANGE,
ERR_STREAM_DESTROYED
} = require('internal/errors').codes;
const internalUtil = require('internal/util');
const { deprecate } = require('internal/util');
const { validateNumber } = require('internal/validators');
const fs = require('fs');
const { Buffer } = require('buffer');
Expand Down Expand Up @@ -142,7 +142,7 @@ function ReadStream(path, options) {
ObjectSetPrototypeOf(ReadStream.prototype, Readable.prototype);
ObjectSetPrototypeOf(ReadStream, Readable);

const openReadFs = internalUtil.deprecate(function() {
const openReadFs = deprecate(function() {
_openReadFs(this);
}, 'ReadStream.prototype.open() is deprecated', 'DEP0135');
ReadStream.prototype.open = openReadFs;
Expand Down Expand Up @@ -370,7 +370,7 @@ WriteStream.prototype._final = function(callback) {
callback();
};

const openWriteFs = internalUtil.deprecate(function() {
const openWriteFs = deprecate(function() {
_openWriteFs(this);
}, 'WriteStream.prototype.open() is deprecated', 'DEP0135');
WriteStream.prototype.open = openWriteFs;
Expand Down

0 comments on commit a90b96f

Please sign in to comment.