Skip to content

Commit

Permalink
fs: Refactor the import of internalUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyes committed May 8, 2020
1 parent fdfb98b commit 95d58e7
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 95d58e7

Please sign in to comment.