[Pkg-javascript-commits] [node-jsonstream] 84/214: don't use buffer-browserify in browser since it's broken

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 12:58:43 UTC 2017


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

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

commit b71b2a477f44eec715c725db5717104904ca8bfb
Author: Max Ogden <max at maxogden.com>
Date:   Sun Mar 31 16:41:37 2013 -0700

    don't use buffer-browserify in browser since it's broken
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 816ea2d..c30cced 100644
--- a/index.js
+++ b/index.js
@@ -16,7 +16,7 @@ exports.parse = function (path) {
   var parser = new Parser()
   var stream = through(function (chunk) {
     if('string' === typeof chunk) {
-      if ('undefined' === typeof Buffer) {
+      if (process.browser) {
         var buf = new Array(chunk.length)
         for (var i = 0; i < chunk.length; i++) buf[i] = chunk.charCodeAt(i)
         chunk = new Int32Array(buf)

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



More information about the Pkg-javascript-commits mailing list