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

12
lib/buffer.js

@ -19,14 +19,4 @@ Buffer.prototype.concat = function(other) {
this.copy(buf, 0, 0);
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