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

Use Buffer.alloc() instead of deprecated new Buffer() in copy-file-sync #380

Merged
merged 1 commit into from Mar 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/copy-sync/copy-file-sync.js
Expand Up @@ -3,7 +3,7 @@
const fs = require('graceful-fs')

const BUF_LENGTH = 64 * 1024
const _buff = new Buffer(BUF_LENGTH)
const _buff = Buffer.alloc(BUF_LENGTH)

function copyFileSync (srcFile, destFile, options) {
const overwrite = options.overwrite
Expand Down
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -56,5 +56,8 @@
"test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
"test": "npm run lint && npm run unit",
"unit": "node test.js"
},
"engines": {
"node": ">=4.5.0"
}
}