Merge pull request #380 from jprichardson/copy-file-sync-update-Buffer-alloc

Use Buffer.alloc() instead of deprecated new Buffer() in copy-file-sync
This commit is contained in:
JP Richardson 2017-03-07 01:58:07 -06:00 committed by GitHub
commit 9bef553728
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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"
}
}