first commit

This commit is contained in:
s2
2024-12-13 08:53:01 +01:00
commit 2746dc9c4e
5477 changed files with 682458 additions and 0 deletions

28
node_modules/clone-buffer/index.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict';
var Buffer = require('buffer').Buffer;
function hasFrom() {
// Node versions 5.x below 5.10 seem to have a `from` method
// However, it doesn't clone Buffers
// Luckily, it reports as `false` to hasOwnProperty
return (Buffer.hasOwnProperty('from') && typeof Buffer.from === 'function');
}
function cloneBuffer(buf) {
if (!Buffer.isBuffer(buf)) {
throw new Error('Can only clone Buffer.');
}
if (hasFrom()) {
return Buffer.from(buf);
}
var copy = new Buffer(buf.length);
buf.copy(copy);
return copy;
}
cloneBuffer.hasFrom = hasFrom;
module.exports = cloneBuffer;