forked from mystiq/hydrogen-web
make ie11 compatible
This commit is contained in:
parent
36a982f7e2
commit
e83781b26a
1 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
export default class Buffer {
|
||||
static isBuffer(array) {return array instanceof Uint8Array;}
|
||||
static from(arrayBuffer) {return arrayBuffer;}
|
||||
static allocUnsafe(size) {return Buffer.alloc(size);}
|
||||
static alloc(size) {return new Uint8Array(size);}
|
||||
var Buffer = {
|
||||
isBuffer: function(array) {return array instanceof Uint8Array;},
|
||||
from: function(arrayBuffer) {return arrayBuffer;},
|
||||
allocUnsafe: function(size) {return Buffer.alloc(size);},
|
||||
alloc: function(size) {return new Uint8Array(size);}
|
||||
};
|
||||
export default Buffer;
|
||||
|
|
Loading…
Reference in a new issue