decord/source/1427_isBuffer.js
2026-08-11 06:20:06 +00:00

23 lines
414 B
JavaScript

// Module ID: 1427
// Function ID: 1428
// Name: isBuffer
// Dependencies: []
// Module 1427 (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;
};