Comments (6)
This seems to be a specific example of #7.
from line-reader.
Any update or work around on this?
from line-reader.
The API is not following the node standard, because it does not use error
as first argument in the callback.
from line-reader.
I was thinking about this, I think there should just be an (error, result)
callback after the (line, last)
callback in the arguments to eachLine()
, plus the other options should be supplied as a hash that comes before this last callback. This callback would be called at the very end of everything. That way the function could be auto-promisified by libraries like bluebird (and the .then()
handler could be removed since it doesn't follow any promise standards either). If error
was provided as the first argument to the per-line callback, then it couldn't be auto-promisified.
I looks to me like Nick Ewing doesn't intend to actively maintain this...but he has merged PRs somewhat recently.
from line-reader.
@jedwards1211 You're right, I haven't had time to do fixes myself and I haven't been working with node recently. I am very happy to review and accept PRs however!
from line-reader.
Yeah, understandable! Well if I find time soon I'll see if I can make a PR for this.
from line-reader.
Related Issues (20)
- File not closed when finished() called. HOT 1
- output not buffer size invariant
- bug while reading an empty file HOT 1
- Update on npm HOT 5
- TypeError HOT 1
- not working on windows
- get previous line
- lineReader.eachLine(...).then is not a function HOT 9
- not working when loading the module from unit tests
- Binary file?
- Await finished function HOT 1
- What should I do if I want to insert a line to the file?
- line-reader not working after page refresh
- Promises example HOT 2
- Typescript HOT 3
- TypeError: Cannot read property 'length' of undefined
- Save to file HOT 3
- Any way to stop/abort reading a file in the eachLine method? HOT 1
- Does it save the whole file to RAM? HOT 1
- Unexpected error when calling eachLine on an empty file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from line-reader.