From 1b06173209faf93c2334583405f3391a31cb1aa6 Mon Sep 17 00:00:00 2001 From: Max van den Bosch Date: Sat, 18 Feb 2023 14:23:26 +0100 Subject: [PATCH] Add require Buffer to allow for Buffer.isBuffer() Adding const Buffer = require('buffer').Buffer; to allow the Buffer.isBuffer() function to work properly --- lib/byline.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/byline.js b/lib/byline.js index 00a3ced..b3f8821 100644 --- a/lib/byline.js +++ b/lib/byline.js @@ -25,6 +25,7 @@ */ const stream = require('stream') const timers = require('timers') +const Buffer = require('buffer').Buffer; const createLineStream = (readStream, options) => { if (!readStream) throw new Error('expected readStream')