wallet-core/node_modules/fs-extra/lib/util/buffer.js
2017-05-24 15:11:17 +02: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)
}