Skip to main content
Module

x/imagescript/utils/buffer.js

zero-dependency JavaScript image manipulation
Extremely Popular
Go to Latest
File
export class Buffer { static concat(...arrays) { const array = new Uint8Array( arrays.reduce((length, array) => length + array.length, 0) );
let offset = 0; for (const x of arrays) { array.set(x, offset); offset += x.length; }
return array; }};