Giter Site home page Giter Site logo

Comments (8)

djcoin avatar djcoin commented on June 9, 2024

By the way,
I got a "Uncaught Error: Unexpected "\u0000" at position 0 in state START " when commenting out the "if(process.browser)" part and using new Buffer (with the browserify-buffer shim) :s

from jsonstream.

mattsgarlata avatar mattsgarlata commented on June 9, 2024

Here is a fix that worked for us: SpiderStrategies@2544fd0

from jsonstream.

dominictarr avatar dominictarr commented on June 9, 2024

oh sorry I missed this issue the first time - this shouldn't really be a problem now days because of https://github.com/feross/buffer <- complete polyfil for buffer in all browsers.
You should get this if you use a recent browserify

from jsonstream.

dominictarr avatar dominictarr commented on June 9, 2024

@mattsgarlata does you code still work if you use Int8Array ? I it looks like you are allocating 4 bytes per input byte. Also, you could just create a Int8Array with the necessary length and then set it's values instead of creating an array and then turning it into an typed array

from jsonstream.

nathanbowser avatar nathanbowser commented on June 9, 2024

@dominictarr We're just relying on using the buffer polyfill in the browser, now that it's supported. I don't think there's a reason to have the if (process.browser) check anymore, right?

from jsonstream.

dominictarr avatar dominictarr commented on June 9, 2024

that is correct, we could remove it.

from jsonstream.

mattsgarlata avatar mattsgarlata commented on June 9, 2024

I think it would be a good idea to remove it, since it doesn't work with unicode.

from jsonstream.

dominictarr avatar dominictarr commented on June 9, 2024

okay, it's removed in 0.8.3

from jsonstream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.