decord/source/4461_allocUnsafe.js
2026-08-13 07:00:46 +00:00

53 lines
901 B
JavaScript

// Module ID: 4461
// Function ID: 4462
// Name: allocUnsafe
// Dependencies: [609]
// Module 4461 (allocUnsafe)
let tmp = typeof exports === "object";
if (typeof exports === "object") {
tmp = exports;
}
if (tmp) {
tmp = !exports.nodeType;
}
if (tmp) {
tmp = exports;
}
let tmp2 = tmp;
if (tmp) {
tmp2 = typeof module === "object";
}
if (tmp2) {
tmp2 = module;
}
if (tmp2) {
tmp2 = !module.nodeType;
}
if (tmp2) {
tmp2 = module;
}
let _Buffer;
if (tmp2) {
if (tmp2.exports === tmp) {
_Buffer = require("module_609").Buffer;
}
}
let allocUnsafe;
if (_Buffer) {
allocUnsafe = _Buffer.allocUnsafe;
}
export default function cloneBuffer(arr) {
if (arg1) {
return arr.slice();
} else {
if (allocUnsafe) {
let constructor = tmp(length);
} else {
constructor = new arr.constructor(length);
}
arr.copy(constructor);
return constructor;
}
};