Spaces:
Sleeping
Sleeping
File size: 1,245 Bytes
391a73c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BufferSourceConverter = void 0;
const index_js_1 = require("../bytes/index.js");
class BufferSourceConverter {
static isArrayBuffer(data) {
return (0, index_js_1.isArrayBuffer)(data);
}
static toArrayBuffer(data) {
return (0, index_js_1.toArrayBuffer)(data);
}
static toUint8Array(data) {
return (0, index_js_1.toUint8Array)(data);
}
static toView(data, type) {
return (0, index_js_1.toView)(data, type);
}
static isBufferSource(data) {
return (0, index_js_1.isBufferSource)(data);
}
static isArrayBufferView(data) {
return (0, index_js_1.isArrayBufferView)(data);
}
static isEqual(a, b) {
return (0, index_js_1.equal)(a, b);
}
static concat(first, second, ...rest) {
if (Array.isArray(first)) {
return typeof second === "function"
? (0, index_js_1.concat)(first, second)
: (0, index_js_1.concat)(first);
}
const buffers = [first, second, ...rest].filter(Boolean);
return (0, index_js_1.concat)(buffers);
}
}
exports.BufferSourceConverter = BufferSourceConverter;
|