[Pkg-javascript-commits] [node-sha.js] 98/237: load browserify.js to force native-buffer-browserify

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:03:39 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 fd5e58a4caa4223fe8f69614d137f219cc11d640
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Wed Jan 15 13:09:19 2014 +0700

    load browserify.js to force native-buffer-browserify
---
 browserify.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/browserify.js b/browserify.js
new file mode 100644
index 0000000..6538579
--- /dev/null
+++ b/browserify.js
@@ -0,0 +1,12 @@
+var exports = module.exports = function (alg) {
+  var Alg = exports[alg]
+  if(!Alg) throw new Error(alg + ' is not supported (we accept pull requests)')
+  return new Alg()
+}
+
+var Buffer = require('native-buffer-browserify').Buffer
+var Hash   = require('./hash')(Buffer)
+
+exports.sha =
+exports.sha1 = require('./sha1')(Buffer, Hash)
+exports.sha256 = require('./sha256')(Buffer, Hash)

-- 
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