[Pkg-javascript-commits] [node-sha.js] 92/237: getter for buffer length

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:03:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-sha.js.

commit 56c1e35583aa53b1aaaff68d43a4bf4a0c206eea
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Sun Jan 12 00:02:13 2014 +0700

    getter for buffer length
---
 fakebuffer.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fakebuffer.js b/fakebuffer.js
index 6c0a142..7e9015e 100644
--- a/fakebuffer.js
+++ b/fakebuffer.js
@@ -40,6 +40,10 @@ module.exports = function (len) {
     return e instanceof DataView && e.writeUInt32BE
   }
 
+  dv.__defineGetter__('length', function () {
+    return dv.byteLength
+  })
+
   return dv
 
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git



More information about the Pkg-javascript-commits mailing list