remove browser dependency on "buffer"

This commit is contained in:
Danny Coates 2020-07-27 19:23:03 -07:00
parent 72d2d6ef31
commit 7130c2e7b0
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
8 changed files with 304 additions and 65 deletions

View file

@ -272,7 +272,15 @@ function setTranslate(t) {
translate = t;
}
function concat(b1, b2) {
const result = new Uint8Array(b1.length + b2.length);
result.set(b1, 0);
result.set(b2, b1.length);
return result;
}
module.exports = {
concat,
locale,
fadeOut,
delay,