GithubHelp home page GithubHelp logo

Comments (7)

lfdoherty avatar lfdoherty commented on June 25, 2024

Just making a note here that this was the true cause of the problem I logged as bug #21. If it's not going to be fixed I strongly suggest a note be added to the documentation warning that it's unsafe to do this.

from line-reader.

lfdoherty avatar lfdoherty commented on June 25, 2024

I should also add that it's not as simple as some lines being read multiple times - text may be mangled within a line (possibly if it spans more than one data chunk?)

from line-reader.

amitguptagwl avatar amitguptagwl commented on June 25, 2024

I found a bug today on the same line. If I create a file with single line, lineReader.eachLine() keeps running forever.

var lineReader = require('line-reader');

lineReader.eachLine('testfile', function(line, last) {
    console.log(line);
});

But if there are more than one line even if they are empty. it works fine.

from line-reader.

nickewing avatar nickewing commented on June 25, 2024

@amitguptagwl What version of line-reader are you using? There are tests for both a file with a single line and a new line character and a file with a single line and no new line character. Are you also using workers like the previous posters?

from line-reader.

amitguptagwl avatar amitguptagwl commented on June 25, 2024

I am using "line-reader": "^0.3.0". I dint realized that there is a new version available. Let me update and try again.

from line-reader.

amitguptagwl avatar amitguptagwl commented on June 25, 2024

Thanks It is fixed in 0.4.0

from line-reader.

nickewing avatar nickewing commented on June 25, 2024

Cool, glad to hear it. 👍

from line-reader.

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.