From: Feross Aboukhadijeh Date: Fri, 16 Feb 2018 08:58:12 +0000 (-0800) Subject: parent, offset are enumerable to match Node.js X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=0621cdf54d5841ed630b50feca290edcef40f627;p=buffer.git parent, offset are enumerable to match Node.js --- diff --git a/index.js b/index.js index 19f3067..bd071b4 100644 --- a/index.js +++ b/index.js @@ -54,6 +54,7 @@ function typedArraySupport () { } Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, get: function () { if (!Buffer.isBuffer(this)) return undefined return this.buffer @@ -61,6 +62,7 @@ Object.defineProperty(Buffer.prototype, 'parent', { }) Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, get: function () { if (!Buffer.isBuffer(this)) return undefined return this.byteOffset