GithubHelp home page GithubHelp logo

Comments (6)

robertklep avatar robertklep commented on June 1, 2024

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.

misteral avatar misteral commented on June 1, 2024

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.

robertklep avatar robertklep commented on June 1, 2024

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.

robertklep avatar robertklep commented on June 1, 2024

@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 string \nFrom anywhere in the file, it may still think it found a message meaning files that don't start with From);
  • there's an option strict that will cause an error event to be thrown if the input doesn't start with From;

If it works as expected, I'll publish it as v0.3.0.

from node-mbox.

misteral avatar misteral commented on June 1, 2024

Yes, it works! Thanks. Please release v0.3.0

from node-mbox.

robertklep avatar robertklep commented on June 1, 2024

Done!

from node-mbox.

Related Issues (6)

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.