Icard/angular-clarity-master(work.../node_modules/fs-extra/lib/util/buffer.js

13 lines
276 B
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00: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)
}