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 {
|
var Buffer = {
|
||||||
static isBuffer(array) {return array instanceof Uint8Array;}
|
isBuffer: function(array) {return array instanceof Uint8Array;},
|
||||||
static from(arrayBuffer) {return arrayBuffer;}
|
from: function(arrayBuffer) {return arrayBuffer;},
|
||||||
static allocUnsafe(size) {return Buffer.alloc(size);}
|
allocUnsafe: function(size) {return Buffer.alloc(size);},
|
||||||
static alloc(size) {return new Uint8Array(size);}
|
alloc: function(size) {return new Uint8Array(size);}
|
||||||
};
|
};
|
||||||
|
export default Buffer;
|
||||||
|
|
Reference in a new issue