GT2/GT2-iOS/node_modules/fs-extra/lib/util/buffer.js

12 lines
263 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
/* 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)
}