mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
buffer: remove unnecessary TODO comments
Refs: https://github.com/nodejs/node/issues/4642 PR-URL: https://github.com/nodejs/node/pull/4719 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
@@ -523,8 +523,6 @@ Buffer.prototype.fill = function fill(val, start, end) {
|
||||
};
|
||||
|
||||
|
||||
// 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]]' +
|
||||
@@ -617,8 +615,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);
|
||||
|
||||
Reference in New Issue
Block a user