diff options
Diffstat (limited to 'lib/buffer.js')
-rw-r--r-- | lib/buffer.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/buffer.js b/lib/buffer.js index 461a39eca6..dbc5d5f56a 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -1,12 +1,12 @@ 'use strict'; -var buffer = process.binding('buffer'); -var smalloc = process.binding('smalloc'); -var util = require('util'); -var alloc = smalloc.alloc; -var truncate = smalloc.truncate; -var sliceOnto = smalloc.sliceOnto; -var kMaxLength = smalloc.kMaxLength; +const buffer = process.binding('buffer'); +const smalloc = process.binding('smalloc'); +const util = require('util'); +const alloc = smalloc.alloc; +const truncate = smalloc.truncate; +const sliceOnto = smalloc.sliceOnto; +const kMaxLength = smalloc.kMaxLength; var internal = {}; exports.Buffer = Buffer; @@ -333,8 +333,8 @@ Buffer.prototype.set = util.deprecate(function set(offset, v) { // TODO(trevnorris): fix these checks to follow new standard // write(string, offset = 0, length = buffer.length, encoding = 'utf8') var writeWarned = false; -var writeMsg = '.write(string, encoding, offset, length) is deprecated.' + - ' Use write(string[, offset[, length]][, encoding]) instead.'; +const writeMsg = '.write(string, encoding, offset, length) is deprecated.' + + ' Use write(string[, offset[, length]][, encoding]) instead.'; Buffer.prototype.write = function(string, offset, length, encoding) { // Buffer#write(string); if (util.isUndefined(offset)) { |