mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
This commit only adds a single package and all of its transitive dependencies. The github-linguist package will be used for counting lines of code as a baseline for databases we are analyzing.
12 lines
263 B
JavaScript
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)
|
|
}
|