Possible inaccurate information in README #1688

Closed
opened 2019-11-26 03:10:58 +00:00 by parkerduckworth · 1 comment
parkerduckworth commented 2019-11-26 03:10:58 +00:00 (Migrated from github.com)

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

The `README`, under the [Parsing Options](https://github.com/SheetJS/sheetjs#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 commented 2020-01-17 06:04:30 +00:00 (Migrated from github.com)

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

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`](https://github.com/SheetJS/sheetjs/blob/master/docbits/80_parseopts.md) -- README.md is assembled by the [`book` recipe in the Makefile](https://github.com/SheetJS/sheetjs/blob/master/Makefile#L231)
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#1688
No description provided.