decord/source/1408_isBuffer.js
2026-08-04 21:03:28 +00:00

23 lines
414 B
JavaScript

// Module ID: 1408
// Function ID: 1409
// Name: isBuffer
// Dependencies: []
// Module 1408 (isBuffer)
export default function isBuffer(obj) {
let tmp = obj;
if (obj) {
tmp = typeof obj === "object";
}
if (tmp) {
tmp = typeof obj.copy === "function";
}
if (tmp) {
tmp = typeof obj.fill === "function";
}
if (tmp) {
tmp = typeof obj.readUInt8 === "function";
}
return tmp;
};