Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To avoid forking this project it'd be cool if measures to address the following were added #19

Open
ablsc opened this issue Jun 6, 2023 · 0 comments

Comments

@ablsc
Copy link

ablsc commented Jun 6, 2023

So the regular expression generated from the log format gets pinned to the end of the line (looks like the following line of code does it index.js:32 - regex = '(.+)$';). It'd be convenient if the module made it configurable whether to lock to EOL or SOL.

The parser produces a lossy result ie. the result that can't be taken to generate the original input. In particular I'm referring to the translation of dashes/hypens to null (looks like the following line of code does it index.js:170 - if (row[key] === '-') {). Adding this change admittedly wouldn't mean the original line could be generated from the parsed result as we're not tracking the amount of whitespace between each item but. For this change I assume other users of the module are depending on dashes being parsed out as null so when constructing the parser object in addition to providing the format, optional parameters of whether to maintain dashes and whether to pin the regex to end or start of the line could be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant