Tj Holowaychuk 15 years ago
parent
commit
843dab9134
  1. 10
      lib/buffer.js

10
lib/buffer.js

@ -20,13 +20,3 @@ Buffer.prototype.concat = function(other) {
other.copy(buf, len, 0);
return buf;
};
// patch if not v0.2 of node.js and Buffer.isBuffer fails for SlowBuffer
if (process.version.indexOf("v0.2") == -1) {
var SlowBuffer = process.binding('buffer').SlowBuffer;
if (!Buffer.isBuffer(new SlowBuffer(10))) {
Buffer.isBuffer = function (b) {
return (b instanceof Buffer) || (b instanceof SlowBuffer);
};
}
}
Loading…
Cancel
Save