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

Possible inaccurate information in README #1688

Closed
parkerduckworth opened this issue Nov 26, 2019 · 1 comment · Fixed by #2016
Closed

Possible inaccurate information in README #1688

parkerduckworth opened this issue Nov 26, 2019 · 1 comment · Fixed by #2016

Comments

@parkerduckworth
Copy link

parkerduckworth commented Nov 26, 2019

The README, under the Parsing Options header, states that:

WTF is mainly for development. By default, the parser will suppress read errors on single worksheets, allowing you to read from the worksheets that do parse properly. Setting WTF:1 forces those errors to be thrown.

However, in order to invoke that option I had to assign a value of true rather than 1 to WTF. If this is the case, I would be happy to open a PR.

I'm running SheetJS js-xlsx v0.15.0 on Node.js v12.12.0.

Thanks,
Parker

@SheetJSDev
Copy link
Contributor

The JS code checks for the truthiness, so in theory any value other than the falsy ones (0, null, undefined, false, and the empty string) should work. If this doesn't work from pure JS code, please share an example and we'll take a closer look.

The TypeScript definitions declare it as a boolean, so you'd get a compile-time error if you tried to pass 1.

It's probably better to change the docs in the way you proposed. Please open a PR. The correct place to make that change is docbits/80_parseopts.md -- README.md is assembled by the book recipe in the Makefile

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

Successfully merging a pull request may close this issue.

2 participants