Comments (6)
Easy solution: only feed it mbox files π
But I get your point. The issue is that even if a file starts with From
, it doesn't necessarily have to be an mbox file anyway. So I could have it check for that header, but perhaps it should just assume that anything that gets passed through it is a valid mbox file (like it does now).
from node-mbox.
Hi, but blackbox.psd not have 'From' string in fact. How i can check what the file is have mbox format? I think if mbox-npm return 0 messages - is not a mbox file.
from node-mbox.
Strictly speaking, node-mbox is meant to parse mbox files, not to check if a file is a valid mbox file. I'll add a "strict" mode that you can enable which will cause an error to be thrown when the input doesn't start with From
, does that sound reasonable?
β robert (iPad)
On 27 mrt. 2016, at 12:29, ΠΠ»Π΅ΠΊΡΠ°Π½Π΄Ρ [email protected] wrote:
Hi, but blackbox.psd not have 'From' string in fact. How i can check what the file is have mbox format? I think if mbox-npm return 0 messages - is not a mbox file.
β
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
from node-mbox.
@misteral I pushed an update, if you care to test it:
npm i robertklep/node-mbox#59899c6
The two main changes:
- it should return a message count of 0 for non-mbox files (
however, strictly speaking, if it finds the stringmeaning files that don't start with\nFrom
anywhere in the file, it may still think it found a messageFrom
); - there's an option
strict
that will cause an error event to be thrown if the input doesn't start withFrom
;
If it works as expected, I'll publish it as v0.3.0
.
from node-mbox.
Yes, it works! Thanks. Please release v0.3.0
from node-mbox.
Done!
from node-mbox.
Related Issues (6)
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 node-mbox.