From d2922780a479b1b85e436dec5c2fc42fe1ffd9fb Mon Sep 17 00:00:00 2001 From: Chomat Date: Wed, 5 Apr 2023 13:50:06 +0200 Subject: [PATCH] Update index.js The input argument can be a buffer. In this case transform it to a string --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 084fc2d..7b610bb 100644 --- a/index.js +++ b/index.js @@ -48,6 +48,9 @@ function wrap(opts) { created = true; } + if (input.toString) { + input = input.toString() + } return transformFn(input, metadata, hash); }