From e605d41d8102dce92603af7da8ad9a226a56fd8f Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 27 Jan 2016 15:37:50 +0100 Subject: [PATCH] add back Buffer._augment for one more major version MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It’s used by typedarray-to-buffer 3.0.4 and probably others. --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index bbb2eff..0f2ddbf 100644 --- a/index.js +++ b/index.js @@ -100,6 +100,12 @@ function Buffer (arg) { return fromObject(this, arg) } +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} + function fromNumber (that, length) { that = allocate(that, length < 0 ? 0 : checked(length) | 0) if (!Buffer.TYPED_ARRAY_SUPPORT) { -- 2.34.1