[Pkg-javascript-commits] [node-jsonstream] 120/214: remove browser check since we can now rely on browserify's buffer
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 12:58:48 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 97ad8a5dfed4883f79026c1c5284dd98fde1bb94
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Tue Jun 10 17:16:15 2014 +0200
remove browser check since we can now rely on browserify's buffer
---
index.js | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/index.js b/index.js
index 9fd0a39..31c2fa5 100755
--- a/index.js
+++ b/index.js
@@ -17,15 +17,8 @@ exports.parse = function (path, map) {
var parser = new Parser()
var stream = through(function (chunk) {
- if('string' === typeof chunk) {
- 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)
- } else {
- chunk = new Buffer(chunk)
- }
- }
+ if('string' === typeof chunk)
+ chunk = new Buffer(chunk)
parser.write(chunk)
},
function (data) {
--
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