Bones/node_modules/fs-extra/lib/util/buffer.js
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

12 lines
263 B
JavaScript

/* eslint-disable node/no-deprecated-api */
module.exports = function (size) {
if (typeof Buffer.allocUnsafe === 'function') {
try {
return Buffer.allocUnsafe(size)
} catch (e) {
return new Buffer(size)
}
}
return new Buffer(size)
}