From 6af8788f3ee53bc8471634e905a0a156e39e2ca9 Mon Sep 17 00:00:00 2001 From: Brian White Date: Tue, 28 May 2013 23:36:26 -0400 Subject: [PATCH] buffer: return `this` in fill() for chainability --- lib/buffer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 48c69f3..8d93384 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -468,9 +468,10 @@ Buffer.prototype.fill = function fill(value, start, end) { throw new RangeError('end out of bounds'); } - return this.parent.fill(value, - start + this.offset, - end + this.offset); + this.parent.fill(value, + start + this.offset, + end + this.offset); + return this; }; -- 2.7.4