management/front/dkha-web-sz-main/node_modules/fs-extra/lib/util/buffer.js

13 lines
276 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
'use strict'
/* 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)
}