|
if (typeof buffer === "string") buffer = new Buffer(buffer); |
|
this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate, intVal))); |
|
this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))); |
|
this.appendStringBuf(new Buffer(String.fromCharCode(intVal))); |
Use Buffer constructor is currently depreciated :
It's not possible to deprecate Node.js ≤ 4.4.x and 5.0.0 — 5.9.x or maybe use a polyfill ?
Or maybe you can just use the alloc method to keep compatibility :
|
function alloc(size) { |
|
return Buffer.alloc ? Buffer.alloc(size) : new Buffer(size); |
|
} |
jsonparse/jsonparse.js
Line 132 in b2d8bc6
jsonparse/jsonparse.js
Line 228 in b2d8bc6
jsonparse/jsonparse.js
Line 234 in b2d8bc6
jsonparse/jsonparse.js
Line 237 in b2d8bc6
Use Buffer constructor is currently depreciated :
It's not possible to deprecate
Node.js ≤ 4.4.x and 5.0.0 — 5.9.xor maybe use a polyfill ?Or maybe you can just use the
allocmethod to keep compatibility :jsonparse/jsonparse.js
Lines 54 to 56 in b2d8bc6