mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-29 13:14:46 +01:00
12 lines
276 B
JavaScript
12 lines
276 B
JavaScript
'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)
|
|
}
|