Browse Source

buffer: remove unnecessary TODO comments

Refs: #4642
PR-URL: #4719
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
v5.x
Peter Geiss 9 years ago
committed by Evan Lucas
parent
commit
14061c6498
  1. 4
      lib/buffer.js

4
lib/buffer.js

@ -539,8 +539,6 @@ Buffer.prototype.set = internalUtil.deprecate(function set(offset, v) {
}, 'Buffer.set is deprecated. Use array indexes instead.');
// TODO(trevnorris): fix these checks to follow new standard
// write(string, offset = 0, length = buffer.length, encoding = 'utf8')
var writeWarned = false;
const writeMsg = 'Buffer.write(string, encoding, offset, length) is ' +
'deprecated. Use write(string[, offset[, length]]' +
@ -633,8 +631,6 @@ Buffer.prototype.toJSON = function() {
};
// TODO(trevnorris): currently works like Array.prototype.slice(), which
// doesn't follow the new standard for throwing on out of range indexes.
Buffer.prototype.slice = function slice(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);

Loading…
Cancel
Save