From 0621cdf54d5841ed630b50feca290edcef40f627 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 16 Feb 2018 00:58:12 -0800 Subject: [PATCH] parent, offset are enumerable to match Node.js --- index.js | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.34.1