23 lines
414 B
JavaScript
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;
|
|
};
|