mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-02-01 17:21:13 +00:00
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:
commit
9bef553728
@ -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
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user