Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: fix and cleanup constants #20765

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fs: only require('buffer') once
  • Loading branch information
jasnell committed May 16, 2018
commit f0f17e2d9bedb3a17b8b7505773f518e0f5a8947
3 changes: 1 addition & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const { createPromise, promiseResolve } = process.binding('util');

const binding = process.binding('fs');
const fs = exports;
const { Buffer } = require('buffer');
const { Buffer, kMaxLength } = require('buffer');
const errors = require('internal/errors');
const {
ERR_FS_FILE_TOO_LARGE,
Expand Down Expand Up @@ -120,7 +120,6 @@ function lazyAssert() {
}

const kMinPoolSpace = 128;
const { kMaxLength } = require('buffer');

const isWindows = process.platform === 'win32';

Expand Down