From e0959c14f19d18726cb579d9b596aaad5d515790 Mon Sep 17 00:00:00 2001 From: kpp <30272550+kaypon@users.noreply.github.com> Date: Tue, 4 Dec 2018 14:33:51 -0500 Subject: [PATCH] Update Buffer.js to contain propBuffer() --- lib/util/buffer.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/util/buffer.js b/lib/util/buffer.js index c78b9396..98b17876 100644 --- a/lib/util/buffer.js +++ b/lib/util/buffer.js @@ -19,6 +19,11 @@ function equals(a, b) { return true; } +function propBuffer(prop){ + return new Buffer(prop); + // return newBuffer; +} + module.exports = { /** * Fill a buffer with a value. @@ -84,6 +89,8 @@ module.exports = { equals: equals, equal: equals, + propBuffer: propBuffer, + /** * Transforms a number from 0 to 255 into a Buffer of size 1 with that value